From 662c04593b0269dc5d4a2ca0bf25a3d69dd97a11 Mon Sep 17 00:00:00 2001 From: Philippe Kalitine Date: Fri, 7 Sep 2018 16:03:22 +0200 Subject: [PATCH] docs: regenerate doc --- docs/ast/source/BotFacade.js.json | 2654 ++++++++--------- docs/ast/source/index.common.doc.js.json | 104 +- docs/class/src/BotFacade.js~Bot.html | 18 +- .../src/WebChannelFacade.js~WebGroup.html | 4 +- .../src/index.common.doc.js~LogLevel.html | 4 +- .../index.common.doc.js~SignalingState.html | 4 +- .../src/index.common.doc.js~Topology.html | 4 +- .../index.common.doc.js~WebGroupState.html | 4 +- docs/file/src/BotFacade.js.html | 12 +- docs/file/src/WebChannelFacade.js.html | 4 +- docs/file/src/index.common.doc.js.html | 10 +- docs/function/index.html | 4 +- docs/identifiers.html | 8 +- docs/index.html | 4 +- docs/index.json | 32 +- docs/jsFromTs/src/Bot.d.ts | 28 + docs/jsFromTs/src/Bot.js | 55 +- docs/jsFromTs/src/BotFacade.d.ts | 68 + docs/jsFromTs/src/BotFacade.js | 8 +- docs/jsFromTs/src/Channel.d.ts | 45 + docs/jsFromTs/src/Channel.js | 2 +- docs/jsFromTs/src/Signaling.d.ts | 48 + docs/jsFromTs/src/WebChannel.d.ts | 91 + docs/jsFromTs/src/WebChannel.js | 15 +- docs/jsFromTs/src/WebChannelFacade.d.ts | 108 + docs/jsFromTs/src/WebChannelState.d.ts | 5 + docs/jsFromTs/src/WebSocketBuilder.d.ts | 21 + docs/jsFromTs/src/index.browser.d.ts | 2 + docs/jsFromTs/src/index.common.d.ts | 5 + docs/jsFromTs/src/index.common.doc.d.ts | 145 + docs/jsFromTs/src/index.common.doc.js | 6 +- docs/jsFromTs/src/index.node.d.ts | 3 + docs/jsFromTs/src/misc/env.d.ts | 28 + docs/jsFromTs/src/misc/env.js | 1 - docs/jsFromTs/src/misc/polyfills.browser.d.ts | 1 + docs/jsFromTs/src/misc/polyfills.node.d.ts | 1 + docs/jsFromTs/src/misc/polyfills.node.js | 28 +- docs/jsFromTs/src/misc/util.d.ts | 34 + docs/jsFromTs/src/misc/util.log.d.ts | 25 + docs/jsFromTs/src/service/Service.d.ts | 67 + docs/jsFromTs/src/service/UserMessage.d.ts | 29 + .../channelBuilder/ChannelBuilder.d.ts | 38 + .../service/channelBuilder/ChannelBuilder.js | 2 +- .../channelBuilder/ConnectionError.d.ts | 8 + .../channelBuilder/ConnectionsInProgress.d.ts | 13 + .../DataChannelBuilder.d.ts | 30 + .../service/dataChannelBuilder/Remote.d.ts | 21 + .../src/service/topology/FullMesh.d.ts | 45 + .../jsFromTs/src/service/topology/FullMesh.js | 2 +- .../src/service/topology/Topology.d.ts | 63 + docs/jsFromTs/test/functional/1-bot.test.d.ts | 1 + .../test/functional/1-client.test.d.ts | 1 + .../test/functional/2-bot_client.test.d.ts | 1 + .../test/functional/2-client_bot.test.d.ts | 1 + .../test/functional/2-clients.test.d.ts | 1 + .../functional/3-bot_client_client.test.d.ts | 1 + .../functional/3-client_bot_client.test.d.ts | 1 + .../functional/3-client_client_bot.test.d.ts | 1 + .../test/functional/3-clients.test.d.ts | 1 + docs/jsFromTs/test/util/botServer.d.ts | 1 + docs/jsFromTs/test/util/helper.d.ts | 52 + docs/script/search_index.js | 24 +- docs/source.html | 14 +- .../test/functional/1-bot.test.js.html | 4 +- .../test/functional/1-client.test.js.html | 4 +- .../test/functional/2-bot_client.test.js.html | 4 +- .../test/functional/2-client_bot.test.js.html | 4 +- .../test/functional/2-clients.test.js.html | 4 +- .../3-bot_client_client.test.js.html | 4 +- .../3-client_bot_client.test.js.html | 4 +- .../3-client_client_bot.test.js.html | 4 +- .../test/functional/3-clients.test.js.html | 4 +- docs/test.html | 4 +- docs/typedef/index.html | 6 +- 74 files changed, 2580 insertions(+), 1527 deletions(-) create mode 100644 docs/jsFromTs/src/Bot.d.ts create mode 100644 docs/jsFromTs/src/BotFacade.d.ts create mode 100644 docs/jsFromTs/src/Channel.d.ts create mode 100644 docs/jsFromTs/src/Signaling.d.ts create mode 100644 docs/jsFromTs/src/WebChannel.d.ts create mode 100644 docs/jsFromTs/src/WebChannelFacade.d.ts create mode 100644 docs/jsFromTs/src/WebChannelState.d.ts create mode 100644 docs/jsFromTs/src/WebSocketBuilder.d.ts create mode 100644 docs/jsFromTs/src/index.browser.d.ts create mode 100644 docs/jsFromTs/src/index.common.d.ts create mode 100644 docs/jsFromTs/src/index.common.doc.d.ts create mode 100644 docs/jsFromTs/src/index.node.d.ts create mode 100644 docs/jsFromTs/src/misc/env.d.ts create mode 100644 docs/jsFromTs/src/misc/polyfills.browser.d.ts create mode 100644 docs/jsFromTs/src/misc/polyfills.node.d.ts create mode 100644 docs/jsFromTs/src/misc/util.d.ts create mode 100644 docs/jsFromTs/src/misc/util.log.d.ts create mode 100644 docs/jsFromTs/src/service/Service.d.ts create mode 100644 docs/jsFromTs/src/service/UserMessage.d.ts create mode 100644 docs/jsFromTs/src/service/channelBuilder/ChannelBuilder.d.ts create mode 100644 docs/jsFromTs/src/service/channelBuilder/ConnectionError.d.ts create mode 100644 docs/jsFromTs/src/service/channelBuilder/ConnectionsInProgress.d.ts create mode 100644 docs/jsFromTs/src/service/dataChannelBuilder/DataChannelBuilder.d.ts create mode 100644 docs/jsFromTs/src/service/dataChannelBuilder/Remote.d.ts create mode 100644 docs/jsFromTs/src/service/topology/FullMesh.d.ts create mode 100644 docs/jsFromTs/src/service/topology/Topology.d.ts create mode 100644 docs/jsFromTs/test/functional/1-bot.test.d.ts create mode 100644 docs/jsFromTs/test/functional/1-client.test.d.ts create mode 100644 docs/jsFromTs/test/functional/2-bot_client.test.d.ts create mode 100644 docs/jsFromTs/test/functional/2-client_bot.test.d.ts create mode 100644 docs/jsFromTs/test/functional/2-clients.test.d.ts create mode 100644 docs/jsFromTs/test/functional/3-bot_client_client.test.d.ts create mode 100644 docs/jsFromTs/test/functional/3-client_bot_client.test.d.ts create mode 100644 docs/jsFromTs/test/functional/3-client_client_bot.test.d.ts create mode 100644 docs/jsFromTs/test/functional/3-clients.test.d.ts create mode 100644 docs/jsFromTs/test/util/botServer.d.ts create mode 100644 docs/jsFromTs/test/util/helper.d.ts diff --git a/docs/ast/source/BotFacade.js.json b/docs/ast/source/BotFacade.js.json index 25bfec74..48a86fc7 100644 --- a/docs/ast/source/BotFacade.js.json +++ b/docs/ast/source/BotFacade.js.json @@ -1,7 +1,7 @@ { "type": "File", "start": 0, - "end": 5223, + "end": 5175, "loc": { "start": { "line": 1, @@ -15,7 +15,7 @@ "program": { "type": "Program", "start": 0, - "end": 5223, + "end": 5175, "loc": { "start": { "line": 1, @@ -186,7 +186,7 @@ { "type": "ExportNamedDeclaration", "start": 1106, - "end": 5222, + "end": 5174, "loc": { "start": { "line": 43, @@ -202,7 +202,7 @@ "declaration": { "type": "ClassDeclaration", "start": 1113, - "end": 5222, + "end": 5174, "loc": { "start": { "line": 43, @@ -235,7 +235,7 @@ "body": { "type": "ClassBody", "start": 1123, - "end": 5222, + "end": 5174, "loc": { "start": { "line": 43, @@ -249,8 +249,8 @@ "body": [ { "type": "ClassMethod", - "start": 2059, - "end": 5220, + "start": 2047, + "end": 5172, "loc": { "start": { "line": 56, @@ -265,8 +265,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 2059, - "end": 2070, + "start": 2047, + "end": 2058, "loc": { "start": { "line": 56, @@ -289,8 +289,8 @@ "params": [ { "type": "Identifier", - "start": 2071, - "end": 2078, + "start": 2059, + "end": 2066, "loc": { "start": { "line": 56, @@ -307,8 +307,8 @@ ], "body": { "type": "BlockStatement", - "start": 2080, - "end": 5220, + "start": 2068, + "end": 5172, "loc": { "start": { "line": 56, @@ -322,8 +322,8 @@ "body": [ { "type": "ExpressionStatement", - "start": 2090, - "end": 2125, + "start": 2078, + "end": 2113, "loc": { "start": { "line": 57, @@ -336,8 +336,8 @@ }, "expression": { "type": "AssignmentExpression", - "start": 2090, - "end": 2124, + "start": 2078, + "end": 2112, "loc": { "start": { "line": 57, @@ -351,8 +351,8 @@ "operator": "=", "left": { "type": "Identifier", - "start": 2090, - "end": 2099, + "start": 2078, + "end": 2087, "loc": { "start": { "line": 57, @@ -368,8 +368,8 @@ }, "right": { "type": "NewExpression", - "start": 2102, - "end": 2124, + "start": 2090, + "end": 2112, "loc": { "start": { "line": 57, @@ -382,8 +382,8 @@ }, "callee": { "type": "Identifier", - "start": 2106, - "end": 2115, + "start": 2094, + "end": 2103, "loc": { "start": { "line": 57, @@ -400,8 +400,8 @@ "arguments": [ { "type": "Identifier", - "start": 2116, - "end": 2123, + "start": 2104, + "end": 2111, "loc": { "start": { "line": 57, @@ -421,9 +421,9 @@ "trailingComments": [ { "type": "CommentBlock", - "value": "*\n * Read-only NodeJS http server instance.\n * @type {NodeJSHttpServer|NodeJSHttpsServer}\n ", - "start": 2134, - "end": 2253, + "value": "*\n * Read-only NodeJS http server instance.\n * @type {HttpServer|HttpsServer}\n ", + "start": 2122, + "end": 2229, "loc": { "start": { "line": 58, @@ -439,8 +439,8 @@ }, { "type": "ExpressionStatement", - "start": 2262, - "end": 2286, + "start": 2238, + "end": 2262, "loc": { "start": { "line": 62, @@ -453,8 +453,8 @@ }, "expression": { "type": "AssignmentExpression", - "start": 2262, - "end": 2285, + "start": 2238, + "end": 2261, "loc": { "start": { "line": 62, @@ -468,8 +468,8 @@ "operator": "=", "left": { "type": "MemberExpression", - "start": 2262, - "end": 2273, + "start": 2238, + "end": 2249, "loc": { "start": { "line": 62, @@ -482,8 +482,8 @@ }, "object": { "type": "ThisExpression", - "start": 2262, - "end": 2266, + "start": 2238, + "end": 2242, "loc": { "start": { "line": 62, @@ -498,8 +498,8 @@ }, "property": { "type": "Identifier", - "start": 2267, - "end": 2273, + "start": 2243, + "end": 2249, "loc": { "start": { "line": 62, @@ -518,8 +518,8 @@ }, "right": { "type": "Identifier", - "start": 2276, - "end": 2285, + "start": 2252, + "end": 2261, "loc": { "start": { "line": 62, @@ -538,9 +538,9 @@ "leadingComments": [ { "type": "CommentBlock", - "value": "*\n * Read-only NodeJS http server instance.\n * @type {NodeJSHttpServer|NodeJSHttpsServer}\n ", - "start": 2134, - "end": 2253, + "value": "*\n * Read-only NodeJS http server instance.\n * @type {HttpServer|HttpsServer}\n ", + "start": 2122, + "end": 2229, "loc": { "start": { "line": 58, @@ -556,8 +556,8 @@ }, { "type": "ExpressionStatement", - "start": 2295, - "end": 2451, + "start": 2271, + "end": 2427, "loc": { "start": { "line": 63, @@ -570,8 +570,8 @@ }, "expression": { "type": "CallExpression", - "start": 2295, - "end": 2450, + "start": 2271, + "end": 2426, "loc": { "start": { "line": 63, @@ -584,8 +584,8 @@ }, "callee": { "type": "MemberExpression", - "start": 2295, - "end": 2317, + "start": 2271, + "end": 2293, "loc": { "start": { "line": 63, @@ -598,8 +598,8 @@ }, "object": { "type": "Identifier", - "start": 2295, - "end": 2302, + "start": 2271, + "end": 2278, "loc": { "start": { "line": 63, @@ -615,8 +615,8 @@ }, "property": { "type": "Identifier", - "start": 2303, - "end": 2317, + "start": 2279, + "end": 2293, "loc": { "start": { "line": 63, @@ -635,8 +635,8 @@ "arguments": [ { "type": "ThisExpression", - "start": 2318, - "end": 2322, + "start": 2294, + "end": 2298, "loc": { "start": { "line": 63, @@ -650,8 +650,8 @@ }, { "type": "StringLiteral", - "start": 2324, - "end": 2332, + "start": 2300, + "end": 2308, "loc": { "start": { "line": 63, @@ -670,8 +670,8 @@ }, { "type": "ObjectExpression", - "start": 2334, - "end": 2449, + "start": 2310, + "end": 2425, "loc": { "start": { "line": 63, @@ -685,8 +685,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 2348, - "end": 2367, + "start": 2324, + "end": 2343, "loc": { "start": { "line": 64, @@ -702,8 +702,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 2348, - "end": 2360, + "start": 2324, + "end": 2336, "loc": { "start": { "line": 64, @@ -719,8 +719,8 @@ }, "value": { "type": "BooleanLiteral", - "start": 2362, - "end": 2367, + "start": 2338, + "end": 2343, "loc": { "start": { "line": 64, @@ -736,8 +736,8 @@ }, { "type": "ObjectProperty", - "start": 2381, - "end": 2397, + "start": 2357, + "end": 2373, "loc": { "start": { "line": 65, @@ -753,8 +753,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 2381, - "end": 2391, + "start": 2357, + "end": 2367, "loc": { "start": { "line": 65, @@ -770,8 +770,8 @@ }, "value": { "type": "BooleanLiteral", - "start": 2393, - "end": 2397, + "start": 2369, + "end": 2373, "loc": { "start": { "line": 65, @@ -787,8 +787,8 @@ }, { "type": "ObjectProperty", - "start": 2411, - "end": 2438, + "start": 2387, + "end": 2414, "loc": { "start": { "line": 66, @@ -804,8 +804,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 2411, - "end": 2414, + "start": 2387, + "end": 2390, "loc": { "start": { "line": 66, @@ -821,8 +821,8 @@ }, "value": { "type": "ArrowFunctionExpression", - "start": 2416, - "end": 2438, + "start": 2392, + "end": 2414, "loc": { "start": { "line": 66, @@ -840,8 +840,8 @@ "params": [], "body": { "type": "MemberExpression", - "start": 2422, - "end": 2438, + "start": 2398, + "end": 2414, "loc": { "start": { "line": 66, @@ -854,8 +854,8 @@ }, "object": { "type": "Identifier", - "start": 2422, - "end": 2431, + "start": 2398, + "end": 2407, "loc": { "start": { "line": 66, @@ -871,8 +871,8 @@ }, "property": { "type": "Identifier", - "start": 2432, - "end": 2438, + "start": 2408, + "end": 2414, "loc": { "start": { "line": 66, @@ -897,9 +897,9 @@ "trailingComments": [ { "type": "CommentBlock", - "value": "*\n * Read-only property of WebSocket server: permessage-deflate.\n * @type {NodeJSHttpServer|NodeJSHttpsServer}\n ", - "start": 2460, - "end": 2600, + "value": "*\n * Read-only property of WebSocket server: permessage-deflate.\n * @type {HttpServer|HttpsServer}\n ", + "start": 2436, + "end": 2564, "loc": { "start": { "line": 68, @@ -915,8 +915,8 @@ }, { "type": "ExpressionStatement", - "start": 2609, - "end": 2644, + "start": 2573, + "end": 2608, "loc": { "start": { "line": 72, @@ -929,8 +929,8 @@ }, "expression": { "type": "AssignmentExpression", - "start": 2609, - "end": 2643, + "start": 2573, + "end": 2607, "loc": { "start": { "line": 72, @@ -944,8 +944,8 @@ "operator": "=", "left": { "type": "MemberExpression", - "start": 2609, - "end": 2631, + "start": 2573, + "end": 2595, "loc": { "start": { "line": 72, @@ -958,8 +958,8 @@ }, "object": { "type": "ThisExpression", - "start": 2609, - "end": 2613, + "start": 2573, + "end": 2577, "loc": { "start": { "line": 72, @@ -974,8 +974,8 @@ }, "property": { "type": "Identifier", - "start": 2614, - "end": 2631, + "start": 2578, + "end": 2595, "loc": { "start": { "line": 72, @@ -994,8 +994,8 @@ }, "right": { "type": "Identifier", - "start": 2634, - "end": 2643, + "start": 2598, + "end": 2607, "loc": { "start": { "line": 72, @@ -1014,9 +1014,9 @@ "leadingComments": [ { "type": "CommentBlock", - "value": "*\n * Read-only property of WebSocket server: permessage-deflate.\n * @type {NodeJSHttpServer|NodeJSHttpsServer}\n ", - "start": 2460, - "end": 2600, + "value": "*\n * Read-only property of WebSocket server: permessage-deflate.\n * @type {HttpServer|HttpsServer}\n ", + "start": 2436, + "end": 2564, "loc": { "start": { "line": 68, @@ -1032,8 +1032,8 @@ }, { "type": "ExpressionStatement", - "start": 2653, - "end": 2831, + "start": 2617, + "end": 2795, "loc": { "start": { "line": 73, @@ -1046,8 +1046,8 @@ }, "expression": { "type": "CallExpression", - "start": 2653, - "end": 2830, + "start": 2617, + "end": 2794, "loc": { "start": { "line": 73, @@ -1060,8 +1060,8 @@ }, "callee": { "type": "MemberExpression", - "start": 2653, - "end": 2675, + "start": 2617, + "end": 2639, "loc": { "start": { "line": 73, @@ -1074,8 +1074,8 @@ }, "object": { "type": "Identifier", - "start": 2653, - "end": 2660, + "start": 2617, + "end": 2624, "loc": { "start": { "line": 73, @@ -1091,8 +1091,8 @@ }, "property": { "type": "Identifier", - "start": 2661, - "end": 2675, + "start": 2625, + "end": 2639, "loc": { "start": { "line": 73, @@ -1111,8 +1111,8 @@ "arguments": [ { "type": "ThisExpression", - "start": 2676, - "end": 2680, + "start": 2640, + "end": 2644, "loc": { "start": { "line": 73, @@ -1126,8 +1126,8 @@ }, { "type": "StringLiteral", - "start": 2682, - "end": 2701, + "start": 2646, + "end": 2665, "loc": { "start": { "line": 73, @@ -1146,8 +1146,8 @@ }, { "type": "ObjectExpression", - "start": 2703, - "end": 2829, + "start": 2667, + "end": 2793, "loc": { "start": { "line": 73, @@ -1161,8 +1161,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 2717, - "end": 2736, + "start": 2681, + "end": 2700, "loc": { "start": { "line": 74, @@ -1178,8 +1178,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 2717, - "end": 2729, + "start": 2681, + "end": 2693, "loc": { "start": { "line": 74, @@ -1195,8 +1195,8 @@ }, "value": { "type": "BooleanLiteral", - "start": 2731, - "end": 2736, + "start": 2695, + "end": 2700, "loc": { "start": { "line": 74, @@ -1212,8 +1212,8 @@ }, { "type": "ObjectProperty", - "start": 2750, - "end": 2766, + "start": 2714, + "end": 2730, "loc": { "start": { "line": 75, @@ -1229,8 +1229,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 2750, - "end": 2760, + "start": 2714, + "end": 2724, "loc": { "start": { "line": 75, @@ -1246,8 +1246,8 @@ }, "value": { "type": "BooleanLiteral", - "start": 2762, - "end": 2766, + "start": 2726, + "end": 2730, "loc": { "start": { "line": 75, @@ -1263,8 +1263,8 @@ }, { "type": "ObjectProperty", - "start": 2780, - "end": 2818, + "start": 2744, + "end": 2782, "loc": { "start": { "line": 76, @@ -1280,8 +1280,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 2780, - "end": 2783, + "start": 2744, + "end": 2747, "loc": { "start": { "line": 76, @@ -1297,8 +1297,8 @@ }, "value": { "type": "ArrowFunctionExpression", - "start": 2785, - "end": 2818, + "start": 2749, + "end": 2782, "loc": { "start": { "line": 76, @@ -1316,8 +1316,8 @@ "params": [], "body": { "type": "MemberExpression", - "start": 2791, - "end": 2818, + "start": 2755, + "end": 2782, "loc": { "start": { "line": 76, @@ -1330,8 +1330,8 @@ }, "object": { "type": "Identifier", - "start": 2791, - "end": 2800, + "start": 2755, + "end": 2764, "loc": { "start": { "line": 76, @@ -1347,8 +1347,8 @@ }, "property": { "type": "Identifier", - "start": 2801, - "end": 2818, + "start": 2765, + "end": 2782, "loc": { "start": { "line": 76, @@ -1373,9 +1373,9 @@ "trailingComments": [ { "type": "CommentBlock", - "value": "*\n * Read-only property leaveOnceAlone.\n * @type {NodeJSHttpServer|NodeJSHttpsServer}\n ", - "start": 2840, - "end": 2955, + "value": "*\n * Read-only property leaveOnceAlone.\n * @type {HttpServer|HttpsServer}\n ", + "start": 2804, + "end": 2907, "loc": { "start": { "line": 78, @@ -1391,8 +1391,8 @@ }, { "type": "ExpressionStatement", - "start": 2964, - "end": 2996, + "start": 2916, + "end": 2948, "loc": { "start": { "line": 82, @@ -1405,8 +1405,8 @@ }, "expression": { "type": "AssignmentExpression", - "start": 2964, - "end": 2995, + "start": 2916, + "end": 2947, "loc": { "start": { "line": 82, @@ -1420,8 +1420,8 @@ "operator": "=", "left": { "type": "MemberExpression", - "start": 2964, - "end": 2983, + "start": 2916, + "end": 2935, "loc": { "start": { "line": 82, @@ -1434,8 +1434,8 @@ }, "object": { "type": "ThisExpression", - "start": 2964, - "end": 2968, + "start": 2916, + "end": 2920, "loc": { "start": { "line": 82, @@ -1450,8 +1450,8 @@ }, "property": { "type": "Identifier", - "start": 2969, - "end": 2983, + "start": 2921, + "end": 2935, "loc": { "start": { "line": 82, @@ -1470,8 +1470,8 @@ }, "right": { "type": "Identifier", - "start": 2986, - "end": 2995, + "start": 2938, + "end": 2947, "loc": { "start": { "line": 82, @@ -1490,9 +1490,9 @@ "leadingComments": [ { "type": "CommentBlock", - "value": "*\n * Read-only property leaveOnceAlone.\n * @type {NodeJSHttpServer|NodeJSHttpsServer}\n ", - "start": 2840, - "end": 2955, + "value": "*\n * Read-only property leaveOnceAlone.\n * @type {HttpServer|HttpsServer}\n ", + "start": 2804, + "end": 2907, "loc": { "start": { "line": 78, @@ -1508,8 +1508,8 @@ }, { "type": "ExpressionStatement", - "start": 3005, - "end": 3177, + "start": 2957, + "end": 3129, "loc": { "start": { "line": 83, @@ -1522,8 +1522,8 @@ }, "expression": { "type": "CallExpression", - "start": 3005, - "end": 3176, + "start": 2957, + "end": 3128, "loc": { "start": { "line": 83, @@ -1536,8 +1536,8 @@ }, "callee": { "type": "MemberExpression", - "start": 3005, - "end": 3027, + "start": 2957, + "end": 2979, "loc": { "start": { "line": 83, @@ -1550,8 +1550,8 @@ }, "object": { "type": "Identifier", - "start": 3005, - "end": 3012, + "start": 2957, + "end": 2964, "loc": { "start": { "line": 83, @@ -1567,8 +1567,8 @@ }, "property": { "type": "Identifier", - "start": 3013, - "end": 3027, + "start": 2965, + "end": 2979, "loc": { "start": { "line": 83, @@ -1587,8 +1587,8 @@ "arguments": [ { "type": "ThisExpression", - "start": 3028, - "end": 3032, + "start": 2980, + "end": 2984, "loc": { "start": { "line": 83, @@ -1602,8 +1602,8 @@ }, { "type": "StringLiteral", - "start": 3034, - "end": 3050, + "start": 2986, + "end": 3002, "loc": { "start": { "line": 83, @@ -1622,8 +1622,8 @@ }, { "type": "ObjectExpression", - "start": 3052, - "end": 3175, + "start": 3004, + "end": 3127, "loc": { "start": { "line": 83, @@ -1637,8 +1637,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 3066, - "end": 3085, + "start": 3018, + "end": 3037, "loc": { "start": { "line": 84, @@ -1654,8 +1654,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 3066, - "end": 3078, + "start": 3018, + "end": 3030, "loc": { "start": { "line": 84, @@ -1671,8 +1671,8 @@ }, "value": { "type": "BooleanLiteral", - "start": 3080, - "end": 3085, + "start": 3032, + "end": 3037, "loc": { "start": { "line": 84, @@ -1688,8 +1688,8 @@ }, { "type": "ObjectProperty", - "start": 3099, - "end": 3115, + "start": 3051, + "end": 3067, "loc": { "start": { "line": 85, @@ -1705,8 +1705,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 3099, - "end": 3109, + "start": 3051, + "end": 3061, "loc": { "start": { "line": 85, @@ -1722,8 +1722,8 @@ }, "value": { "type": "BooleanLiteral", - "start": 3111, - "end": 3115, + "start": 3063, + "end": 3067, "loc": { "start": { "line": 85, @@ -1739,8 +1739,8 @@ }, { "type": "ObjectProperty", - "start": 3129, - "end": 3164, + "start": 3081, + "end": 3116, "loc": { "start": { "line": 86, @@ -1756,8 +1756,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 3129, - "end": 3132, + "start": 3081, + "end": 3084, "loc": { "start": { "line": 86, @@ -1773,8 +1773,8 @@ }, "value": { "type": "ArrowFunctionExpression", - "start": 3134, - "end": 3164, + "start": 3086, + "end": 3116, "loc": { "start": { "line": 86, @@ -1792,8 +1792,8 @@ "params": [], "body": { "type": "MemberExpression", - "start": 3140, - "end": 3164, + "start": 3092, + "end": 3116, "loc": { "start": { "line": 86, @@ -1806,8 +1806,8 @@ }, "object": { "type": "Identifier", - "start": 3140, - "end": 3149, + "start": 3092, + "end": 3101, "loc": { "start": { "line": 86, @@ -1823,8 +1823,8 @@ }, "property": { "type": "Identifier", - "start": 3150, - "end": 3164, + "start": 3102, + "end": 3116, "loc": { "start": { "line": 86, @@ -1850,8 +1850,8 @@ { "type": "CommentBlock", "value": "*\n * Read-only set of web groups the bot is member of.\n * @type {Set}\n ", - "start": 3186, - "end": 3295, + "start": 3138, + "end": 3247, "loc": { "start": { "line": 88, @@ -1867,8 +1867,8 @@ }, { "type": "ExpressionStatement", - "start": 3304, - "end": 3331, + "start": 3256, + "end": 3283, "loc": { "start": { "line": 92, @@ -1881,8 +1881,8 @@ }, "expression": { "type": "AssignmentExpression", - "start": 3304, - "end": 3330, + "start": 3256, + "end": 3282, "loc": { "start": { "line": 92, @@ -1896,8 +1896,8 @@ "operator": "=", "left": { "type": "MemberExpression", - "start": 3304, - "end": 3318, + "start": 3256, + "end": 3270, "loc": { "start": { "line": 92, @@ -1910,8 +1910,8 @@ }, "object": { "type": "ThisExpression", - "start": 3304, - "end": 3308, + "start": 3256, + "end": 3260, "loc": { "start": { "line": 92, @@ -1926,8 +1926,8 @@ }, "property": { "type": "Identifier", - "start": 3309, - "end": 3318, + "start": 3261, + "end": 3270, "loc": { "start": { "line": 92, @@ -1946,8 +1946,8 @@ }, "right": { "type": "Identifier", - "start": 3321, - "end": 3330, + "start": 3273, + "end": 3282, "loc": { "start": { "line": 92, @@ -1967,8 +1967,8 @@ { "type": "CommentBlock", "value": "*\n * Read-only set of web groups the bot is member of.\n * @type {Set}\n ", - "start": 3186, - "end": 3295, + "start": 3138, + "end": 3247, "loc": { "start": { "line": 88, @@ -1984,8 +1984,8 @@ }, { "type": "ExpressionStatement", - "start": 3340, - "end": 3502, + "start": 3292, + "end": 3454, "loc": { "start": { "line": 93, @@ -1998,8 +1998,8 @@ }, "expression": { "type": "CallExpression", - "start": 3340, - "end": 3501, + "start": 3292, + "end": 3453, "loc": { "start": { "line": 93, @@ -2012,8 +2012,8 @@ }, "callee": { "type": "MemberExpression", - "start": 3340, - "end": 3362, + "start": 3292, + "end": 3314, "loc": { "start": { "line": 93, @@ -2026,8 +2026,8 @@ }, "object": { "type": "Identifier", - "start": 3340, - "end": 3347, + "start": 3292, + "end": 3299, "loc": { "start": { "line": 93, @@ -2043,8 +2043,8 @@ }, "property": { "type": "Identifier", - "start": 3348, - "end": 3362, + "start": 3300, + "end": 3314, "loc": { "start": { "line": 93, @@ -2063,8 +2063,8 @@ "arguments": [ { "type": "ThisExpression", - "start": 3363, - "end": 3367, + "start": 3315, + "end": 3319, "loc": { "start": { "line": 93, @@ -2078,8 +2078,8 @@ }, { "type": "StringLiteral", - "start": 3369, - "end": 3380, + "start": 3321, + "end": 3332, "loc": { "start": { "line": 93, @@ -2098,8 +2098,8 @@ }, { "type": "ObjectExpression", - "start": 3382, - "end": 3500, + "start": 3334, + "end": 3452, "loc": { "start": { "line": 93, @@ -2113,8 +2113,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 3396, - "end": 3415, + "start": 3348, + "end": 3367, "loc": { "start": { "line": 94, @@ -2130,8 +2130,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 3396, - "end": 3408, + "start": 3348, + "end": 3360, "loc": { "start": { "line": 94, @@ -2147,8 +2147,8 @@ }, "value": { "type": "BooleanLiteral", - "start": 3410, - "end": 3415, + "start": 3362, + "end": 3367, "loc": { "start": { "line": 94, @@ -2164,8 +2164,8 @@ }, { "type": "ObjectProperty", - "start": 3429, - "end": 3445, + "start": 3381, + "end": 3397, "loc": { "start": { "line": 95, @@ -2181,8 +2181,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 3429, - "end": 3439, + "start": 3381, + "end": 3391, "loc": { "start": { "line": 95, @@ -2198,8 +2198,8 @@ }, "value": { "type": "BooleanLiteral", - "start": 3441, - "end": 3445, + "start": 3393, + "end": 3397, "loc": { "start": { "line": 95, @@ -2215,8 +2215,8 @@ }, { "type": "ObjectProperty", - "start": 3459, - "end": 3489, + "start": 3411, + "end": 3441, "loc": { "start": { "line": 96, @@ -2232,8 +2232,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 3459, - "end": 3462, + "start": 3411, + "end": 3414, "loc": { "start": { "line": 96, @@ -2249,8 +2249,8 @@ }, "value": { "type": "ArrowFunctionExpression", - "start": 3464, - "end": 3489, + "start": 3416, + "end": 3441, "loc": { "start": { "line": 96, @@ -2268,8 +2268,8 @@ "params": [], "body": { "type": "MemberExpression", - "start": 3470, - "end": 3489, + "start": 3422, + "end": 3441, "loc": { "start": { "line": 96, @@ -2282,8 +2282,8 @@ }, "object": { "type": "Identifier", - "start": 3470, - "end": 3479, + "start": 3422, + "end": 3431, "loc": { "start": { "line": 96, @@ -2299,8 +2299,8 @@ }, "property": { "type": "Identifier", - "start": 3480, - "end": 3489, + "start": 3432, + "end": 3441, "loc": { "start": { "line": 96, @@ -2326,8 +2326,8 @@ { "type": "CommentBlock", "value": "*\n * Bot server url. Used to invite the bot in a web group via {@link WebGroup#invite} method.\n * @type {string}\n ", - "start": 3511, - "end": 3653, + "start": 3463, + "end": 3605, "loc": { "start": { "line": 98, @@ -2343,8 +2343,8 @@ }, { "type": "ExpressionStatement", - "start": 3662, - "end": 3683, + "start": 3614, + "end": 3635, "loc": { "start": { "line": 102, @@ -2357,8 +2357,8 @@ }, "expression": { "type": "AssignmentExpression", - "start": 3662, - "end": 3682, + "start": 3614, + "end": 3634, "loc": { "start": { "line": 102, @@ -2372,8 +2372,8 @@ "operator": "=", "left": { "type": "MemberExpression", - "start": 3662, - "end": 3670, + "start": 3614, + "end": 3622, "loc": { "start": { "line": 102, @@ -2386,8 +2386,8 @@ }, "object": { "type": "ThisExpression", - "start": 3662, - "end": 3666, + "start": 3614, + "end": 3618, "loc": { "start": { "line": 102, @@ -2402,8 +2402,8 @@ }, "property": { "type": "Identifier", - "start": 3667, - "end": 3670, + "start": 3619, + "end": 3622, "loc": { "start": { "line": 102, @@ -2422,8 +2422,8 @@ }, "right": { "type": "Identifier", - "start": 3673, - "end": 3682, + "start": 3625, + "end": 3634, "loc": { "start": { "line": 102, @@ -2443,8 +2443,8 @@ { "type": "CommentBlock", "value": "*\n * Bot server url. Used to invite the bot in a web group via {@link WebGroup#invite} method.\n * @type {string}\n ", - "start": 3511, - "end": 3653, + "start": 3463, + "end": 3605, "loc": { "start": { "line": 98, @@ -2460,8 +2460,8 @@ }, { "type": "ExpressionStatement", - "start": 3692, - "end": 3842, + "start": 3644, + "end": 3794, "loc": { "start": { "line": 103, @@ -2474,8 +2474,8 @@ }, "expression": { "type": "CallExpression", - "start": 3692, - "end": 3841, + "start": 3644, + "end": 3793, "loc": { "start": { "line": 103, @@ -2488,8 +2488,8 @@ }, "callee": { "type": "MemberExpression", - "start": 3692, - "end": 3714, + "start": 3644, + "end": 3666, "loc": { "start": { "line": 103, @@ -2502,8 +2502,8 @@ }, "object": { "type": "Identifier", - "start": 3692, - "end": 3699, + "start": 3644, + "end": 3651, "loc": { "start": { "line": 103, @@ -2519,8 +2519,8 @@ }, "property": { "type": "Identifier", - "start": 3700, - "end": 3714, + "start": 3652, + "end": 3666, "loc": { "start": { "line": 103, @@ -2539,8 +2539,8 @@ "arguments": [ { "type": "ThisExpression", - "start": 3715, - "end": 3719, + "start": 3667, + "end": 3671, "loc": { "start": { "line": 103, @@ -2554,8 +2554,8 @@ }, { "type": "StringLiteral", - "start": 3721, - "end": 3726, + "start": 3673, + "end": 3678, "loc": { "start": { "line": 103, @@ -2574,8 +2574,8 @@ }, { "type": "ObjectExpression", - "start": 3728, - "end": 3840, + "start": 3680, + "end": 3792, "loc": { "start": { "line": 103, @@ -2589,8 +2589,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 3742, - "end": 3761, + "start": 3694, + "end": 3713, "loc": { "start": { "line": 104, @@ -2606,8 +2606,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 3742, - "end": 3754, + "start": 3694, + "end": 3706, "loc": { "start": { "line": 104, @@ -2623,8 +2623,8 @@ }, "value": { "type": "BooleanLiteral", - "start": 3756, - "end": 3761, + "start": 3708, + "end": 3713, "loc": { "start": { "line": 104, @@ -2640,8 +2640,8 @@ }, { "type": "ObjectProperty", - "start": 3775, - "end": 3791, + "start": 3727, + "end": 3743, "loc": { "start": { "line": 105, @@ -2657,8 +2657,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 3775, - "end": 3785, + "start": 3727, + "end": 3737, "loc": { "start": { "line": 105, @@ -2674,8 +2674,8 @@ }, "value": { "type": "BooleanLiteral", - "start": 3787, - "end": 3791, + "start": 3739, + "end": 3743, "loc": { "start": { "line": 105, @@ -2691,8 +2691,8 @@ }, { "type": "ObjectProperty", - "start": 3805, - "end": 3829, + "start": 3757, + "end": 3781, "loc": { "start": { "line": 106, @@ -2708,8 +2708,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 3805, - "end": 3808, + "start": 3757, + "end": 3760, "loc": { "start": { "line": 106, @@ -2725,8 +2725,8 @@ }, "value": { "type": "ArrowFunctionExpression", - "start": 3810, - "end": 3829, + "start": 3762, + "end": 3781, "loc": { "start": { "line": 106, @@ -2744,8 +2744,8 @@ "params": [], "body": { "type": "MemberExpression", - "start": 3816, - "end": 3829, + "start": 3768, + "end": 3781, "loc": { "start": { "line": 106, @@ -2758,8 +2758,8 @@ }, "object": { "type": "Identifier", - "start": 3816, - "end": 3825, + "start": 3768, + "end": 3777, "loc": { "start": { "line": 106, @@ -2775,8 +2775,8 @@ }, "property": { "type": "Identifier", - "start": 3826, - "end": 3829, + "start": 3778, + "end": 3781, "loc": { "start": { "line": 106, @@ -2802,8 +2802,8 @@ { "type": "CommentBlock", "value": "*\n * This handler is called when the bot has been invited into a group by one of its members.\n * @type {function(wg: WebGroup)} handler\n ", - "start": 3851, - "end": 4017, + "start": 3803, + "end": 3969, "loc": { "start": { "line": 108, @@ -2819,8 +2819,8 @@ }, { "type": "ExpressionStatement", - "start": 4026, - "end": 4054, + "start": 3978, + "end": 4006, "loc": { "start": { "line": 112, @@ -2833,8 +2833,8 @@ }, "expression": { "type": "AssignmentExpression", - "start": 4026, - "end": 4053, + "start": 3978, + "end": 4005, "loc": { "start": { "line": 112, @@ -2848,8 +2848,8 @@ "operator": "=", "left": { "type": "MemberExpression", - "start": 4026, - "end": 4041, + "start": 3978, + "end": 3993, "loc": { "start": { "line": 112, @@ -2862,8 +2862,8 @@ }, "object": { "type": "ThisExpression", - "start": 4026, - "end": 4030, + "start": 3978, + "end": 3982, "loc": { "start": { "line": 112, @@ -2878,8 +2878,8 @@ }, "property": { "type": "Identifier", - "start": 4031, - "end": 4041, + "start": 3983, + "end": 3993, "loc": { "start": { "line": 112, @@ -2898,8 +2898,8 @@ }, "right": { "type": "Identifier", - "start": 4044, - "end": 4053, + "start": 3996, + "end": 4005, "loc": { "start": { "line": 112, @@ -2919,8 +2919,8 @@ { "type": "CommentBlock", "value": "*\n * This handler is called when the bot has been invited into a group by one of its members.\n * @type {function(wg: WebGroup)} handler\n ", - "start": 3851, - "end": 4017, + "start": 3803, + "end": 3969, "loc": { "start": { "line": 108, @@ -2936,8 +2936,8 @@ }, { "type": "ExpressionStatement", - "start": 4063, - "end": 4554, + "start": 4015, + "end": 4506, "loc": { "start": { "line": 113, @@ -2950,8 +2950,8 @@ }, "expression": { "type": "CallExpression", - "start": 4063, - "end": 4553, + "start": 4015, + "end": 4505, "loc": { "start": { "line": 113, @@ -2964,8 +2964,8 @@ }, "callee": { "type": "MemberExpression", - "start": 4063, - "end": 4085, + "start": 4015, + "end": 4037, "loc": { "start": { "line": 113, @@ -2978,8 +2978,8 @@ }, "object": { "type": "Identifier", - "start": 4063, - "end": 4070, + "start": 4015, + "end": 4022, "loc": { "start": { "line": 113, @@ -2995,8 +2995,8 @@ }, "property": { "type": "Identifier", - "start": 4071, - "end": 4085, + "start": 4023, + "end": 4037, "loc": { "start": { "line": 113, @@ -3015,8 +3015,8 @@ "arguments": [ { "type": "ThisExpression", - "start": 4086, - "end": 4090, + "start": 4038, + "end": 4042, "loc": { "start": { "line": 113, @@ -3030,8 +3030,8 @@ }, { "type": "StringLiteral", - "start": 4092, - "end": 4104, + "start": 4044, + "end": 4056, "loc": { "start": { "line": 113, @@ -3050,8 +3050,8 @@ }, { "type": "ObjectExpression", - "start": 4106, - "end": 4552, + "start": 4058, + "end": 4504, "loc": { "start": { "line": 113, @@ -3065,8 +3065,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 4120, - "end": 4138, + "start": 4072, + "end": 4090, "loc": { "start": { "line": 114, @@ -3082,8 +3082,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 4120, - "end": 4132, + "start": 4072, + "end": 4084, "loc": { "start": { "line": 114, @@ -3099,8 +3099,8 @@ }, "value": { "type": "BooleanLiteral", - "start": 4134, - "end": 4138, + "start": 4086, + "end": 4090, "loc": { "start": { "line": 114, @@ -3116,8 +3116,8 @@ }, { "type": "ObjectProperty", - "start": 4152, - "end": 4168, + "start": 4104, + "end": 4120, "loc": { "start": { "line": 115, @@ -3133,8 +3133,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 4152, - "end": 4162, + "start": 4104, + "end": 4114, "loc": { "start": { "line": 115, @@ -3150,8 +3150,8 @@ }, "value": { "type": "BooleanLiteral", - "start": 4164, - "end": 4168, + "start": 4116, + "end": 4120, "loc": { "start": { "line": 115, @@ -3167,8 +3167,8 @@ }, { "type": "ObjectProperty", - "start": 4182, - "end": 4266, + "start": 4134, + "end": 4218, "loc": { "start": { "line": 116, @@ -3184,8 +3184,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 4182, - "end": 4185, + "start": 4134, + "end": 4137, "loc": { "start": { "line": 116, @@ -3201,8 +3201,8 @@ }, "value": { "type": "ArrowFunctionExpression", - "start": 4187, - "end": 4266, + "start": 4139, + "end": 4218, "loc": { "start": { "line": 116, @@ -3220,8 +3220,8 @@ "params": [], "body": { "type": "ConditionalExpression", - "start": 4194, - "end": 4265, + "start": 4146, + "end": 4217, "loc": { "start": { "line": 116, @@ -3234,8 +3234,8 @@ }, "test": { "type": "BinaryExpression", - "start": 4194, - "end": 4230, + "start": 4146, + "end": 4182, "loc": { "start": { "line": 116, @@ -3248,8 +3248,8 @@ }, "left": { "type": "MemberExpression", - "start": 4194, - "end": 4219, + "start": 4146, + "end": 4171, "loc": { "start": { "line": 116, @@ -3262,8 +3262,8 @@ }, "object": { "type": "MemberExpression", - "start": 4194, - "end": 4214, + "start": 4146, + "end": 4166, "loc": { "start": { "line": 116, @@ -3276,8 +3276,8 @@ }, "object": { "type": "Identifier", - "start": 4194, - "end": 4203, + "start": 4146, + "end": 4155, "loc": { "start": { "line": 116, @@ -3293,8 +3293,8 @@ }, "property": { "type": "Identifier", - "start": 4204, - "end": 4214, + "start": 4156, + "end": 4166, "loc": { "start": { "line": 116, @@ -3312,8 +3312,8 @@ }, "property": { "type": "Identifier", - "start": 4215, - "end": 4219, + "start": 4167, + "end": 4171, "loc": { "start": { "line": 116, @@ -3332,8 +3332,8 @@ "operator": "===", "right": { "type": "StringLiteral", - "start": 4224, - "end": 4230, + "start": 4176, + "end": 4182, "loc": { "start": { "line": 116, @@ -3353,8 +3353,8 @@ }, "consequent": { "type": "Identifier", - "start": 4233, - "end": 4242, + "start": 4185, + "end": 4194, "loc": { "start": { "line": 116, @@ -3370,8 +3370,8 @@ }, "alternate": { "type": "MemberExpression", - "start": 4245, - "end": 4265, + "start": 4197, + "end": 4217, "loc": { "start": { "line": 116, @@ -3384,8 +3384,8 @@ }, "object": { "type": "Identifier", - "start": 4245, - "end": 4254, + "start": 4197, + "end": 4206, "loc": { "start": { "line": 116, @@ -3401,8 +3401,8 @@ }, "property": { "type": "Identifier", - "start": 4255, - "end": 4265, + "start": 4207, + "end": 4217, "loc": { "start": { "line": 116, @@ -3420,15 +3420,15 @@ }, "extra": { "parenthesized": true, - "parenStart": 4193 + "parenStart": 4145 } } } }, { "type": "ObjectProperty", - "start": 4280, - "end": 4541, + "start": 4232, + "end": 4493, "loc": { "start": { "line": 117, @@ -3444,8 +3444,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 4280, - "end": 4283, + "start": 4232, + "end": 4235, "loc": { "start": { "line": 117, @@ -3461,8 +3461,8 @@ }, "value": { "type": "ArrowFunctionExpression", - "start": 4285, - "end": 4541, + "start": 4237, + "end": 4493, "loc": { "start": { "line": 117, @@ -3480,8 +3480,8 @@ "params": [ { "type": "Identifier", - "start": 4286, - "end": 4293, + "start": 4238, + "end": 4245, "loc": { "start": { "line": 117, @@ -3498,8 +3498,8 @@ ], "body": { "type": "BlockStatement", - "start": 4298, - "end": 4541, + "start": 4250, + "end": 4493, "loc": { "start": { "line": 117, @@ -3513,8 +3513,8 @@ "body": [ { "type": "IfStatement", - "start": 4316, - "end": 4527, + "start": 4268, + "end": 4479, "loc": { "start": { "line": 118, @@ -3527,8 +3527,8 @@ }, "test": { "type": "BinaryExpression", - "start": 4320, - "end": 4349, + "start": 4272, + "end": 4301, "loc": { "start": { "line": 118, @@ -3541,8 +3541,8 @@ }, "left": { "type": "UnaryExpression", - "start": 4320, - "end": 4334, + "start": 4272, + "end": 4286, "loc": { "start": { "line": 118, @@ -3557,8 +3557,8 @@ "prefix": true, "argument": { "type": "Identifier", - "start": 4327, - "end": 4334, + "start": 4279, + "end": 4286, "loc": { "start": { "line": 118, @@ -3579,8 +3579,8 @@ "operator": "!==", "right": { "type": "StringLiteral", - "start": 4339, - "end": 4349, + "start": 4291, + "end": 4301, "loc": { "start": { "line": 118, @@ -3600,8 +3600,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 4351, - "end": 4434, + "start": 4303, + "end": 4386, "loc": { "start": { "line": 118, @@ -3615,8 +3615,8 @@ "body": [ { "type": "ExpressionStatement", - "start": 4373, - "end": 4416, + "start": 4325, + "end": 4368, "loc": { "start": { "line": 119, @@ -3629,8 +3629,8 @@ }, "expression": { "type": "AssignmentExpression", - "start": 4373, - "end": 4415, + "start": 4325, + "end": 4367, "loc": { "start": { "line": 119, @@ -3644,8 +3644,8 @@ "operator": "=", "left": { "type": "MemberExpression", - "start": 4373, - "end": 4393, + "start": 4325, + "end": 4345, "loc": { "start": { "line": 119, @@ -3658,8 +3658,8 @@ }, "object": { "type": "Identifier", - "start": 4373, - "end": 4382, + "start": 4325, + "end": 4334, "loc": { "start": { "line": 119, @@ -3675,8 +3675,8 @@ }, "property": { "type": "Identifier", - "start": 4383, - "end": 4393, + "start": 4335, + "end": 4345, "loc": { "start": { "line": 119, @@ -3694,8 +3694,8 @@ }, "right": { "type": "FunctionExpression", - "start": 4396, - "end": 4415, + "start": 4348, + "end": 4367, "loc": { "start": { "line": 119, @@ -3708,8 +3708,8 @@ }, "id": { "type": "Identifier", - "start": 4405, - "end": 4409, + "start": 4357, + "end": 4361, "loc": { "start": { "line": 119, @@ -3729,8 +3729,8 @@ "params": [], "body": { "type": "BlockStatement", - "start": 4412, - "end": 4415, + "start": 4364, + "end": 4367, "loc": { "start": { "line": 119, @@ -3752,8 +3752,8 @@ }, "alternate": { "type": "BlockStatement", - "start": 4456, - "end": 4527, + "start": 4408, + "end": 4479, "loc": { "start": { "line": 121, @@ -3767,8 +3767,8 @@ "body": [ { "type": "ExpressionStatement", - "start": 4478, - "end": 4509, + "start": 4430, + "end": 4461, "loc": { "start": { "line": 122, @@ -3781,8 +3781,8 @@ }, "expression": { "type": "AssignmentExpression", - "start": 4478, - "end": 4508, + "start": 4430, + "end": 4460, "loc": { "start": { "line": 122, @@ -3796,8 +3796,8 @@ "operator": "=", "left": { "type": "MemberExpression", - "start": 4478, - "end": 4498, + "start": 4430, + "end": 4450, "loc": { "start": { "line": 122, @@ -3810,8 +3810,8 @@ }, "object": { "type": "Identifier", - "start": 4478, - "end": 4487, + "start": 4430, + "end": 4439, "loc": { "start": { "line": 122, @@ -3827,8 +3827,8 @@ }, "property": { "type": "Identifier", - "start": 4488, - "end": 4498, + "start": 4440, + "end": 4450, "loc": { "start": { "line": 122, @@ -3846,8 +3846,8 @@ }, "right": { "type": "Identifier", - "start": 4501, - "end": 4508, + "start": 4453, + "end": 4460, "loc": { "start": { "line": 122, @@ -3880,8 +3880,8 @@ { "type": "CommentBlock", "value": "*\n * This handler is called when an error occurs on WebSocket server.\n * @type {function(err: Error)}\n ", - "start": 4563, - "end": 4695, + "start": 4515, + "end": 4647, "loc": { "start": { "line": 126, @@ -3897,8 +3897,8 @@ }, { "type": "ExpressionStatement", - "start": 4704, - "end": 4729, + "start": 4656, + "end": 4681, "loc": { "start": { "line": 130, @@ -3911,8 +3911,8 @@ }, "expression": { "type": "AssignmentExpression", - "start": 4704, - "end": 4728, + "start": 4656, + "end": 4680, "loc": { "start": { "line": 130, @@ -3926,8 +3926,8 @@ "operator": "=", "left": { "type": "MemberExpression", - "start": 4704, - "end": 4716, + "start": 4656, + "end": 4668, "loc": { "start": { "line": 130, @@ -3940,8 +3940,8 @@ }, "object": { "type": "ThisExpression", - "start": 4704, - "end": 4708, + "start": 4656, + "end": 4660, "loc": { "start": { "line": 130, @@ -3956,8 +3956,8 @@ }, "property": { "type": "Identifier", - "start": 4709, - "end": 4716, + "start": 4661, + "end": 4668, "loc": { "start": { "line": 130, @@ -3976,8 +3976,8 @@ }, "right": { "type": "Identifier", - "start": 4719, - "end": 4728, + "start": 4671, + "end": 4680, "loc": { "start": { "line": 130, @@ -3997,8 +3997,8 @@ { "type": "CommentBlock", "value": "*\n * This handler is called when an error occurs on WebSocket server.\n * @type {function(err: Error)}\n ", - "start": 4563, - "end": 4695, + "start": 4515, + "end": 4647, "loc": { "start": { "line": 126, @@ -4014,8 +4014,8 @@ }, { "type": "ExpressionStatement", - "start": 4738, - "end": 5214, + "start": 4690, + "end": 5166, "loc": { "start": { "line": 131, @@ -4028,8 +4028,8 @@ }, "expression": { "type": "CallExpression", - "start": 4738, - "end": 5213, + "start": 4690, + "end": 5165, "loc": { "start": { "line": 131, @@ -4042,8 +4042,8 @@ }, "callee": { "type": "MemberExpression", - "start": 4738, - "end": 4760, + "start": 4690, + "end": 4712, "loc": { "start": { "line": 131, @@ -4056,8 +4056,8 @@ }, "object": { "type": "Identifier", - "start": 4738, - "end": 4745, + "start": 4690, + "end": 4697, "loc": { "start": { "line": 131, @@ -4073,8 +4073,8 @@ }, "property": { "type": "Identifier", - "start": 4746, - "end": 4760, + "start": 4698, + "end": 4712, "loc": { "start": { "line": 131, @@ -4093,8 +4093,8 @@ "arguments": [ { "type": "ThisExpression", - "start": 4761, - "end": 4765, + "start": 4713, + "end": 4717, "loc": { "start": { "line": 131, @@ -4108,8 +4108,8 @@ }, { "type": "StringLiteral", - "start": 4767, - "end": 4776, + "start": 4719, + "end": 4728, "loc": { "start": { "line": 131, @@ -4128,8 +4128,8 @@ }, { "type": "ObjectExpression", - "start": 4778, - "end": 5212, + "start": 4730, + "end": 5164, "loc": { "start": { "line": 131, @@ -4143,8 +4143,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 4792, - "end": 4810, + "start": 4744, + "end": 4762, "loc": { "start": { "line": 132, @@ -4160,8 +4160,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 4792, - "end": 4804, + "start": 4744, + "end": 4756, "loc": { "start": { "line": 132, @@ -4177,8 +4177,8 @@ }, "value": { "type": "BooleanLiteral", - "start": 4806, - "end": 4810, + "start": 4758, + "end": 4762, "loc": { "start": { "line": 132, @@ -4194,8 +4194,8 @@ }, { "type": "ObjectProperty", - "start": 4824, - "end": 4840, + "start": 4776, + "end": 4792, "loc": { "start": { "line": 133, @@ -4211,8 +4211,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 4824, - "end": 4834, + "start": 4776, + "end": 4786, "loc": { "start": { "line": 133, @@ -4228,8 +4228,8 @@ }, "value": { "type": "BooleanLiteral", - "start": 4836, - "end": 4840, + "start": 4788, + "end": 4792, "loc": { "start": { "line": 133, @@ -4245,8 +4245,8 @@ }, { "type": "ObjectProperty", - "start": 4854, - "end": 4932, + "start": 4806, + "end": 4884, "loc": { "start": { "line": 134, @@ -4262,8 +4262,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 4854, - "end": 4857, + "start": 4806, + "end": 4809, "loc": { "start": { "line": 134, @@ -4279,8 +4279,8 @@ }, "value": { "type": "ArrowFunctionExpression", - "start": 4859, - "end": 4932, + "start": 4811, + "end": 4884, "loc": { "start": { "line": 134, @@ -4298,8 +4298,8 @@ "params": [], "body": { "type": "ConditionalExpression", - "start": 4866, - "end": 4931, + "start": 4818, + "end": 4883, "loc": { "start": { "line": 134, @@ -4312,8 +4312,8 @@ }, "test": { "type": "BinaryExpression", - "start": 4866, - "end": 4899, + "start": 4818, + "end": 4851, "loc": { "start": { "line": 134, @@ -4326,8 +4326,8 @@ }, "left": { "type": "MemberExpression", - "start": 4866, - "end": 4888, + "start": 4818, + "end": 4840, "loc": { "start": { "line": 134, @@ -4340,8 +4340,8 @@ }, "object": { "type": "MemberExpression", - "start": 4866, - "end": 4883, + "start": 4818, + "end": 4835, "loc": { "start": { "line": 134, @@ -4354,8 +4354,8 @@ }, "object": { "type": "Identifier", - "start": 4866, - "end": 4875, + "start": 4818, + "end": 4827, "loc": { "start": { "line": 134, @@ -4371,8 +4371,8 @@ }, "property": { "type": "Identifier", - "start": 4876, - "end": 4883, + "start": 4828, + "end": 4835, "loc": { "start": { "line": 134, @@ -4390,8 +4390,8 @@ }, "property": { "type": "Identifier", - "start": 4884, - "end": 4888, + "start": 4836, + "end": 4840, "loc": { "start": { "line": 134, @@ -4410,8 +4410,8 @@ "operator": "===", "right": { "type": "StringLiteral", - "start": 4893, - "end": 4899, + "start": 4845, + "end": 4851, "loc": { "start": { "line": 134, @@ -4431,8 +4431,8 @@ }, "consequent": { "type": "Identifier", - "start": 4902, - "end": 4911, + "start": 4854, + "end": 4863, "loc": { "start": { "line": 134, @@ -4448,8 +4448,8 @@ }, "alternate": { "type": "MemberExpression", - "start": 4914, - "end": 4931, + "start": 4866, + "end": 4883, "loc": { "start": { "line": 134, @@ -4462,8 +4462,8 @@ }, "object": { "type": "Identifier", - "start": 4914, - "end": 4923, + "start": 4866, + "end": 4875, "loc": { "start": { "line": 134, @@ -4479,8 +4479,8 @@ }, "property": { "type": "Identifier", - "start": 4924, - "end": 4931, + "start": 4876, + "end": 4883, "loc": { "start": { "line": 134, @@ -4498,15 +4498,15 @@ }, "extra": { "parenthesized": true, - "parenStart": 4865 + "parenStart": 4817 } } } }, { "type": "ObjectProperty", - "start": 4946, - "end": 5201, + "start": 4898, + "end": 5153, "loc": { "start": { "line": 135, @@ -4522,8 +4522,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 4946, - "end": 4949, + "start": 4898, + "end": 4901, "loc": { "start": { "line": 135, @@ -4539,8 +4539,8 @@ }, "value": { "type": "ArrowFunctionExpression", - "start": 4951, - "end": 5201, + "start": 4903, + "end": 5153, "loc": { "start": { "line": 135, @@ -4558,8 +4558,8 @@ "params": [ { "type": "Identifier", - "start": 4952, - "end": 4959, + "start": 4904, + "end": 4911, "loc": { "start": { "line": 135, @@ -4576,8 +4576,8 @@ ], "body": { "type": "BlockStatement", - "start": 4964, - "end": 5201, + "start": 4916, + "end": 5153, "loc": { "start": { "line": 135, @@ -4591,8 +4591,8 @@ "body": [ { "type": "IfStatement", - "start": 4982, - "end": 5187, + "start": 4934, + "end": 5139, "loc": { "start": { "line": 136, @@ -4605,8 +4605,8 @@ }, "test": { "type": "BinaryExpression", - "start": 4986, - "end": 5015, + "start": 4938, + "end": 4967, "loc": { "start": { "line": 136, @@ -4619,8 +4619,8 @@ }, "left": { "type": "UnaryExpression", - "start": 4986, - "end": 5000, + "start": 4938, + "end": 4952, "loc": { "start": { "line": 136, @@ -4635,8 +4635,8 @@ "prefix": true, "argument": { "type": "Identifier", - "start": 4993, - "end": 5000, + "start": 4945, + "end": 4952, "loc": { "start": { "line": 136, @@ -4657,8 +4657,8 @@ "operator": "!==", "right": { "type": "StringLiteral", - "start": 5005, - "end": 5015, + "start": 4957, + "end": 4967, "loc": { "start": { "line": 136, @@ -4678,8 +4678,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 5017, - "end": 5097, + "start": 4969, + "end": 5049, "loc": { "start": { "line": 136, @@ -4693,8 +4693,8 @@ "body": [ { "type": "ExpressionStatement", - "start": 5039, - "end": 5079, + "start": 4991, + "end": 5031, "loc": { "start": { "line": 137, @@ -4707,8 +4707,8 @@ }, "expression": { "type": "AssignmentExpression", - "start": 5039, - "end": 5078, + "start": 4991, + "end": 5030, "loc": { "start": { "line": 137, @@ -4722,8 +4722,8 @@ "operator": "=", "left": { "type": "MemberExpression", - "start": 5039, - "end": 5056, + "start": 4991, + "end": 5008, "loc": { "start": { "line": 137, @@ -4736,8 +4736,8 @@ }, "object": { "type": "Identifier", - "start": 5039, - "end": 5048, + "start": 4991, + "end": 5000, "loc": { "start": { "line": 137, @@ -4753,8 +4753,8 @@ }, "property": { "type": "Identifier", - "start": 5049, - "end": 5056, + "start": 5001, + "end": 5008, "loc": { "start": { "line": 137, @@ -4772,8 +4772,8 @@ }, "right": { "type": "FunctionExpression", - "start": 5059, - "end": 5078, + "start": 5011, + "end": 5030, "loc": { "start": { "line": 137, @@ -4786,8 +4786,8 @@ }, "id": { "type": "Identifier", - "start": 5068, - "end": 5072, + "start": 5020, + "end": 5024, "loc": { "start": { "line": 137, @@ -4807,8 +4807,8 @@ "params": [], "body": { "type": "BlockStatement", - "start": 5075, - "end": 5078, + "start": 5027, + "end": 5030, "loc": { "start": { "line": 137, @@ -4830,8 +4830,8 @@ }, "alternate": { "type": "BlockStatement", - "start": 5119, - "end": 5187, + "start": 5071, + "end": 5139, "loc": { "start": { "line": 139, @@ -4845,8 +4845,8 @@ "body": [ { "type": "ExpressionStatement", - "start": 5141, - "end": 5169, + "start": 5093, + "end": 5121, "loc": { "start": { "line": 140, @@ -4859,8 +4859,8 @@ }, "expression": { "type": "AssignmentExpression", - "start": 5141, - "end": 5168, + "start": 5093, + "end": 5120, "loc": { "start": { "line": 140, @@ -4874,8 +4874,8 @@ "operator": "=", "left": { "type": "MemberExpression", - "start": 5141, - "end": 5158, + "start": 5093, + "end": 5110, "loc": { "start": { "line": 140, @@ -4888,8 +4888,8 @@ }, "object": { "type": "Identifier", - "start": 5141, - "end": 5150, + "start": 5093, + "end": 5102, "loc": { "start": { "line": 140, @@ -4905,8 +4905,8 @@ }, "property": { "type": "Identifier", - "start": 5151, - "end": 5158, + "start": 5103, + "end": 5110, "loc": { "start": { "line": 140, @@ -4924,8 +4924,8 @@ }, "right": { "type": "Identifier", - "start": 5161, - "end": 5168, + "start": 5113, + "end": 5120, "loc": { "start": { "line": 140, @@ -4961,9 +4961,9 @@ "leadingComments": [ { "type": "CommentBlock", - "value": "*\n * @param {BotOptions} options\n * @param {NodeJSHttpServer|NodeJSHttpsServer} options.server NodeJS http(s) server.\n * @param {string} [options.url] Bot server URL.\n * @param {boolean} [options.perMessageDeflate=false] Enable/disable permessage-deflate.\n * @param {boolean} [options.leaveOnceAlone=false] If true, bot will live (disconnect from the signaling server) if no other peers left in the group.\n * @param {WebGroupOptions} options.webGroupOptions Options for each {@link WebGroup} the bot is member of.\n * @param {Topology} [options.webGroupOptions.topology=Topology.FULL_MESH]\n * @param {string} [options.webGroupOptions.signalingServer='wss://signaling.netflux.coedit.re']\n * @param {RTCConfiguration} [options.webGroupOptions.rtcConfiguration={iceServers: [{urls: 'stun:stun3.l.google.com:19302'}]}]\n * @param {boolean} [options.webGroupOptions.autoRejoin=true]\n ", + "value": "*\n * @param {BotOptions} options\n * @param {HttpServer|HttpsServer} options.server NodeJS http(s) server.\n * @param {string} [options.url] Bot server URL.\n * @param {boolean} [options.perMessageDeflate=false] Enable/disable permessage-deflate.\n * @param {boolean} [options.leaveOnceAlone=false] If true, bot will live (disconnect from the signaling server) if no other peers left in the group.\n * @param {WebGroupOptions} options.webGroupOptions Options for each {@link WebGroup} the bot is member of.\n * @param {Topology} [options.webGroupOptions.topology=Topology.FULL_MESH]\n * @param {string} [options.webGroupOptions.signalingServer='wss://signaling.netflux.coedit.re']\n * @param {RTCConfiguration} [options.webGroupOptions.rtcConfiguration={iceServers: [{urls: 'stun:stun3.l.google.com:19302'}]}]\n * @param {boolean} [options.webGroupOptions.autoRejoin=true]\n ", "start": 1129, - "end": 2054, + "end": 2042, "loc": { "start": { "line": 44, @@ -5040,9 +5040,9 @@ }, { "type": "CommentBlock", - "value": "*\n * @param {BotOptions} options\n * @param {NodeJSHttpServer|NodeJSHttpsServer} options.server NodeJS http(s) server.\n * @param {string} [options.url] Bot server URL.\n * @param {boolean} [options.perMessageDeflate=false] Enable/disable permessage-deflate.\n * @param {boolean} [options.leaveOnceAlone=false] If true, bot will live (disconnect from the signaling server) if no other peers left in the group.\n * @param {WebGroupOptions} options.webGroupOptions Options for each {@link WebGroup} the bot is member of.\n * @param {Topology} [options.webGroupOptions.topology=Topology.FULL_MESH]\n * @param {string} [options.webGroupOptions.signalingServer='wss://signaling.netflux.coedit.re']\n * @param {RTCConfiguration} [options.webGroupOptions.rtcConfiguration={iceServers: [{urls: 'stun:stun3.l.google.com:19302'}]}]\n * @param {boolean} [options.webGroupOptions.autoRejoin=true]\n ", + "value": "*\n * @param {BotOptions} options\n * @param {HttpServer|HttpsServer} options.server NodeJS http(s) server.\n * @param {string} [options.url] Bot server URL.\n * @param {boolean} [options.perMessageDeflate=false] Enable/disable permessage-deflate.\n * @param {boolean} [options.leaveOnceAlone=false] If true, bot will live (disconnect from the signaling server) if no other peers left in the group.\n * @param {WebGroupOptions} options.webGroupOptions Options for each {@link WebGroup} the bot is member of.\n * @param {Topology} [options.webGroupOptions.topology=Topology.FULL_MESH]\n * @param {string} [options.webGroupOptions.signalingServer='wss://signaling.netflux.coedit.re']\n * @param {RTCConfiguration} [options.webGroupOptions.rtcConfiguration={iceServers: [{urls: 'stun:stun3.l.google.com:19302'}]}]\n * @param {boolean} [options.webGroupOptions.autoRejoin=true]\n ", "start": 1129, - "end": 2054, + "end": 2042, "loc": { "start": { "line": 44, @@ -5056,9 +5056,9 @@ }, { "type": "CommentBlock", - "value": "*\n * Read-only NodeJS http server instance.\n * @type {NodeJSHttpServer|NodeJSHttpsServer}\n ", - "start": 2134, - "end": 2253, + "value": "*\n * Read-only NodeJS http server instance.\n * @type {HttpServer|HttpsServer}\n ", + "start": 2122, + "end": 2229, "loc": { "start": { "line": 58, @@ -5072,9 +5072,9 @@ }, { "type": "CommentBlock", - "value": "*\n * Read-only property of WebSocket server: permessage-deflate.\n * @type {NodeJSHttpServer|NodeJSHttpsServer}\n ", - "start": 2460, - "end": 2600, + "value": "*\n * Read-only property of WebSocket server: permessage-deflate.\n * @type {HttpServer|HttpsServer}\n ", + "start": 2436, + "end": 2564, "loc": { "start": { "line": 68, @@ -5088,9 +5088,9 @@ }, { "type": "CommentBlock", - "value": "*\n * Read-only property leaveOnceAlone.\n * @type {NodeJSHttpServer|NodeJSHttpsServer}\n ", - "start": 2840, - "end": 2955, + "value": "*\n * Read-only property leaveOnceAlone.\n * @type {HttpServer|HttpsServer}\n ", + "start": 2804, + "end": 2907, "loc": { "start": { "line": 78, @@ -5105,8 +5105,8 @@ { "type": "CommentBlock", "value": "*\n * Read-only set of web groups the bot is member of.\n * @type {Set}\n ", - "start": 3186, - "end": 3295, + "start": 3138, + "end": 3247, "loc": { "start": { "line": 88, @@ -5121,8 +5121,8 @@ { "type": "CommentBlock", "value": "*\n * Bot server url. Used to invite the bot in a web group via {@link WebGroup#invite} method.\n * @type {string}\n ", - "start": 3511, - "end": 3653, + "start": 3463, + "end": 3605, "loc": { "start": { "line": 98, @@ -5137,8 +5137,8 @@ { "type": "CommentBlock", "value": "*\n * This handler is called when the bot has been invited into a group by one of its members.\n * @type {function(wg: WebGroup)} handler\n ", - "start": 3851, - "end": 4017, + "start": 3803, + "end": 3969, "loc": { "start": { "line": 108, @@ -5153,8 +5153,8 @@ { "type": "CommentBlock", "value": "*\n * This handler is called when an error occurs on WebSocket server.\n * @type {function(err: Error)}\n ", - "start": 4563, - "end": 4695, + "start": 4515, + "end": 4647, "loc": { "start": { "line": 126, @@ -5608,9 +5608,9 @@ }, { "type": "CommentBlock", - "value": "*\n * @param {BotOptions} options\n * @param {NodeJSHttpServer|NodeJSHttpsServer} options.server NodeJS http(s) server.\n * @param {string} [options.url] Bot server URL.\n * @param {boolean} [options.perMessageDeflate=false] Enable/disable permessage-deflate.\n * @param {boolean} [options.leaveOnceAlone=false] If true, bot will live (disconnect from the signaling server) if no other peers left in the group.\n * @param {WebGroupOptions} options.webGroupOptions Options for each {@link WebGroup} the bot is member of.\n * @param {Topology} [options.webGroupOptions.topology=Topology.FULL_MESH]\n * @param {string} [options.webGroupOptions.signalingServer='wss://signaling.netflux.coedit.re']\n * @param {RTCConfiguration} [options.webGroupOptions.rtcConfiguration={iceServers: [{urls: 'stun:stun3.l.google.com:19302'}]}]\n * @param {boolean} [options.webGroupOptions.autoRejoin=true]\n ", + "value": "*\n * @param {BotOptions} options\n * @param {HttpServer|HttpsServer} options.server NodeJS http(s) server.\n * @param {string} [options.url] Bot server URL.\n * @param {boolean} [options.perMessageDeflate=false] Enable/disable permessage-deflate.\n * @param {boolean} [options.leaveOnceAlone=false] If true, bot will live (disconnect from the signaling server) if no other peers left in the group.\n * @param {WebGroupOptions} options.webGroupOptions Options for each {@link WebGroup} the bot is member of.\n * @param {Topology} [options.webGroupOptions.topology=Topology.FULL_MESH]\n * @param {string} [options.webGroupOptions.signalingServer='wss://signaling.netflux.coedit.re']\n * @param {RTCConfiguration} [options.webGroupOptions.rtcConfiguration={iceServers: [{urls: 'stun:stun3.l.google.com:19302'}]}]\n * @param {boolean} [options.webGroupOptions.autoRejoin=true]\n ", "start": 1129, - "end": 2054, + "end": 2042, "loc": { "start": { "line": 44, @@ -5635,8 +5635,8 @@ "binop": null }, "value": "constructor", - "start": 2059, - "end": 2070, + "start": 2047, + "end": 2058, "loc": { "start": { "line": 56, @@ -5660,8 +5660,8 @@ "postfix": false, "binop": null }, - "start": 2070, - "end": 2071, + "start": 2058, + "end": 2059, "loc": { "start": { "line": 56, @@ -5686,8 +5686,8 @@ "binop": null }, "value": "options", - "start": 2071, - "end": 2078, + "start": 2059, + "end": 2066, "loc": { "start": { "line": 56, @@ -5711,8 +5711,8 @@ "postfix": false, "binop": null }, - "start": 2078, - "end": 2079, + "start": 2066, + "end": 2067, "loc": { "start": { "line": 56, @@ -5736,8 +5736,8 @@ "postfix": false, "binop": null }, - "start": 2080, - "end": 2081, + "start": 2068, + "end": 2069, "loc": { "start": { "line": 56, @@ -5762,8 +5762,8 @@ "binop": null }, "value": "botServer", - "start": 2090, - "end": 2099, + "start": 2078, + "end": 2087, "loc": { "start": { "line": 57, @@ -5789,8 +5789,8 @@ "updateContext": null }, "value": "=", - "start": 2100, - "end": 2101, + "start": 2088, + "end": 2089, "loc": { "start": { "line": 57, @@ -5817,8 +5817,8 @@ "updateContext": null }, "value": "new", - "start": 2102, - "end": 2105, + "start": 2090, + "end": 2093, "loc": { "start": { "line": 57, @@ -5843,8 +5843,8 @@ "binop": null }, "value": "BotServer", - "start": 2106, - "end": 2115, + "start": 2094, + "end": 2103, "loc": { "start": { "line": 57, @@ -5868,8 +5868,8 @@ "postfix": false, "binop": null }, - "start": 2115, - "end": 2116, + "start": 2103, + "end": 2104, "loc": { "start": { "line": 57, @@ -5894,8 +5894,8 @@ "binop": null }, "value": "options", - "start": 2116, - "end": 2123, + "start": 2104, + "end": 2111, "loc": { "start": { "line": 57, @@ -5919,8 +5919,8 @@ "postfix": false, "binop": null }, - "start": 2123, - "end": 2124, + "start": 2111, + "end": 2112, "loc": { "start": { "line": 57, @@ -5945,8 +5945,8 @@ "binop": null, "updateContext": null }, - "start": 2124, - "end": 2125, + "start": 2112, + "end": 2113, "loc": { "start": { "line": 57, @@ -5960,9 +5960,9 @@ }, { "type": "CommentBlock", - "value": "*\n * Read-only NodeJS http server instance.\n * @type {NodeJSHttpServer|NodeJSHttpsServer}\n ", - "start": 2134, - "end": 2253, + "value": "*\n * Read-only NodeJS http server instance.\n * @type {HttpServer|HttpsServer}\n ", + "start": 2122, + "end": 2229, "loc": { "start": { "line": 58, @@ -5989,8 +5989,8 @@ "updateContext": null }, "value": "this", - "start": 2262, - "end": 2266, + "start": 2238, + "end": 2242, "loc": { "start": { "line": 62, @@ -6015,8 +6015,8 @@ "binop": null, "updateContext": null }, - "start": 2266, - "end": 2267, + "start": 2242, + "end": 2243, "loc": { "start": { "line": 62, @@ -6041,8 +6041,8 @@ "binop": null }, "value": "server", - "start": 2267, - "end": 2273, + "start": 2243, + "end": 2249, "loc": { "start": { "line": 62, @@ -6068,8 +6068,8 @@ "updateContext": null }, "value": "=", - "start": 2274, - "end": 2275, + "start": 2250, + "end": 2251, "loc": { "start": { "line": 62, @@ -6094,8 +6094,8 @@ "binop": null }, "value": "undefined", - "start": 2276, - "end": 2285, + "start": 2252, + "end": 2261, "loc": { "start": { "line": 62, @@ -6120,8 +6120,8 @@ "binop": null, "updateContext": null }, - "start": 2285, - "end": 2286, + "start": 2261, + "end": 2262, "loc": { "start": { "line": 62, @@ -6146,8 +6146,8 @@ "binop": null }, "value": "Reflect", - "start": 2295, - "end": 2302, + "start": 2271, + "end": 2278, "loc": { "start": { "line": 63, @@ -6172,8 +6172,8 @@ "binop": null, "updateContext": null }, - "start": 2302, - "end": 2303, + "start": 2278, + "end": 2279, "loc": { "start": { "line": 63, @@ -6198,8 +6198,8 @@ "binop": null }, "value": "defineProperty", - "start": 2303, - "end": 2317, + "start": 2279, + "end": 2293, "loc": { "start": { "line": 63, @@ -6223,8 +6223,8 @@ "postfix": false, "binop": null }, - "start": 2317, - "end": 2318, + "start": 2293, + "end": 2294, "loc": { "start": { "line": 63, @@ -6251,8 +6251,8 @@ "updateContext": null }, "value": "this", - "start": 2318, - "end": 2322, + "start": 2294, + "end": 2298, "loc": { "start": { "line": 63, @@ -6277,8 +6277,8 @@ "binop": null, "updateContext": null }, - "start": 2322, - "end": 2323, + "start": 2298, + "end": 2299, "loc": { "start": { "line": 63, @@ -6304,8 +6304,8 @@ "updateContext": null }, "value": "server", - "start": 2324, - "end": 2332, + "start": 2300, + "end": 2308, "loc": { "start": { "line": 63, @@ -6330,8 +6330,8 @@ "binop": null, "updateContext": null }, - "start": 2332, - "end": 2333, + "start": 2308, + "end": 2309, "loc": { "start": { "line": 63, @@ -6355,8 +6355,8 @@ "postfix": false, "binop": null }, - "start": 2334, - "end": 2335, + "start": 2310, + "end": 2311, "loc": { "start": { "line": 63, @@ -6381,8 +6381,8 @@ "binop": null }, "value": "configurable", - "start": 2348, - "end": 2360, + "start": 2324, + "end": 2336, "loc": { "start": { "line": 64, @@ -6407,8 +6407,8 @@ "binop": null, "updateContext": null }, - "start": 2360, - "end": 2361, + "start": 2336, + "end": 2337, "loc": { "start": { "line": 64, @@ -6435,8 +6435,8 @@ "updateContext": null }, "value": "false", - "start": 2362, - "end": 2367, + "start": 2338, + "end": 2343, "loc": { "start": { "line": 64, @@ -6461,8 +6461,8 @@ "binop": null, "updateContext": null }, - "start": 2367, - "end": 2368, + "start": 2343, + "end": 2344, "loc": { "start": { "line": 64, @@ -6487,8 +6487,8 @@ "binop": null }, "value": "enumerable", - "start": 2381, - "end": 2391, + "start": 2357, + "end": 2367, "loc": { "start": { "line": 65, @@ -6513,8 +6513,8 @@ "binop": null, "updateContext": null }, - "start": 2391, - "end": 2392, + "start": 2367, + "end": 2368, "loc": { "start": { "line": 65, @@ -6541,8 +6541,8 @@ "updateContext": null }, "value": "true", - "start": 2393, - "end": 2397, + "start": 2369, + "end": 2373, "loc": { "start": { "line": 65, @@ -6567,8 +6567,8 @@ "binop": null, "updateContext": null }, - "start": 2397, - "end": 2398, + "start": 2373, + "end": 2374, "loc": { "start": { "line": 65, @@ -6593,8 +6593,8 @@ "binop": null }, "value": "get", - "start": 2411, - "end": 2414, + "start": 2387, + "end": 2390, "loc": { "start": { "line": 66, @@ -6619,8 +6619,8 @@ "binop": null, "updateContext": null }, - "start": 2414, - "end": 2415, + "start": 2390, + "end": 2391, "loc": { "start": { "line": 66, @@ -6644,8 +6644,8 @@ "postfix": false, "binop": null }, - "start": 2416, - "end": 2417, + "start": 2392, + "end": 2393, "loc": { "start": { "line": 66, @@ -6669,8 +6669,8 @@ "postfix": false, "binop": null }, - "start": 2417, - "end": 2418, + "start": 2393, + "end": 2394, "loc": { "start": { "line": 66, @@ -6695,8 +6695,8 @@ "binop": null, "updateContext": null }, - "start": 2419, - "end": 2421, + "start": 2395, + "end": 2397, "loc": { "start": { "line": 66, @@ -6721,8 +6721,8 @@ "binop": null }, "value": "botServer", - "start": 2422, - "end": 2431, + "start": 2398, + "end": 2407, "loc": { "start": { "line": 66, @@ -6747,8 +6747,8 @@ "binop": null, "updateContext": null }, - "start": 2431, - "end": 2432, + "start": 2407, + "end": 2408, "loc": { "start": { "line": 66, @@ -6773,8 +6773,8 @@ "binop": null }, "value": "server", - "start": 2432, - "end": 2438, + "start": 2408, + "end": 2414, "loc": { "start": { "line": 66, @@ -6799,8 +6799,8 @@ "binop": null, "updateContext": null }, - "start": 2438, - "end": 2439, + "start": 2414, + "end": 2415, "loc": { "start": { "line": 66, @@ -6824,8 +6824,8 @@ "postfix": false, "binop": null }, - "start": 2448, - "end": 2449, + "start": 2424, + "end": 2425, "loc": { "start": { "line": 67, @@ -6849,8 +6849,8 @@ "postfix": false, "binop": null }, - "start": 2449, - "end": 2450, + "start": 2425, + "end": 2426, "loc": { "start": { "line": 67, @@ -6875,8 +6875,8 @@ "binop": null, "updateContext": null }, - "start": 2450, - "end": 2451, + "start": 2426, + "end": 2427, "loc": { "start": { "line": 67, @@ -6890,9 +6890,9 @@ }, { "type": "CommentBlock", - "value": "*\n * Read-only property of WebSocket server: permessage-deflate.\n * @type {NodeJSHttpServer|NodeJSHttpsServer}\n ", - "start": 2460, - "end": 2600, + "value": "*\n * Read-only property of WebSocket server: permessage-deflate.\n * @type {HttpServer|HttpsServer}\n ", + "start": 2436, + "end": 2564, "loc": { "start": { "line": 68, @@ -6919,8 +6919,8 @@ "updateContext": null }, "value": "this", - "start": 2609, - "end": 2613, + "start": 2573, + "end": 2577, "loc": { "start": { "line": 72, @@ -6945,8 +6945,8 @@ "binop": null, "updateContext": null }, - "start": 2613, - "end": 2614, + "start": 2577, + "end": 2578, "loc": { "start": { "line": 72, @@ -6971,8 +6971,8 @@ "binop": null }, "value": "perMessageDeflate", - "start": 2614, - "end": 2631, + "start": 2578, + "end": 2595, "loc": { "start": { "line": 72, @@ -6998,8 +6998,8 @@ "updateContext": null }, "value": "=", - "start": 2632, - "end": 2633, + "start": 2596, + "end": 2597, "loc": { "start": { "line": 72, @@ -7024,8 +7024,8 @@ "binop": null }, "value": "undefined", - "start": 2634, - "end": 2643, + "start": 2598, + "end": 2607, "loc": { "start": { "line": 72, @@ -7050,8 +7050,8 @@ "binop": null, "updateContext": null }, - "start": 2643, - "end": 2644, + "start": 2607, + "end": 2608, "loc": { "start": { "line": 72, @@ -7076,8 +7076,8 @@ "binop": null }, "value": "Reflect", - "start": 2653, - "end": 2660, + "start": 2617, + "end": 2624, "loc": { "start": { "line": 73, @@ -7102,8 +7102,8 @@ "binop": null, "updateContext": null }, - "start": 2660, - "end": 2661, + "start": 2624, + "end": 2625, "loc": { "start": { "line": 73, @@ -7128,8 +7128,8 @@ "binop": null }, "value": "defineProperty", - "start": 2661, - "end": 2675, + "start": 2625, + "end": 2639, "loc": { "start": { "line": 73, @@ -7153,8 +7153,8 @@ "postfix": false, "binop": null }, - "start": 2675, - "end": 2676, + "start": 2639, + "end": 2640, "loc": { "start": { "line": 73, @@ -7181,8 +7181,8 @@ "updateContext": null }, "value": "this", - "start": 2676, - "end": 2680, + "start": 2640, + "end": 2644, "loc": { "start": { "line": 73, @@ -7207,8 +7207,8 @@ "binop": null, "updateContext": null }, - "start": 2680, - "end": 2681, + "start": 2644, + "end": 2645, "loc": { "start": { "line": 73, @@ -7234,8 +7234,8 @@ "updateContext": null }, "value": "perMessageDeflate", - "start": 2682, - "end": 2701, + "start": 2646, + "end": 2665, "loc": { "start": { "line": 73, @@ -7260,8 +7260,8 @@ "binop": null, "updateContext": null }, - "start": 2701, - "end": 2702, + "start": 2665, + "end": 2666, "loc": { "start": { "line": 73, @@ -7285,8 +7285,8 @@ "postfix": false, "binop": null }, - "start": 2703, - "end": 2704, + "start": 2667, + "end": 2668, "loc": { "start": { "line": 73, @@ -7311,8 +7311,8 @@ "binop": null }, "value": "configurable", - "start": 2717, - "end": 2729, + "start": 2681, + "end": 2693, "loc": { "start": { "line": 74, @@ -7337,8 +7337,8 @@ "binop": null, "updateContext": null }, - "start": 2729, - "end": 2730, + "start": 2693, + "end": 2694, "loc": { "start": { "line": 74, @@ -7365,8 +7365,8 @@ "updateContext": null }, "value": "false", - "start": 2731, - "end": 2736, + "start": 2695, + "end": 2700, "loc": { "start": { "line": 74, @@ -7391,8 +7391,8 @@ "binop": null, "updateContext": null }, - "start": 2736, - "end": 2737, + "start": 2700, + "end": 2701, "loc": { "start": { "line": 74, @@ -7417,8 +7417,8 @@ "binop": null }, "value": "enumerable", - "start": 2750, - "end": 2760, + "start": 2714, + "end": 2724, "loc": { "start": { "line": 75, @@ -7443,8 +7443,8 @@ "binop": null, "updateContext": null }, - "start": 2760, - "end": 2761, + "start": 2724, + "end": 2725, "loc": { "start": { "line": 75, @@ -7471,8 +7471,8 @@ "updateContext": null }, "value": "true", - "start": 2762, - "end": 2766, + "start": 2726, + "end": 2730, "loc": { "start": { "line": 75, @@ -7497,8 +7497,8 @@ "binop": null, "updateContext": null }, - "start": 2766, - "end": 2767, + "start": 2730, + "end": 2731, "loc": { "start": { "line": 75, @@ -7523,8 +7523,8 @@ "binop": null }, "value": "get", - "start": 2780, - "end": 2783, + "start": 2744, + "end": 2747, "loc": { "start": { "line": 76, @@ -7549,8 +7549,8 @@ "binop": null, "updateContext": null }, - "start": 2783, - "end": 2784, + "start": 2747, + "end": 2748, "loc": { "start": { "line": 76, @@ -7574,8 +7574,8 @@ "postfix": false, "binop": null }, - "start": 2785, - "end": 2786, + "start": 2749, + "end": 2750, "loc": { "start": { "line": 76, @@ -7599,8 +7599,8 @@ "postfix": false, "binop": null }, - "start": 2786, - "end": 2787, + "start": 2750, + "end": 2751, "loc": { "start": { "line": 76, @@ -7625,8 +7625,8 @@ "binop": null, "updateContext": null }, - "start": 2788, - "end": 2790, + "start": 2752, + "end": 2754, "loc": { "start": { "line": 76, @@ -7651,8 +7651,8 @@ "binop": null }, "value": "botServer", - "start": 2791, - "end": 2800, + "start": 2755, + "end": 2764, "loc": { "start": { "line": 76, @@ -7677,8 +7677,8 @@ "binop": null, "updateContext": null }, - "start": 2800, - "end": 2801, + "start": 2764, + "end": 2765, "loc": { "start": { "line": 76, @@ -7703,8 +7703,8 @@ "binop": null }, "value": "perMessageDeflate", - "start": 2801, - "end": 2818, + "start": 2765, + "end": 2782, "loc": { "start": { "line": 76, @@ -7729,8 +7729,8 @@ "binop": null, "updateContext": null }, - "start": 2818, - "end": 2819, + "start": 2782, + "end": 2783, "loc": { "start": { "line": 76, @@ -7754,8 +7754,8 @@ "postfix": false, "binop": null }, - "start": 2828, - "end": 2829, + "start": 2792, + "end": 2793, "loc": { "start": { "line": 77, @@ -7779,8 +7779,8 @@ "postfix": false, "binop": null }, - "start": 2829, - "end": 2830, + "start": 2793, + "end": 2794, "loc": { "start": { "line": 77, @@ -7805,8 +7805,8 @@ "binop": null, "updateContext": null }, - "start": 2830, - "end": 2831, + "start": 2794, + "end": 2795, "loc": { "start": { "line": 77, @@ -7820,9 +7820,9 @@ }, { "type": "CommentBlock", - "value": "*\n * Read-only property leaveOnceAlone.\n * @type {NodeJSHttpServer|NodeJSHttpsServer}\n ", - "start": 2840, - "end": 2955, + "value": "*\n * Read-only property leaveOnceAlone.\n * @type {HttpServer|HttpsServer}\n ", + "start": 2804, + "end": 2907, "loc": { "start": { "line": 78, @@ -7849,8 +7849,8 @@ "updateContext": null }, "value": "this", - "start": 2964, - "end": 2968, + "start": 2916, + "end": 2920, "loc": { "start": { "line": 82, @@ -7875,8 +7875,8 @@ "binop": null, "updateContext": null }, - "start": 2968, - "end": 2969, + "start": 2920, + "end": 2921, "loc": { "start": { "line": 82, @@ -7901,8 +7901,8 @@ "binop": null }, "value": "leaveOnceAlone", - "start": 2969, - "end": 2983, + "start": 2921, + "end": 2935, "loc": { "start": { "line": 82, @@ -7928,8 +7928,8 @@ "updateContext": null }, "value": "=", - "start": 2984, - "end": 2985, + "start": 2936, + "end": 2937, "loc": { "start": { "line": 82, @@ -7954,8 +7954,8 @@ "binop": null }, "value": "undefined", - "start": 2986, - "end": 2995, + "start": 2938, + "end": 2947, "loc": { "start": { "line": 82, @@ -7980,8 +7980,8 @@ "binop": null, "updateContext": null }, - "start": 2995, - "end": 2996, + "start": 2947, + "end": 2948, "loc": { "start": { "line": 82, @@ -8006,8 +8006,8 @@ "binop": null }, "value": "Reflect", - "start": 3005, - "end": 3012, + "start": 2957, + "end": 2964, "loc": { "start": { "line": 83, @@ -8032,8 +8032,8 @@ "binop": null, "updateContext": null }, - "start": 3012, - "end": 3013, + "start": 2964, + "end": 2965, "loc": { "start": { "line": 83, @@ -8058,8 +8058,8 @@ "binop": null }, "value": "defineProperty", - "start": 3013, - "end": 3027, + "start": 2965, + "end": 2979, "loc": { "start": { "line": 83, @@ -8083,8 +8083,8 @@ "postfix": false, "binop": null }, - "start": 3027, - "end": 3028, + "start": 2979, + "end": 2980, "loc": { "start": { "line": 83, @@ -8111,8 +8111,8 @@ "updateContext": null }, "value": "this", - "start": 3028, - "end": 3032, + "start": 2980, + "end": 2984, "loc": { "start": { "line": 83, @@ -8137,8 +8137,8 @@ "binop": null, "updateContext": null }, - "start": 3032, - "end": 3033, + "start": 2984, + "end": 2985, "loc": { "start": { "line": 83, @@ -8164,8 +8164,8 @@ "updateContext": null }, "value": "leaveOnceAlone", - "start": 3034, - "end": 3050, + "start": 2986, + "end": 3002, "loc": { "start": { "line": 83, @@ -8190,8 +8190,8 @@ "binop": null, "updateContext": null }, - "start": 3050, - "end": 3051, + "start": 3002, + "end": 3003, "loc": { "start": { "line": 83, @@ -8215,8 +8215,8 @@ "postfix": false, "binop": null }, - "start": 3052, - "end": 3053, + "start": 3004, + "end": 3005, "loc": { "start": { "line": 83, @@ -8241,8 +8241,8 @@ "binop": null }, "value": "configurable", - "start": 3066, - "end": 3078, + "start": 3018, + "end": 3030, "loc": { "start": { "line": 84, @@ -8267,8 +8267,8 @@ "binop": null, "updateContext": null }, - "start": 3078, - "end": 3079, + "start": 3030, + "end": 3031, "loc": { "start": { "line": 84, @@ -8295,8 +8295,8 @@ "updateContext": null }, "value": "false", - "start": 3080, - "end": 3085, + "start": 3032, + "end": 3037, "loc": { "start": { "line": 84, @@ -8321,8 +8321,8 @@ "binop": null, "updateContext": null }, - "start": 3085, - "end": 3086, + "start": 3037, + "end": 3038, "loc": { "start": { "line": 84, @@ -8347,8 +8347,8 @@ "binop": null }, "value": "enumerable", - "start": 3099, - "end": 3109, + "start": 3051, + "end": 3061, "loc": { "start": { "line": 85, @@ -8373,8 +8373,8 @@ "binop": null, "updateContext": null }, - "start": 3109, - "end": 3110, + "start": 3061, + "end": 3062, "loc": { "start": { "line": 85, @@ -8401,8 +8401,8 @@ "updateContext": null }, "value": "true", - "start": 3111, - "end": 3115, + "start": 3063, + "end": 3067, "loc": { "start": { "line": 85, @@ -8427,8 +8427,8 @@ "binop": null, "updateContext": null }, - "start": 3115, - "end": 3116, + "start": 3067, + "end": 3068, "loc": { "start": { "line": 85, @@ -8453,8 +8453,8 @@ "binop": null }, "value": "get", - "start": 3129, - "end": 3132, + "start": 3081, + "end": 3084, "loc": { "start": { "line": 86, @@ -8479,8 +8479,8 @@ "binop": null, "updateContext": null }, - "start": 3132, - "end": 3133, + "start": 3084, + "end": 3085, "loc": { "start": { "line": 86, @@ -8504,8 +8504,8 @@ "postfix": false, "binop": null }, - "start": 3134, - "end": 3135, + "start": 3086, + "end": 3087, "loc": { "start": { "line": 86, @@ -8529,8 +8529,8 @@ "postfix": false, "binop": null }, - "start": 3135, - "end": 3136, + "start": 3087, + "end": 3088, "loc": { "start": { "line": 86, @@ -8555,8 +8555,8 @@ "binop": null, "updateContext": null }, - "start": 3137, - "end": 3139, + "start": 3089, + "end": 3091, "loc": { "start": { "line": 86, @@ -8581,8 +8581,8 @@ "binop": null }, "value": "botServer", - "start": 3140, - "end": 3149, + "start": 3092, + "end": 3101, "loc": { "start": { "line": 86, @@ -8607,8 +8607,8 @@ "binop": null, "updateContext": null }, - "start": 3149, - "end": 3150, + "start": 3101, + "end": 3102, "loc": { "start": { "line": 86, @@ -8633,8 +8633,8 @@ "binop": null }, "value": "leaveOnceAlone", - "start": 3150, - "end": 3164, + "start": 3102, + "end": 3116, "loc": { "start": { "line": 86, @@ -8659,8 +8659,8 @@ "binop": null, "updateContext": null }, - "start": 3164, - "end": 3165, + "start": 3116, + "end": 3117, "loc": { "start": { "line": 86, @@ -8684,8 +8684,8 @@ "postfix": false, "binop": null }, - "start": 3174, - "end": 3175, + "start": 3126, + "end": 3127, "loc": { "start": { "line": 87, @@ -8709,8 +8709,8 @@ "postfix": false, "binop": null }, - "start": 3175, - "end": 3176, + "start": 3127, + "end": 3128, "loc": { "start": { "line": 87, @@ -8735,8 +8735,8 @@ "binop": null, "updateContext": null }, - "start": 3176, - "end": 3177, + "start": 3128, + "end": 3129, "loc": { "start": { "line": 87, @@ -8751,8 +8751,8 @@ { "type": "CommentBlock", "value": "*\n * Read-only set of web groups the bot is member of.\n * @type {Set}\n ", - "start": 3186, - "end": 3295, + "start": 3138, + "end": 3247, "loc": { "start": { "line": 88, @@ -8779,8 +8779,8 @@ "updateContext": null }, "value": "this", - "start": 3304, - "end": 3308, + "start": 3256, + "end": 3260, "loc": { "start": { "line": 92, @@ -8805,8 +8805,8 @@ "binop": null, "updateContext": null }, - "start": 3308, - "end": 3309, + "start": 3260, + "end": 3261, "loc": { "start": { "line": 92, @@ -8831,8 +8831,8 @@ "binop": null }, "value": "webGroups", - "start": 3309, - "end": 3318, + "start": 3261, + "end": 3270, "loc": { "start": { "line": 92, @@ -8858,8 +8858,8 @@ "updateContext": null }, "value": "=", - "start": 3319, - "end": 3320, + "start": 3271, + "end": 3272, "loc": { "start": { "line": 92, @@ -8884,8 +8884,8 @@ "binop": null }, "value": "undefined", - "start": 3321, - "end": 3330, + "start": 3273, + "end": 3282, "loc": { "start": { "line": 92, @@ -8910,8 +8910,8 @@ "binop": null, "updateContext": null }, - "start": 3330, - "end": 3331, + "start": 3282, + "end": 3283, "loc": { "start": { "line": 92, @@ -8936,8 +8936,8 @@ "binop": null }, "value": "Reflect", - "start": 3340, - "end": 3347, + "start": 3292, + "end": 3299, "loc": { "start": { "line": 93, @@ -8962,8 +8962,8 @@ "binop": null, "updateContext": null }, - "start": 3347, - "end": 3348, + "start": 3299, + "end": 3300, "loc": { "start": { "line": 93, @@ -8988,8 +8988,8 @@ "binop": null }, "value": "defineProperty", - "start": 3348, - "end": 3362, + "start": 3300, + "end": 3314, "loc": { "start": { "line": 93, @@ -9013,8 +9013,8 @@ "postfix": false, "binop": null }, - "start": 3362, - "end": 3363, + "start": 3314, + "end": 3315, "loc": { "start": { "line": 93, @@ -9041,8 +9041,8 @@ "updateContext": null }, "value": "this", - "start": 3363, - "end": 3367, + "start": 3315, + "end": 3319, "loc": { "start": { "line": 93, @@ -9067,8 +9067,8 @@ "binop": null, "updateContext": null }, - "start": 3367, - "end": 3368, + "start": 3319, + "end": 3320, "loc": { "start": { "line": 93, @@ -9094,8 +9094,8 @@ "updateContext": null }, "value": "webGroups", - "start": 3369, - "end": 3380, + "start": 3321, + "end": 3332, "loc": { "start": { "line": 93, @@ -9120,8 +9120,8 @@ "binop": null, "updateContext": null }, - "start": 3380, - "end": 3381, + "start": 3332, + "end": 3333, "loc": { "start": { "line": 93, @@ -9145,8 +9145,8 @@ "postfix": false, "binop": null }, - "start": 3382, - "end": 3383, + "start": 3334, + "end": 3335, "loc": { "start": { "line": 93, @@ -9171,8 +9171,8 @@ "binop": null }, "value": "configurable", - "start": 3396, - "end": 3408, + "start": 3348, + "end": 3360, "loc": { "start": { "line": 94, @@ -9197,8 +9197,8 @@ "binop": null, "updateContext": null }, - "start": 3408, - "end": 3409, + "start": 3360, + "end": 3361, "loc": { "start": { "line": 94, @@ -9225,8 +9225,8 @@ "updateContext": null }, "value": "false", - "start": 3410, - "end": 3415, + "start": 3362, + "end": 3367, "loc": { "start": { "line": 94, @@ -9251,8 +9251,8 @@ "binop": null, "updateContext": null }, - "start": 3415, - "end": 3416, + "start": 3367, + "end": 3368, "loc": { "start": { "line": 94, @@ -9277,8 +9277,8 @@ "binop": null }, "value": "enumerable", - "start": 3429, - "end": 3439, + "start": 3381, + "end": 3391, "loc": { "start": { "line": 95, @@ -9303,8 +9303,8 @@ "binop": null, "updateContext": null }, - "start": 3439, - "end": 3440, + "start": 3391, + "end": 3392, "loc": { "start": { "line": 95, @@ -9331,8 +9331,8 @@ "updateContext": null }, "value": "true", - "start": 3441, - "end": 3445, + "start": 3393, + "end": 3397, "loc": { "start": { "line": 95, @@ -9357,8 +9357,8 @@ "binop": null, "updateContext": null }, - "start": 3445, - "end": 3446, + "start": 3397, + "end": 3398, "loc": { "start": { "line": 95, @@ -9383,8 +9383,8 @@ "binop": null }, "value": "get", - "start": 3459, - "end": 3462, + "start": 3411, + "end": 3414, "loc": { "start": { "line": 96, @@ -9409,8 +9409,8 @@ "binop": null, "updateContext": null }, - "start": 3462, - "end": 3463, + "start": 3414, + "end": 3415, "loc": { "start": { "line": 96, @@ -9434,8 +9434,8 @@ "postfix": false, "binop": null }, - "start": 3464, - "end": 3465, + "start": 3416, + "end": 3417, "loc": { "start": { "line": 96, @@ -9459,8 +9459,8 @@ "postfix": false, "binop": null }, - "start": 3465, - "end": 3466, + "start": 3417, + "end": 3418, "loc": { "start": { "line": 96, @@ -9485,8 +9485,8 @@ "binop": null, "updateContext": null }, - "start": 3467, - "end": 3469, + "start": 3419, + "end": 3421, "loc": { "start": { "line": 96, @@ -9511,8 +9511,8 @@ "binop": null }, "value": "botServer", - "start": 3470, - "end": 3479, + "start": 3422, + "end": 3431, "loc": { "start": { "line": 96, @@ -9537,8 +9537,8 @@ "binop": null, "updateContext": null }, - "start": 3479, - "end": 3480, + "start": 3431, + "end": 3432, "loc": { "start": { "line": 96, @@ -9563,8 +9563,8 @@ "binop": null }, "value": "webGroups", - "start": 3480, - "end": 3489, + "start": 3432, + "end": 3441, "loc": { "start": { "line": 96, @@ -9589,8 +9589,8 @@ "binop": null, "updateContext": null }, - "start": 3489, - "end": 3490, + "start": 3441, + "end": 3442, "loc": { "start": { "line": 96, @@ -9614,8 +9614,8 @@ "postfix": false, "binop": null }, - "start": 3499, - "end": 3500, + "start": 3451, + "end": 3452, "loc": { "start": { "line": 97, @@ -9639,8 +9639,8 @@ "postfix": false, "binop": null }, - "start": 3500, - "end": 3501, + "start": 3452, + "end": 3453, "loc": { "start": { "line": 97, @@ -9665,8 +9665,8 @@ "binop": null, "updateContext": null }, - "start": 3501, - "end": 3502, + "start": 3453, + "end": 3454, "loc": { "start": { "line": 97, @@ -9681,8 +9681,8 @@ { "type": "CommentBlock", "value": "*\n * Bot server url. Used to invite the bot in a web group via {@link WebGroup#invite} method.\n * @type {string}\n ", - "start": 3511, - "end": 3653, + "start": 3463, + "end": 3605, "loc": { "start": { "line": 98, @@ -9709,8 +9709,8 @@ "updateContext": null }, "value": "this", - "start": 3662, - "end": 3666, + "start": 3614, + "end": 3618, "loc": { "start": { "line": 102, @@ -9735,8 +9735,8 @@ "binop": null, "updateContext": null }, - "start": 3666, - "end": 3667, + "start": 3618, + "end": 3619, "loc": { "start": { "line": 102, @@ -9761,8 +9761,8 @@ "binop": null }, "value": "url", - "start": 3667, - "end": 3670, + "start": 3619, + "end": 3622, "loc": { "start": { "line": 102, @@ -9788,8 +9788,8 @@ "updateContext": null }, "value": "=", - "start": 3671, - "end": 3672, + "start": 3623, + "end": 3624, "loc": { "start": { "line": 102, @@ -9814,8 +9814,8 @@ "binop": null }, "value": "undefined", - "start": 3673, - "end": 3682, + "start": 3625, + "end": 3634, "loc": { "start": { "line": 102, @@ -9840,8 +9840,8 @@ "binop": null, "updateContext": null }, - "start": 3682, - "end": 3683, + "start": 3634, + "end": 3635, "loc": { "start": { "line": 102, @@ -9866,8 +9866,8 @@ "binop": null }, "value": "Reflect", - "start": 3692, - "end": 3699, + "start": 3644, + "end": 3651, "loc": { "start": { "line": 103, @@ -9892,8 +9892,8 @@ "binop": null, "updateContext": null }, - "start": 3699, - "end": 3700, + "start": 3651, + "end": 3652, "loc": { "start": { "line": 103, @@ -9918,8 +9918,8 @@ "binop": null }, "value": "defineProperty", - "start": 3700, - "end": 3714, + "start": 3652, + "end": 3666, "loc": { "start": { "line": 103, @@ -9943,8 +9943,8 @@ "postfix": false, "binop": null }, - "start": 3714, - "end": 3715, + "start": 3666, + "end": 3667, "loc": { "start": { "line": 103, @@ -9971,8 +9971,8 @@ "updateContext": null }, "value": "this", - "start": 3715, - "end": 3719, + "start": 3667, + "end": 3671, "loc": { "start": { "line": 103, @@ -9997,8 +9997,8 @@ "binop": null, "updateContext": null }, - "start": 3719, - "end": 3720, + "start": 3671, + "end": 3672, "loc": { "start": { "line": 103, @@ -10024,8 +10024,8 @@ "updateContext": null }, "value": "url", - "start": 3721, - "end": 3726, + "start": 3673, + "end": 3678, "loc": { "start": { "line": 103, @@ -10050,8 +10050,8 @@ "binop": null, "updateContext": null }, - "start": 3726, - "end": 3727, + "start": 3678, + "end": 3679, "loc": { "start": { "line": 103, @@ -10075,8 +10075,8 @@ "postfix": false, "binop": null }, - "start": 3728, - "end": 3729, + "start": 3680, + "end": 3681, "loc": { "start": { "line": 103, @@ -10101,8 +10101,8 @@ "binop": null }, "value": "configurable", - "start": 3742, - "end": 3754, + "start": 3694, + "end": 3706, "loc": { "start": { "line": 104, @@ -10127,8 +10127,8 @@ "binop": null, "updateContext": null }, - "start": 3754, - "end": 3755, + "start": 3706, + "end": 3707, "loc": { "start": { "line": 104, @@ -10155,8 +10155,8 @@ "updateContext": null }, "value": "false", - "start": 3756, - "end": 3761, + "start": 3708, + "end": 3713, "loc": { "start": { "line": 104, @@ -10181,8 +10181,8 @@ "binop": null, "updateContext": null }, - "start": 3761, - "end": 3762, + "start": 3713, + "end": 3714, "loc": { "start": { "line": 104, @@ -10207,8 +10207,8 @@ "binop": null }, "value": "enumerable", - "start": 3775, - "end": 3785, + "start": 3727, + "end": 3737, "loc": { "start": { "line": 105, @@ -10233,8 +10233,8 @@ "binop": null, "updateContext": null }, - "start": 3785, - "end": 3786, + "start": 3737, + "end": 3738, "loc": { "start": { "line": 105, @@ -10261,8 +10261,8 @@ "updateContext": null }, "value": "true", - "start": 3787, - "end": 3791, + "start": 3739, + "end": 3743, "loc": { "start": { "line": 105, @@ -10287,8 +10287,8 @@ "binop": null, "updateContext": null }, - "start": 3791, - "end": 3792, + "start": 3743, + "end": 3744, "loc": { "start": { "line": 105, @@ -10313,8 +10313,8 @@ "binop": null }, "value": "get", - "start": 3805, - "end": 3808, + "start": 3757, + "end": 3760, "loc": { "start": { "line": 106, @@ -10339,8 +10339,8 @@ "binop": null, "updateContext": null }, - "start": 3808, - "end": 3809, + "start": 3760, + "end": 3761, "loc": { "start": { "line": 106, @@ -10364,8 +10364,8 @@ "postfix": false, "binop": null }, - "start": 3810, - "end": 3811, + "start": 3762, + "end": 3763, "loc": { "start": { "line": 106, @@ -10389,8 +10389,8 @@ "postfix": false, "binop": null }, - "start": 3811, - "end": 3812, + "start": 3763, + "end": 3764, "loc": { "start": { "line": 106, @@ -10415,8 +10415,8 @@ "binop": null, "updateContext": null }, - "start": 3813, - "end": 3815, + "start": 3765, + "end": 3767, "loc": { "start": { "line": 106, @@ -10441,8 +10441,8 @@ "binop": null }, "value": "botServer", - "start": 3816, - "end": 3825, + "start": 3768, + "end": 3777, "loc": { "start": { "line": 106, @@ -10467,8 +10467,8 @@ "binop": null, "updateContext": null }, - "start": 3825, - "end": 3826, + "start": 3777, + "end": 3778, "loc": { "start": { "line": 106, @@ -10493,8 +10493,8 @@ "binop": null }, "value": "url", - "start": 3826, - "end": 3829, + "start": 3778, + "end": 3781, "loc": { "start": { "line": 106, @@ -10519,8 +10519,8 @@ "binop": null, "updateContext": null }, - "start": 3829, - "end": 3830, + "start": 3781, + "end": 3782, "loc": { "start": { "line": 106, @@ -10544,8 +10544,8 @@ "postfix": false, "binop": null }, - "start": 3839, - "end": 3840, + "start": 3791, + "end": 3792, "loc": { "start": { "line": 107, @@ -10569,8 +10569,8 @@ "postfix": false, "binop": null }, - "start": 3840, - "end": 3841, + "start": 3792, + "end": 3793, "loc": { "start": { "line": 107, @@ -10595,8 +10595,8 @@ "binop": null, "updateContext": null }, - "start": 3841, - "end": 3842, + "start": 3793, + "end": 3794, "loc": { "start": { "line": 107, @@ -10611,8 +10611,8 @@ { "type": "CommentBlock", "value": "*\n * This handler is called when the bot has been invited into a group by one of its members.\n * @type {function(wg: WebGroup)} handler\n ", - "start": 3851, - "end": 4017, + "start": 3803, + "end": 3969, "loc": { "start": { "line": 108, @@ -10639,8 +10639,8 @@ "updateContext": null }, "value": "this", - "start": 4026, - "end": 4030, + "start": 3978, + "end": 3982, "loc": { "start": { "line": 112, @@ -10665,8 +10665,8 @@ "binop": null, "updateContext": null }, - "start": 4030, - "end": 4031, + "start": 3982, + "end": 3983, "loc": { "start": { "line": 112, @@ -10691,8 +10691,8 @@ "binop": null }, "value": "onWebGroup", - "start": 4031, - "end": 4041, + "start": 3983, + "end": 3993, "loc": { "start": { "line": 112, @@ -10718,8 +10718,8 @@ "updateContext": null }, "value": "=", - "start": 4042, - "end": 4043, + "start": 3994, + "end": 3995, "loc": { "start": { "line": 112, @@ -10744,8 +10744,8 @@ "binop": null }, "value": "undefined", - "start": 4044, - "end": 4053, + "start": 3996, + "end": 4005, "loc": { "start": { "line": 112, @@ -10770,8 +10770,8 @@ "binop": null, "updateContext": null }, - "start": 4053, - "end": 4054, + "start": 4005, + "end": 4006, "loc": { "start": { "line": 112, @@ -10796,8 +10796,8 @@ "binop": null }, "value": "Reflect", - "start": 4063, - "end": 4070, + "start": 4015, + "end": 4022, "loc": { "start": { "line": 113, @@ -10822,8 +10822,8 @@ "binop": null, "updateContext": null }, - "start": 4070, - "end": 4071, + "start": 4022, + "end": 4023, "loc": { "start": { "line": 113, @@ -10848,8 +10848,8 @@ "binop": null }, "value": "defineProperty", - "start": 4071, - "end": 4085, + "start": 4023, + "end": 4037, "loc": { "start": { "line": 113, @@ -10873,8 +10873,8 @@ "postfix": false, "binop": null }, - "start": 4085, - "end": 4086, + "start": 4037, + "end": 4038, "loc": { "start": { "line": 113, @@ -10901,8 +10901,8 @@ "updateContext": null }, "value": "this", - "start": 4086, - "end": 4090, + "start": 4038, + "end": 4042, "loc": { "start": { "line": 113, @@ -10927,8 +10927,8 @@ "binop": null, "updateContext": null }, - "start": 4090, - "end": 4091, + "start": 4042, + "end": 4043, "loc": { "start": { "line": 113, @@ -10954,8 +10954,8 @@ "updateContext": null }, "value": "onWebGroup", - "start": 4092, - "end": 4104, + "start": 4044, + "end": 4056, "loc": { "start": { "line": 113, @@ -10980,8 +10980,8 @@ "binop": null, "updateContext": null }, - "start": 4104, - "end": 4105, + "start": 4056, + "end": 4057, "loc": { "start": { "line": 113, @@ -11005,8 +11005,8 @@ "postfix": false, "binop": null }, - "start": 4106, - "end": 4107, + "start": 4058, + "end": 4059, "loc": { "start": { "line": 113, @@ -11031,8 +11031,8 @@ "binop": null }, "value": "configurable", - "start": 4120, - "end": 4132, + "start": 4072, + "end": 4084, "loc": { "start": { "line": 114, @@ -11057,8 +11057,8 @@ "binop": null, "updateContext": null }, - "start": 4132, - "end": 4133, + "start": 4084, + "end": 4085, "loc": { "start": { "line": 114, @@ -11085,8 +11085,8 @@ "updateContext": null }, "value": "true", - "start": 4134, - "end": 4138, + "start": 4086, + "end": 4090, "loc": { "start": { "line": 114, @@ -11111,8 +11111,8 @@ "binop": null, "updateContext": null }, - "start": 4138, - "end": 4139, + "start": 4090, + "end": 4091, "loc": { "start": { "line": 114, @@ -11137,8 +11137,8 @@ "binop": null }, "value": "enumerable", - "start": 4152, - "end": 4162, + "start": 4104, + "end": 4114, "loc": { "start": { "line": 115, @@ -11163,8 +11163,8 @@ "binop": null, "updateContext": null }, - "start": 4162, - "end": 4163, + "start": 4114, + "end": 4115, "loc": { "start": { "line": 115, @@ -11191,8 +11191,8 @@ "updateContext": null }, "value": "true", - "start": 4164, - "end": 4168, + "start": 4116, + "end": 4120, "loc": { "start": { "line": 115, @@ -11217,8 +11217,8 @@ "binop": null, "updateContext": null }, - "start": 4168, - "end": 4169, + "start": 4120, + "end": 4121, "loc": { "start": { "line": 115, @@ -11243,8 +11243,8 @@ "binop": null }, "value": "get", - "start": 4182, - "end": 4185, + "start": 4134, + "end": 4137, "loc": { "start": { "line": 116, @@ -11269,8 +11269,8 @@ "binop": null, "updateContext": null }, - "start": 4185, - "end": 4186, + "start": 4137, + "end": 4138, "loc": { "start": { "line": 116, @@ -11294,8 +11294,8 @@ "postfix": false, "binop": null }, - "start": 4187, - "end": 4188, + "start": 4139, + "end": 4140, "loc": { "start": { "line": 116, @@ -11319,8 +11319,8 @@ "postfix": false, "binop": null }, - "start": 4188, - "end": 4189, + "start": 4140, + "end": 4141, "loc": { "start": { "line": 116, @@ -11345,8 +11345,8 @@ "binop": null, "updateContext": null }, - "start": 4190, - "end": 4192, + "start": 4142, + "end": 4144, "loc": { "start": { "line": 116, @@ -11370,8 +11370,8 @@ "postfix": false, "binop": null }, - "start": 4193, - "end": 4194, + "start": 4145, + "end": 4146, "loc": { "start": { "line": 116, @@ -11396,8 +11396,8 @@ "binop": null }, "value": "botServer", - "start": 4194, - "end": 4203, + "start": 4146, + "end": 4155, "loc": { "start": { "line": 116, @@ -11422,8 +11422,8 @@ "binop": null, "updateContext": null }, - "start": 4203, - "end": 4204, + "start": 4155, + "end": 4156, "loc": { "start": { "line": 116, @@ -11448,8 +11448,8 @@ "binop": null }, "value": "onWebGroup", - "start": 4204, - "end": 4214, + "start": 4156, + "end": 4166, "loc": { "start": { "line": 116, @@ -11474,8 +11474,8 @@ "binop": null, "updateContext": null }, - "start": 4214, - "end": 4215, + "start": 4166, + "end": 4167, "loc": { "start": { "line": 116, @@ -11500,8 +11500,8 @@ "binop": null }, "value": "name", - "start": 4215, - "end": 4219, + "start": 4167, + "end": 4171, "loc": { "start": { "line": 116, @@ -11527,8 +11527,8 @@ "updateContext": null }, "value": "===", - "start": 4220, - "end": 4223, + "start": 4172, + "end": 4175, "loc": { "start": { "line": 116, @@ -11554,8 +11554,8 @@ "updateContext": null }, "value": "none", - "start": 4224, - "end": 4230, + "start": 4176, + "end": 4182, "loc": { "start": { "line": 116, @@ -11580,8 +11580,8 @@ "binop": null, "updateContext": null }, - "start": 4231, - "end": 4232, + "start": 4183, + "end": 4184, "loc": { "start": { "line": 116, @@ -11606,8 +11606,8 @@ "binop": null }, "value": "undefined", - "start": 4233, - "end": 4242, + "start": 4185, + "end": 4194, "loc": { "start": { "line": 116, @@ -11632,8 +11632,8 @@ "binop": null, "updateContext": null }, - "start": 4243, - "end": 4244, + "start": 4195, + "end": 4196, "loc": { "start": { "line": 116, @@ -11658,8 +11658,8 @@ "binop": null }, "value": "botServer", - "start": 4245, - "end": 4254, + "start": 4197, + "end": 4206, "loc": { "start": { "line": 116, @@ -11684,8 +11684,8 @@ "binop": null, "updateContext": null }, - "start": 4254, - "end": 4255, + "start": 4206, + "end": 4207, "loc": { "start": { "line": 116, @@ -11710,8 +11710,8 @@ "binop": null }, "value": "onWebGroup", - "start": 4255, - "end": 4265, + "start": 4207, + "end": 4217, "loc": { "start": { "line": 116, @@ -11735,8 +11735,8 @@ "postfix": false, "binop": null }, - "start": 4265, - "end": 4266, + "start": 4217, + "end": 4218, "loc": { "start": { "line": 116, @@ -11761,8 +11761,8 @@ "binop": null, "updateContext": null }, - "start": 4266, - "end": 4267, + "start": 4218, + "end": 4219, "loc": { "start": { "line": 116, @@ -11787,8 +11787,8 @@ "binop": null }, "value": "set", - "start": 4280, - "end": 4283, + "start": 4232, + "end": 4235, "loc": { "start": { "line": 117, @@ -11813,8 +11813,8 @@ "binop": null, "updateContext": null }, - "start": 4283, - "end": 4284, + "start": 4235, + "end": 4236, "loc": { "start": { "line": 117, @@ -11838,8 +11838,8 @@ "postfix": false, "binop": null }, - "start": 4285, - "end": 4286, + "start": 4237, + "end": 4238, "loc": { "start": { "line": 117, @@ -11864,8 +11864,8 @@ "binop": null }, "value": "handler", - "start": 4286, - "end": 4293, + "start": 4238, + "end": 4245, "loc": { "start": { "line": 117, @@ -11889,8 +11889,8 @@ "postfix": false, "binop": null }, - "start": 4293, - "end": 4294, + "start": 4245, + "end": 4246, "loc": { "start": { "line": 117, @@ -11915,8 +11915,8 @@ "binop": null, "updateContext": null }, - "start": 4295, - "end": 4297, + "start": 4247, + "end": 4249, "loc": { "start": { "line": 117, @@ -11940,8 +11940,8 @@ "postfix": false, "binop": null }, - "start": 4298, - "end": 4299, + "start": 4250, + "end": 4251, "loc": { "start": { "line": 117, @@ -11968,8 +11968,8 @@ "updateContext": null }, "value": "if", - "start": 4316, - "end": 4318, + "start": 4268, + "end": 4270, "loc": { "start": { "line": 118, @@ -11993,8 +11993,8 @@ "postfix": false, "binop": null }, - "start": 4319, - "end": 4320, + "start": 4271, + "end": 4272, "loc": { "start": { "line": 118, @@ -12021,8 +12021,8 @@ "updateContext": null }, "value": "typeof", - "start": 4320, - "end": 4326, + "start": 4272, + "end": 4278, "loc": { "start": { "line": 118, @@ -12047,8 +12047,8 @@ "binop": null }, "value": "handler", - "start": 4327, - "end": 4334, + "start": 4279, + "end": 4286, "loc": { "start": { "line": 118, @@ -12074,8 +12074,8 @@ "updateContext": null }, "value": "!==", - "start": 4335, - "end": 4338, + "start": 4287, + "end": 4290, "loc": { "start": { "line": 118, @@ -12101,8 +12101,8 @@ "updateContext": null }, "value": "function", - "start": 4339, - "end": 4349, + "start": 4291, + "end": 4301, "loc": { "start": { "line": 118, @@ -12126,8 +12126,8 @@ "postfix": false, "binop": null }, - "start": 4349, - "end": 4350, + "start": 4301, + "end": 4302, "loc": { "start": { "line": 118, @@ -12151,8 +12151,8 @@ "postfix": false, "binop": null }, - "start": 4351, - "end": 4352, + "start": 4303, + "end": 4304, "loc": { "start": { "line": 118, @@ -12177,8 +12177,8 @@ "binop": null }, "value": "botServer", - "start": 4373, - "end": 4382, + "start": 4325, + "end": 4334, "loc": { "start": { "line": 119, @@ -12203,8 +12203,8 @@ "binop": null, "updateContext": null }, - "start": 4382, - "end": 4383, + "start": 4334, + "end": 4335, "loc": { "start": { "line": 119, @@ -12229,8 +12229,8 @@ "binop": null }, "value": "onWebGroup", - "start": 4383, - "end": 4393, + "start": 4335, + "end": 4345, "loc": { "start": { "line": 119, @@ -12256,8 +12256,8 @@ "updateContext": null }, "value": "=", - "start": 4394, - "end": 4395, + "start": 4346, + "end": 4347, "loc": { "start": { "line": 119, @@ -12283,8 +12283,8 @@ "binop": null }, "value": "function", - "start": 4396, - "end": 4404, + "start": 4348, + "end": 4356, "loc": { "start": { "line": 119, @@ -12309,8 +12309,8 @@ "binop": null }, "value": "none", - "start": 4405, - "end": 4409, + "start": 4357, + "end": 4361, "loc": { "start": { "line": 119, @@ -12334,8 +12334,8 @@ "postfix": false, "binop": null }, - "start": 4409, - "end": 4410, + "start": 4361, + "end": 4362, "loc": { "start": { "line": 119, @@ -12359,8 +12359,8 @@ "postfix": false, "binop": null }, - "start": 4410, - "end": 4411, + "start": 4362, + "end": 4363, "loc": { "start": { "line": 119, @@ -12384,8 +12384,8 @@ "postfix": false, "binop": null }, - "start": 4412, - "end": 4413, + "start": 4364, + "end": 4365, "loc": { "start": { "line": 119, @@ -12409,8 +12409,8 @@ "postfix": false, "binop": null }, - "start": 4414, - "end": 4415, + "start": 4366, + "end": 4367, "loc": { "start": { "line": 119, @@ -12435,8 +12435,8 @@ "binop": null, "updateContext": null }, - "start": 4415, - "end": 4416, + "start": 4367, + "end": 4368, "loc": { "start": { "line": 119, @@ -12460,8 +12460,8 @@ "postfix": false, "binop": null }, - "start": 4433, - "end": 4434, + "start": 4385, + "end": 4386, "loc": { "start": { "line": 120, @@ -12488,8 +12488,8 @@ "updateContext": null }, "value": "else", - "start": 4451, - "end": 4455, + "start": 4403, + "end": 4407, "loc": { "start": { "line": 121, @@ -12513,8 +12513,8 @@ "postfix": false, "binop": null }, - "start": 4456, - "end": 4457, + "start": 4408, + "end": 4409, "loc": { "start": { "line": 121, @@ -12539,8 +12539,8 @@ "binop": null }, "value": "botServer", - "start": 4478, - "end": 4487, + "start": 4430, + "end": 4439, "loc": { "start": { "line": 122, @@ -12565,8 +12565,8 @@ "binop": null, "updateContext": null }, - "start": 4487, - "end": 4488, + "start": 4439, + "end": 4440, "loc": { "start": { "line": 122, @@ -12591,8 +12591,8 @@ "binop": null }, "value": "onWebGroup", - "start": 4488, - "end": 4498, + "start": 4440, + "end": 4450, "loc": { "start": { "line": 122, @@ -12618,8 +12618,8 @@ "updateContext": null }, "value": "=", - "start": 4499, - "end": 4500, + "start": 4451, + "end": 4452, "loc": { "start": { "line": 122, @@ -12644,8 +12644,8 @@ "binop": null }, "value": "handler", - "start": 4501, - "end": 4508, + "start": 4453, + "end": 4460, "loc": { "start": { "line": 122, @@ -12670,8 +12670,8 @@ "binop": null, "updateContext": null }, - "start": 4508, - "end": 4509, + "start": 4460, + "end": 4461, "loc": { "start": { "line": 122, @@ -12695,8 +12695,8 @@ "postfix": false, "binop": null }, - "start": 4526, - "end": 4527, + "start": 4478, + "end": 4479, "loc": { "start": { "line": 123, @@ -12720,8 +12720,8 @@ "postfix": false, "binop": null }, - "start": 4540, - "end": 4541, + "start": 4492, + "end": 4493, "loc": { "start": { "line": 124, @@ -12746,8 +12746,8 @@ "binop": null, "updateContext": null }, - "start": 4541, - "end": 4542, + "start": 4493, + "end": 4494, "loc": { "start": { "line": 124, @@ -12771,8 +12771,8 @@ "postfix": false, "binop": null }, - "start": 4551, - "end": 4552, + "start": 4503, + "end": 4504, "loc": { "start": { "line": 125, @@ -12796,8 +12796,8 @@ "postfix": false, "binop": null }, - "start": 4552, - "end": 4553, + "start": 4504, + "end": 4505, "loc": { "start": { "line": 125, @@ -12822,8 +12822,8 @@ "binop": null, "updateContext": null }, - "start": 4553, - "end": 4554, + "start": 4505, + "end": 4506, "loc": { "start": { "line": 125, @@ -12838,8 +12838,8 @@ { "type": "CommentBlock", "value": "*\n * This handler is called when an error occurs on WebSocket server.\n * @type {function(err: Error)}\n ", - "start": 4563, - "end": 4695, + "start": 4515, + "end": 4647, "loc": { "start": { "line": 126, @@ -12866,8 +12866,8 @@ "updateContext": null }, "value": "this", - "start": 4704, - "end": 4708, + "start": 4656, + "end": 4660, "loc": { "start": { "line": 130, @@ -12892,8 +12892,8 @@ "binop": null, "updateContext": null }, - "start": 4708, - "end": 4709, + "start": 4660, + "end": 4661, "loc": { "start": { "line": 130, @@ -12918,8 +12918,8 @@ "binop": null }, "value": "onError", - "start": 4709, - "end": 4716, + "start": 4661, + "end": 4668, "loc": { "start": { "line": 130, @@ -12945,8 +12945,8 @@ "updateContext": null }, "value": "=", - "start": 4717, - "end": 4718, + "start": 4669, + "end": 4670, "loc": { "start": { "line": 130, @@ -12971,8 +12971,8 @@ "binop": null }, "value": "undefined", - "start": 4719, - "end": 4728, + "start": 4671, + "end": 4680, "loc": { "start": { "line": 130, @@ -12997,8 +12997,8 @@ "binop": null, "updateContext": null }, - "start": 4728, - "end": 4729, + "start": 4680, + "end": 4681, "loc": { "start": { "line": 130, @@ -13023,8 +13023,8 @@ "binop": null }, "value": "Reflect", - "start": 4738, - "end": 4745, + "start": 4690, + "end": 4697, "loc": { "start": { "line": 131, @@ -13049,8 +13049,8 @@ "binop": null, "updateContext": null }, - "start": 4745, - "end": 4746, + "start": 4697, + "end": 4698, "loc": { "start": { "line": 131, @@ -13075,8 +13075,8 @@ "binop": null }, "value": "defineProperty", - "start": 4746, - "end": 4760, + "start": 4698, + "end": 4712, "loc": { "start": { "line": 131, @@ -13100,8 +13100,8 @@ "postfix": false, "binop": null }, - "start": 4760, - "end": 4761, + "start": 4712, + "end": 4713, "loc": { "start": { "line": 131, @@ -13128,8 +13128,8 @@ "updateContext": null }, "value": "this", - "start": 4761, - "end": 4765, + "start": 4713, + "end": 4717, "loc": { "start": { "line": 131, @@ -13154,8 +13154,8 @@ "binop": null, "updateContext": null }, - "start": 4765, - "end": 4766, + "start": 4717, + "end": 4718, "loc": { "start": { "line": 131, @@ -13181,8 +13181,8 @@ "updateContext": null }, "value": "onError", - "start": 4767, - "end": 4776, + "start": 4719, + "end": 4728, "loc": { "start": { "line": 131, @@ -13207,8 +13207,8 @@ "binop": null, "updateContext": null }, - "start": 4776, - "end": 4777, + "start": 4728, + "end": 4729, "loc": { "start": { "line": 131, @@ -13232,8 +13232,8 @@ "postfix": false, "binop": null }, - "start": 4778, - "end": 4779, + "start": 4730, + "end": 4731, "loc": { "start": { "line": 131, @@ -13258,8 +13258,8 @@ "binop": null }, "value": "configurable", - "start": 4792, - "end": 4804, + "start": 4744, + "end": 4756, "loc": { "start": { "line": 132, @@ -13284,8 +13284,8 @@ "binop": null, "updateContext": null }, - "start": 4804, - "end": 4805, + "start": 4756, + "end": 4757, "loc": { "start": { "line": 132, @@ -13312,8 +13312,8 @@ "updateContext": null }, "value": "true", - "start": 4806, - "end": 4810, + "start": 4758, + "end": 4762, "loc": { "start": { "line": 132, @@ -13338,8 +13338,8 @@ "binop": null, "updateContext": null }, - "start": 4810, - "end": 4811, + "start": 4762, + "end": 4763, "loc": { "start": { "line": 132, @@ -13364,8 +13364,8 @@ "binop": null }, "value": "enumerable", - "start": 4824, - "end": 4834, + "start": 4776, + "end": 4786, "loc": { "start": { "line": 133, @@ -13390,8 +13390,8 @@ "binop": null, "updateContext": null }, - "start": 4834, - "end": 4835, + "start": 4786, + "end": 4787, "loc": { "start": { "line": 133, @@ -13418,8 +13418,8 @@ "updateContext": null }, "value": "true", - "start": 4836, - "end": 4840, + "start": 4788, + "end": 4792, "loc": { "start": { "line": 133, @@ -13444,8 +13444,8 @@ "binop": null, "updateContext": null }, - "start": 4840, - "end": 4841, + "start": 4792, + "end": 4793, "loc": { "start": { "line": 133, @@ -13470,8 +13470,8 @@ "binop": null }, "value": "get", - "start": 4854, - "end": 4857, + "start": 4806, + "end": 4809, "loc": { "start": { "line": 134, @@ -13496,8 +13496,8 @@ "binop": null, "updateContext": null }, - "start": 4857, - "end": 4858, + "start": 4809, + "end": 4810, "loc": { "start": { "line": 134, @@ -13521,8 +13521,8 @@ "postfix": false, "binop": null }, - "start": 4859, - "end": 4860, + "start": 4811, + "end": 4812, "loc": { "start": { "line": 134, @@ -13546,8 +13546,8 @@ "postfix": false, "binop": null }, - "start": 4860, - "end": 4861, + "start": 4812, + "end": 4813, "loc": { "start": { "line": 134, @@ -13572,8 +13572,8 @@ "binop": null, "updateContext": null }, - "start": 4862, - "end": 4864, + "start": 4814, + "end": 4816, "loc": { "start": { "line": 134, @@ -13597,8 +13597,8 @@ "postfix": false, "binop": null }, - "start": 4865, - "end": 4866, + "start": 4817, + "end": 4818, "loc": { "start": { "line": 134, @@ -13623,8 +13623,8 @@ "binop": null }, "value": "botServer", - "start": 4866, - "end": 4875, + "start": 4818, + "end": 4827, "loc": { "start": { "line": 134, @@ -13649,8 +13649,8 @@ "binop": null, "updateContext": null }, - "start": 4875, - "end": 4876, + "start": 4827, + "end": 4828, "loc": { "start": { "line": 134, @@ -13675,8 +13675,8 @@ "binop": null }, "value": "onError", - "start": 4876, - "end": 4883, + "start": 4828, + "end": 4835, "loc": { "start": { "line": 134, @@ -13701,8 +13701,8 @@ "binop": null, "updateContext": null }, - "start": 4883, - "end": 4884, + "start": 4835, + "end": 4836, "loc": { "start": { "line": 134, @@ -13727,8 +13727,8 @@ "binop": null }, "value": "name", - "start": 4884, - "end": 4888, + "start": 4836, + "end": 4840, "loc": { "start": { "line": 134, @@ -13754,8 +13754,8 @@ "updateContext": null }, "value": "===", - "start": 4889, - "end": 4892, + "start": 4841, + "end": 4844, "loc": { "start": { "line": 134, @@ -13781,8 +13781,8 @@ "updateContext": null }, "value": "none", - "start": 4893, - "end": 4899, + "start": 4845, + "end": 4851, "loc": { "start": { "line": 134, @@ -13807,8 +13807,8 @@ "binop": null, "updateContext": null }, - "start": 4900, - "end": 4901, + "start": 4852, + "end": 4853, "loc": { "start": { "line": 134, @@ -13833,8 +13833,8 @@ "binop": null }, "value": "undefined", - "start": 4902, - "end": 4911, + "start": 4854, + "end": 4863, "loc": { "start": { "line": 134, @@ -13859,8 +13859,8 @@ "binop": null, "updateContext": null }, - "start": 4912, - "end": 4913, + "start": 4864, + "end": 4865, "loc": { "start": { "line": 134, @@ -13885,8 +13885,8 @@ "binop": null }, "value": "botServer", - "start": 4914, - "end": 4923, + "start": 4866, + "end": 4875, "loc": { "start": { "line": 134, @@ -13911,8 +13911,8 @@ "binop": null, "updateContext": null }, - "start": 4923, - "end": 4924, + "start": 4875, + "end": 4876, "loc": { "start": { "line": 134, @@ -13937,8 +13937,8 @@ "binop": null }, "value": "onError", - "start": 4924, - "end": 4931, + "start": 4876, + "end": 4883, "loc": { "start": { "line": 134, @@ -13962,8 +13962,8 @@ "postfix": false, "binop": null }, - "start": 4931, - "end": 4932, + "start": 4883, + "end": 4884, "loc": { "start": { "line": 134, @@ -13988,8 +13988,8 @@ "binop": null, "updateContext": null }, - "start": 4932, - "end": 4933, + "start": 4884, + "end": 4885, "loc": { "start": { "line": 134, @@ -14014,8 +14014,8 @@ "binop": null }, "value": "set", - "start": 4946, - "end": 4949, + "start": 4898, + "end": 4901, "loc": { "start": { "line": 135, @@ -14040,8 +14040,8 @@ "binop": null, "updateContext": null }, - "start": 4949, - "end": 4950, + "start": 4901, + "end": 4902, "loc": { "start": { "line": 135, @@ -14065,8 +14065,8 @@ "postfix": false, "binop": null }, - "start": 4951, - "end": 4952, + "start": 4903, + "end": 4904, "loc": { "start": { "line": 135, @@ -14091,8 +14091,8 @@ "binop": null }, "value": "handler", - "start": 4952, - "end": 4959, + "start": 4904, + "end": 4911, "loc": { "start": { "line": 135, @@ -14116,8 +14116,8 @@ "postfix": false, "binop": null }, - "start": 4959, - "end": 4960, + "start": 4911, + "end": 4912, "loc": { "start": { "line": 135, @@ -14142,8 +14142,8 @@ "binop": null, "updateContext": null }, - "start": 4961, - "end": 4963, + "start": 4913, + "end": 4915, "loc": { "start": { "line": 135, @@ -14167,8 +14167,8 @@ "postfix": false, "binop": null }, - "start": 4964, - "end": 4965, + "start": 4916, + "end": 4917, "loc": { "start": { "line": 135, @@ -14195,8 +14195,8 @@ "updateContext": null }, "value": "if", - "start": 4982, - "end": 4984, + "start": 4934, + "end": 4936, "loc": { "start": { "line": 136, @@ -14220,8 +14220,8 @@ "postfix": false, "binop": null }, - "start": 4985, - "end": 4986, + "start": 4937, + "end": 4938, "loc": { "start": { "line": 136, @@ -14248,8 +14248,8 @@ "updateContext": null }, "value": "typeof", - "start": 4986, - "end": 4992, + "start": 4938, + "end": 4944, "loc": { "start": { "line": 136, @@ -14274,8 +14274,8 @@ "binop": null }, "value": "handler", - "start": 4993, - "end": 5000, + "start": 4945, + "end": 4952, "loc": { "start": { "line": 136, @@ -14301,8 +14301,8 @@ "updateContext": null }, "value": "!==", - "start": 5001, - "end": 5004, + "start": 4953, + "end": 4956, "loc": { "start": { "line": 136, @@ -14328,8 +14328,8 @@ "updateContext": null }, "value": "function", - "start": 5005, - "end": 5015, + "start": 4957, + "end": 4967, "loc": { "start": { "line": 136, @@ -14353,8 +14353,8 @@ "postfix": false, "binop": null }, - "start": 5015, - "end": 5016, + "start": 4967, + "end": 4968, "loc": { "start": { "line": 136, @@ -14378,8 +14378,8 @@ "postfix": false, "binop": null }, - "start": 5017, - "end": 5018, + "start": 4969, + "end": 4970, "loc": { "start": { "line": 136, @@ -14404,8 +14404,8 @@ "binop": null }, "value": "botServer", - "start": 5039, - "end": 5048, + "start": 4991, + "end": 5000, "loc": { "start": { "line": 137, @@ -14430,8 +14430,8 @@ "binop": null, "updateContext": null }, - "start": 5048, - "end": 5049, + "start": 5000, + "end": 5001, "loc": { "start": { "line": 137, @@ -14456,8 +14456,8 @@ "binop": null }, "value": "onError", - "start": 5049, - "end": 5056, + "start": 5001, + "end": 5008, "loc": { "start": { "line": 137, @@ -14483,8 +14483,8 @@ "updateContext": null }, "value": "=", - "start": 5057, - "end": 5058, + "start": 5009, + "end": 5010, "loc": { "start": { "line": 137, @@ -14510,8 +14510,8 @@ "binop": null }, "value": "function", - "start": 5059, - "end": 5067, + "start": 5011, + "end": 5019, "loc": { "start": { "line": 137, @@ -14536,8 +14536,8 @@ "binop": null }, "value": "none", - "start": 5068, - "end": 5072, + "start": 5020, + "end": 5024, "loc": { "start": { "line": 137, @@ -14561,8 +14561,8 @@ "postfix": false, "binop": null }, - "start": 5072, - "end": 5073, + "start": 5024, + "end": 5025, "loc": { "start": { "line": 137, @@ -14586,8 +14586,8 @@ "postfix": false, "binop": null }, - "start": 5073, - "end": 5074, + "start": 5025, + "end": 5026, "loc": { "start": { "line": 137, @@ -14611,8 +14611,8 @@ "postfix": false, "binop": null }, - "start": 5075, - "end": 5076, + "start": 5027, + "end": 5028, "loc": { "start": { "line": 137, @@ -14636,8 +14636,8 @@ "postfix": false, "binop": null }, - "start": 5077, - "end": 5078, + "start": 5029, + "end": 5030, "loc": { "start": { "line": 137, @@ -14662,8 +14662,8 @@ "binop": null, "updateContext": null }, - "start": 5078, - "end": 5079, + "start": 5030, + "end": 5031, "loc": { "start": { "line": 137, @@ -14687,8 +14687,8 @@ "postfix": false, "binop": null }, - "start": 5096, - "end": 5097, + "start": 5048, + "end": 5049, "loc": { "start": { "line": 138, @@ -14715,8 +14715,8 @@ "updateContext": null }, "value": "else", - "start": 5114, - "end": 5118, + "start": 5066, + "end": 5070, "loc": { "start": { "line": 139, @@ -14740,8 +14740,8 @@ "postfix": false, "binop": null }, - "start": 5119, - "end": 5120, + "start": 5071, + "end": 5072, "loc": { "start": { "line": 139, @@ -14766,8 +14766,8 @@ "binop": null }, "value": "botServer", - "start": 5141, - "end": 5150, + "start": 5093, + "end": 5102, "loc": { "start": { "line": 140, @@ -14792,8 +14792,8 @@ "binop": null, "updateContext": null }, - "start": 5150, - "end": 5151, + "start": 5102, + "end": 5103, "loc": { "start": { "line": 140, @@ -14818,8 +14818,8 @@ "binop": null }, "value": "onError", - "start": 5151, - "end": 5158, + "start": 5103, + "end": 5110, "loc": { "start": { "line": 140, @@ -14845,8 +14845,8 @@ "updateContext": null }, "value": "=", - "start": 5159, - "end": 5160, + "start": 5111, + "end": 5112, "loc": { "start": { "line": 140, @@ -14871,8 +14871,8 @@ "binop": null }, "value": "handler", - "start": 5161, - "end": 5168, + "start": 5113, + "end": 5120, "loc": { "start": { "line": 140, @@ -14897,8 +14897,8 @@ "binop": null, "updateContext": null }, - "start": 5168, - "end": 5169, + "start": 5120, + "end": 5121, "loc": { "start": { "line": 140, @@ -14922,8 +14922,8 @@ "postfix": false, "binop": null }, - "start": 5186, - "end": 5187, + "start": 5138, + "end": 5139, "loc": { "start": { "line": 141, @@ -14947,8 +14947,8 @@ "postfix": false, "binop": null }, - "start": 5200, - "end": 5201, + "start": 5152, + "end": 5153, "loc": { "start": { "line": 142, @@ -14973,8 +14973,8 @@ "binop": null, "updateContext": null }, - "start": 5201, - "end": 5202, + "start": 5153, + "end": 5154, "loc": { "start": { "line": 142, @@ -14998,8 +14998,8 @@ "postfix": false, "binop": null }, - "start": 5211, - "end": 5212, + "start": 5163, + "end": 5164, "loc": { "start": { "line": 143, @@ -15023,8 +15023,8 @@ "postfix": false, "binop": null }, - "start": 5212, - "end": 5213, + "start": 5164, + "end": 5165, "loc": { "start": { "line": 143, @@ -15049,8 +15049,8 @@ "binop": null, "updateContext": null }, - "start": 5213, - "end": 5214, + "start": 5165, + "end": 5166, "loc": { "start": { "line": 143, @@ -15074,8 +15074,8 @@ "postfix": false, "binop": null }, - "start": 5219, - "end": 5220, + "start": 5171, + "end": 5172, "loc": { "start": { "line": 144, @@ -15099,8 +15099,8 @@ "postfix": false, "binop": null }, - "start": 5221, - "end": 5222, + "start": 5173, + "end": 5174, "loc": { "start": { "line": 145, @@ -15125,8 +15125,8 @@ "binop": null, "updateContext": null }, - "start": 5223, - "end": 5223, + "start": 5175, + "end": 5175, "loc": { "start": { "line": 146, diff --git a/docs/ast/source/index.common.doc.js.json b/docs/ast/source/index.common.doc.js.json index c6ee58c1..573fa72f 100644 --- a/docs/ast/source/index.common.doc.js.json +++ b/docs/ast/source/index.common.doc.js.json @@ -1,7 +1,7 @@ { "type": "File", "start": 0, - "end": 5547, + "end": 5523, "loc": { "start": { "line": 1, @@ -15,7 +15,7 @@ "program": { "type": "Program", "start": 0, - "end": 5547, + "end": 5523, "loc": { "start": { "line": 1, @@ -3796,9 +3796,9 @@ }, { "type": "CommentBlock", - "value": "*\n * The options to be passed into {@link Bot} constructor.\n * @typedef {Object} BotOptions\n * @property {Topology} [topology] See WebGroupOptions.topology\n * @property {string} [signalingServer] See WebGroupOptions.signalingServer\n * @property {RTCConfiguration} [rtcConfiguration] See WebGroupOptions.rtcConfiguration\n * @property {boolean} [autoRejoin] See WebGroupOptions.autoRejoin\n * @property {Object} bot Server related options of the bot.\n * @property {NodeJSHttpServer|NodeJSHttpsServer} bot.server NodeJS http(s) server.\n * @property {string} [bot.url] Bot server URL.\n * @property {boolean} [bot.perMessageDeflate] Enable/disable permessage-deflate.\n * @property {boolean} [bot.leaveOnceAlone] If true, bot will live (disconnect from the signaling server) if no other peers left in the group.\n ", + "value": "*\n * The options to be passed into {@link Bot} constructor.\n * @typedef {Object} BotOptions\n * @property {Topology} [topology] See WebGroupOptions.topology\n * @property {string} [signalingServer] See WebGroupOptions.signalingServer\n * @property {RTCConfiguration} [rtcConfiguration] See WebGroupOptions.rtcConfiguration\n * @property {boolean} [autoRejoin] See WebGroupOptions.autoRejoin\n * @property {Object} bot Server related options of the bot.\n * @property {HttpServer|HttpsServer} bot.server NodeJS http(s) server.\n * @property {string} [bot.url] Bot server URL.\n * @property {boolean} [bot.perMessageDeflate] Enable/disable permessage-deflate.\n * @property {boolean} [bot.leaveOnceAlone] If true, bot will live (disconnect from the signaling server) if no other peers left in the group.\n ", "start": 4314, - "end": 5124, + "end": 5112, "loc": { "start": { "line": 158, @@ -3813,8 +3813,8 @@ { "type": "CommentBlock", "value": "*\n * @external {RTCConfiguration} https://developer.mozilla.org/en/docs/Web/API/RTCConfiguration\n ", - "start": 5125, - "end": 5227, + "start": 5113, + "end": 5215, "loc": { "start": { "line": 171, @@ -3829,8 +3829,8 @@ { "type": "CommentBlock", "value": "*\n * @external {Uint8Array} https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array\n ", - "start": 5228, - "end": 5350, + "start": 5216, + "end": 5338, "loc": { "start": { "line": 174, @@ -3844,9 +3844,9 @@ }, { "type": "CommentBlock", - "value": "*\n * @external {NodeJSHttpServer} https://nodejs.org/api/http.html#http_class_http_server\n ", - "start": 5351, - "end": 5446, + "value": "*\n * @external {HttpServer} https://nodejs.org/api/http.html#http_class_http_server\n ", + "start": 5339, + "end": 5428, "loc": { "start": { "line": 177, @@ -3860,9 +3860,9 @@ }, { "type": "CommentBlock", - "value": "*\n * @external {NodeJSHttpsServer} https://nodejs.org/api/https.html#https_class_https_server\n ", - "start": 5447, - "end": 5546, + "value": "*\n * @external {HttpsServer} https://nodejs.org/api/https.html#https_class_https_server\n ", + "start": 5429, + "end": 5522, "loc": { "start": { "line": 180, @@ -3913,9 +3913,9 @@ }, { "type": "CommentBlock", - "value": "*\n * The options to be passed into {@link Bot} constructor.\n * @typedef {Object} BotOptions\n * @property {Topology} [topology] See WebGroupOptions.topology\n * @property {string} [signalingServer] See WebGroupOptions.signalingServer\n * @property {RTCConfiguration} [rtcConfiguration] See WebGroupOptions.rtcConfiguration\n * @property {boolean} [autoRejoin] See WebGroupOptions.autoRejoin\n * @property {Object} bot Server related options of the bot.\n * @property {NodeJSHttpServer|NodeJSHttpsServer} bot.server NodeJS http(s) server.\n * @property {string} [bot.url] Bot server URL.\n * @property {boolean} [bot.perMessageDeflate] Enable/disable permessage-deflate.\n * @property {boolean} [bot.leaveOnceAlone] If true, bot will live (disconnect from the signaling server) if no other peers left in the group.\n ", + "value": "*\n * The options to be passed into {@link Bot} constructor.\n * @typedef {Object} BotOptions\n * @property {Topology} [topology] See WebGroupOptions.topology\n * @property {string} [signalingServer] See WebGroupOptions.signalingServer\n * @property {RTCConfiguration} [rtcConfiguration] See WebGroupOptions.rtcConfiguration\n * @property {boolean} [autoRejoin] See WebGroupOptions.autoRejoin\n * @property {Object} bot Server related options of the bot.\n * @property {HttpServer|HttpsServer} bot.server NodeJS http(s) server.\n * @property {string} [bot.url] Bot server URL.\n * @property {boolean} [bot.perMessageDeflate] Enable/disable permessage-deflate.\n * @property {boolean} [bot.leaveOnceAlone] If true, bot will live (disconnect from the signaling server) if no other peers left in the group.\n ", "start": 4314, - "end": 5124, + "end": 5112, "loc": { "start": { "line": 158, @@ -3930,8 +3930,8 @@ { "type": "CommentBlock", "value": "*\n * @external {RTCConfiguration} https://developer.mozilla.org/en/docs/Web/API/RTCConfiguration\n ", - "start": 5125, - "end": 5227, + "start": 5113, + "end": 5215, "loc": { "start": { "line": 171, @@ -3946,8 +3946,8 @@ { "type": "CommentBlock", "value": "*\n * @external {Uint8Array} https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array\n ", - "start": 5228, - "end": 5350, + "start": 5216, + "end": 5338, "loc": { "start": { "line": 174, @@ -3961,9 +3961,9 @@ }, { "type": "CommentBlock", - "value": "*\n * @external {NodeJSHttpServer} https://nodejs.org/api/http.html#http_class_http_server\n ", - "start": 5351, - "end": 5446, + "value": "*\n * @external {HttpServer} https://nodejs.org/api/http.html#http_class_http_server\n ", + "start": 5339, + "end": 5428, "loc": { "start": { "line": 177, @@ -3977,9 +3977,9 @@ }, { "type": "CommentBlock", - "value": "*\n * @external {NodeJSHttpsServer} https://nodejs.org/api/https.html#https_class_https_server\n ", - "start": 5447, - "end": 5546, + "value": "*\n * @external {HttpsServer} https://nodejs.org/api/https.html#https_class_https_server\n ", + "start": 5429, + "end": 5522, "loc": { "start": { "line": 180, @@ -4351,9 +4351,9 @@ }, { "type": "CommentBlock", - "value": "*\n * The options to be passed into {@link Bot} constructor.\n * @typedef {Object} BotOptions\n * @property {Topology} [topology] See WebGroupOptions.topology\n * @property {string} [signalingServer] See WebGroupOptions.signalingServer\n * @property {RTCConfiguration} [rtcConfiguration] See WebGroupOptions.rtcConfiguration\n * @property {boolean} [autoRejoin] See WebGroupOptions.autoRejoin\n * @property {Object} bot Server related options of the bot.\n * @property {NodeJSHttpServer|NodeJSHttpsServer} bot.server NodeJS http(s) server.\n * @property {string} [bot.url] Bot server URL.\n * @property {boolean} [bot.perMessageDeflate] Enable/disable permessage-deflate.\n * @property {boolean} [bot.leaveOnceAlone] If true, bot will live (disconnect from the signaling server) if no other peers left in the group.\n ", + "value": "*\n * The options to be passed into {@link Bot} constructor.\n * @typedef {Object} BotOptions\n * @property {Topology} [topology] See WebGroupOptions.topology\n * @property {string} [signalingServer] See WebGroupOptions.signalingServer\n * @property {RTCConfiguration} [rtcConfiguration] See WebGroupOptions.rtcConfiguration\n * @property {boolean} [autoRejoin] See WebGroupOptions.autoRejoin\n * @property {Object} bot Server related options of the bot.\n * @property {HttpServer|HttpsServer} bot.server NodeJS http(s) server.\n * @property {string} [bot.url] Bot server URL.\n * @property {boolean} [bot.perMessageDeflate] Enable/disable permessage-deflate.\n * @property {boolean} [bot.leaveOnceAlone] If true, bot will live (disconnect from the signaling server) if no other peers left in the group.\n ", "start": 4314, - "end": 5124, + "end": 5112, "loc": { "start": { "line": 158, @@ -4368,8 +4368,8 @@ { "type": "CommentBlock", "value": "*\n * @external {RTCConfiguration} https://developer.mozilla.org/en/docs/Web/API/RTCConfiguration\n ", - "start": 5125, - "end": 5227, + "start": 5113, + "end": 5215, "loc": { "start": { "line": 171, @@ -4384,8 +4384,8 @@ { "type": "CommentBlock", "value": "*\n * @external {Uint8Array} https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array\n ", - "start": 5228, - "end": 5350, + "start": 5216, + "end": 5338, "loc": { "start": { "line": 174, @@ -4399,9 +4399,9 @@ }, { "type": "CommentBlock", - "value": "*\n * @external {NodeJSHttpServer} https://nodejs.org/api/http.html#http_class_http_server\n ", - "start": 5351, - "end": 5446, + "value": "*\n * @external {HttpServer} https://nodejs.org/api/http.html#http_class_http_server\n ", + "start": 5339, + "end": 5428, "loc": { "start": { "line": 177, @@ -4415,9 +4415,9 @@ }, { "type": "CommentBlock", - "value": "*\n * @external {NodeJSHttpsServer} https://nodejs.org/api/https.html#https_class_https_server\n ", - "start": 5447, - "end": 5546, + "value": "*\n * @external {HttpsServer} https://nodejs.org/api/https.html#https_class_https_server\n ", + "start": 5429, + "end": 5522, "loc": { "start": { "line": 180, @@ -11783,9 +11783,9 @@ }, { "type": "CommentBlock", - "value": "*\n * The options to be passed into {@link Bot} constructor.\n * @typedef {Object} BotOptions\n * @property {Topology} [topology] See WebGroupOptions.topology\n * @property {string} [signalingServer] See WebGroupOptions.signalingServer\n * @property {RTCConfiguration} [rtcConfiguration] See WebGroupOptions.rtcConfiguration\n * @property {boolean} [autoRejoin] See WebGroupOptions.autoRejoin\n * @property {Object} bot Server related options of the bot.\n * @property {NodeJSHttpServer|NodeJSHttpsServer} bot.server NodeJS http(s) server.\n * @property {string} [bot.url] Bot server URL.\n * @property {boolean} [bot.perMessageDeflate] Enable/disable permessage-deflate.\n * @property {boolean} [bot.leaveOnceAlone] If true, bot will live (disconnect from the signaling server) if no other peers left in the group.\n ", + "value": "*\n * The options to be passed into {@link Bot} constructor.\n * @typedef {Object} BotOptions\n * @property {Topology} [topology] See WebGroupOptions.topology\n * @property {string} [signalingServer] See WebGroupOptions.signalingServer\n * @property {RTCConfiguration} [rtcConfiguration] See WebGroupOptions.rtcConfiguration\n * @property {boolean} [autoRejoin] See WebGroupOptions.autoRejoin\n * @property {Object} bot Server related options of the bot.\n * @property {HttpServer|HttpsServer} bot.server NodeJS http(s) server.\n * @property {string} [bot.url] Bot server URL.\n * @property {boolean} [bot.perMessageDeflate] Enable/disable permessage-deflate.\n * @property {boolean} [bot.leaveOnceAlone] If true, bot will live (disconnect from the signaling server) if no other peers left in the group.\n ", "start": 4314, - "end": 5124, + "end": 5112, "loc": { "start": { "line": 158, @@ -11800,8 +11800,8 @@ { "type": "CommentBlock", "value": "*\n * @external {RTCConfiguration} https://developer.mozilla.org/en/docs/Web/API/RTCConfiguration\n ", - "start": 5125, - "end": 5227, + "start": 5113, + "end": 5215, "loc": { "start": { "line": 171, @@ -11816,8 +11816,8 @@ { "type": "CommentBlock", "value": "*\n * @external {Uint8Array} https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array\n ", - "start": 5228, - "end": 5350, + "start": 5216, + "end": 5338, "loc": { "start": { "line": 174, @@ -11831,9 +11831,9 @@ }, { "type": "CommentBlock", - "value": "*\n * @external {NodeJSHttpServer} https://nodejs.org/api/http.html#http_class_http_server\n ", - "start": 5351, - "end": 5446, + "value": "*\n * @external {HttpServer} https://nodejs.org/api/http.html#http_class_http_server\n ", + "start": 5339, + "end": 5428, "loc": { "start": { "line": 177, @@ -11847,9 +11847,9 @@ }, { "type": "CommentBlock", - "value": "*\n * @external {NodeJSHttpsServer} https://nodejs.org/api/https.html#https_class_https_server\n ", - "start": 5447, - "end": 5546, + "value": "*\n * @external {HttpsServer} https://nodejs.org/api/https.html#https_class_https_server\n ", + "start": 5429, + "end": 5522, "loc": { "start": { "line": 180, @@ -11874,8 +11874,8 @@ "binop": null, "updateContext": null }, - "start": 5547, - "end": 5547, + "start": 5523, + "end": 5523, "loc": { "start": { "line": 183, diff --git a/docs/class/src/BotFacade.js~Bot.html b/docs/class/src/BotFacade.js~Bot.html index 538be701..d1e66faf 100644 --- a/docs/class/src/BotFacade.js~Bot.html +++ b/docs/class/src/BotFacade.js~Bot.html @@ -39,8 +39,8 @@
  • TDataType
  • TBotOptions
  • TWebGroupOptions
  • -
  • ENodeJSHttpServer
  • -
  • ENodeJSHttpsServer
  • +
  • EHttpServer
  • +
  • EHttpsServer
  • ERTCConfiguration
  • EUint8Array
  • @@ -184,7 +184,7 @@

    Example:

    - leaveOnceAlone: NodeJSHttpServer | NodeJSHttpsServer + leaveOnceAlone: HttpServer | HttpsServer

    @@ -300,7 +300,7 @@

    Example:

    - server: NodeJSHttpServer | NodeJSHttpsServer + server: HttpServer | HttpsServer

    @@ -423,7 +423,7 @@

    Params:

    options.server - NodeJSHttpServer | NodeJSHttpsServer + HttpServer | HttpsServer

    NodeJS http(s) server.

    @@ -519,7 +519,7 @@

    - leaveOnceAlone: NodeJSHttpServer | NodeJSHttpsServer + leaveOnceAlone: HttpServer | HttpsServer @@ -651,7 +651,7 @@

    - perMessageDeflate: NodeJSHttpServer | NodeJSHttpsServer + perMessageDeflate: HttpServer | HttpsServer @@ -695,7 +695,7 @@

    - server: NodeJSHttpServer | NodeJSHttpsServer + server: HttpServer | HttpsServer diff --git a/docs/class/src/WebChannelFacade.js~WebGroup.html b/docs/class/src/WebChannelFacade.js~WebGroup.html index 90a2d49f..308dcd50 100644 --- a/docs/class/src/WebChannelFacade.js~WebGroup.html +++ b/docs/class/src/WebChannelFacade.js~WebGroup.html @@ -39,8 +39,8 @@
  • TDataType
  • TBotOptions
  • TWebGroupOptions
  • -
  • ENodeJSHttpServer
  • -
  • ENodeJSHttpsServer
  • +
  • EHttpServer
  • +
  • EHttpsServer
  • ERTCConfiguration
  • EUint8Array
  • diff --git a/docs/class/src/index.common.doc.js~LogLevel.html b/docs/class/src/index.common.doc.js~LogLevel.html index 765f9f3f..cd6e1360 100644 --- a/docs/class/src/index.common.doc.js~LogLevel.html +++ b/docs/class/src/index.common.doc.js~LogLevel.html @@ -39,8 +39,8 @@
  • TDataType
  • TBotOptions
  • TWebGroupOptions
  • -
  • ENodeJSHttpServer
  • -
  • ENodeJSHttpsServer
  • +
  • EHttpServer
  • +
  • EHttpsServer
  • ERTCConfiguration
  • EUint8Array
  • diff --git a/docs/class/src/index.common.doc.js~SignalingState.html b/docs/class/src/index.common.doc.js~SignalingState.html index 0fbfda01..c103b9f1 100644 --- a/docs/class/src/index.common.doc.js~SignalingState.html +++ b/docs/class/src/index.common.doc.js~SignalingState.html @@ -39,8 +39,8 @@
  • TDataType
  • TBotOptions
  • TWebGroupOptions
  • -
  • ENodeJSHttpServer
  • -
  • ENodeJSHttpsServer
  • +
  • EHttpServer
  • +
  • EHttpsServer
  • ERTCConfiguration
  • EUint8Array
  • diff --git a/docs/class/src/index.common.doc.js~Topology.html b/docs/class/src/index.common.doc.js~Topology.html index 284d9350..c9b3acef 100644 --- a/docs/class/src/index.common.doc.js~Topology.html +++ b/docs/class/src/index.common.doc.js~Topology.html @@ -39,8 +39,8 @@
  • TDataType
  • TBotOptions
  • TWebGroupOptions
  • -
  • ENodeJSHttpServer
  • -
  • ENodeJSHttpsServer
  • +
  • EHttpServer
  • +
  • EHttpsServer
  • ERTCConfiguration
  • EUint8Array
  • diff --git a/docs/class/src/index.common.doc.js~WebGroupState.html b/docs/class/src/index.common.doc.js~WebGroupState.html index 47de0c88..0ac7f94c 100644 --- a/docs/class/src/index.common.doc.js~WebGroupState.html +++ b/docs/class/src/index.common.doc.js~WebGroupState.html @@ -39,8 +39,8 @@
  • TDataType
  • TBotOptions
  • TWebGroupOptions
  • -
  • ENodeJSHttpServer
  • -
  • ENodeJSHttpsServer
  • +
  • EHttpServer
  • +
  • EHttpsServer
  • ERTCConfiguration
  • EUint8Array
  • diff --git a/docs/file/src/BotFacade.js.html b/docs/file/src/BotFacade.js.html index 123da0b1..a03da785 100644 --- a/docs/file/src/BotFacade.js.html +++ b/docs/file/src/BotFacade.js.html @@ -39,8 +39,8 @@
  • TDataType
  • TBotOptions
  • TWebGroupOptions
  • -
  • ENodeJSHttpServer
  • -
  • ENodeJSHttpsServer
  • +
  • EHttpServer
  • +
  • EHttpsServer
  • ERTCConfiguration
  • EUint8Array
  • @@ -93,7 +93,7 @@ export class Bot { /** * @param {BotOptions} options - * @param {NodeJSHttpServer|NodeJSHttpsServer} options.server NodeJS http(s) server. + * @param {HttpServer|HttpsServer} options.server NodeJS http(s) server. * @param {string} [options.url] Bot server URL. * @param {boolean} [options.perMessageDeflate=false] Enable/disable permessage-deflate. * @param {boolean} [options.leaveOnceAlone=false] If true, bot will live (disconnect from the signaling server) if no other peers left in the group. @@ -107,7 +107,7 @@ botServer = new BotServer(options); /** * Read-only NodeJS http server instance. - * @type {NodeJSHttpServer|NodeJSHttpsServer} + * @type {HttpServer|HttpsServer} */ this.server = undefined; Reflect.defineProperty(this, 'server', { @@ -117,7 +117,7 @@ }); /** * Read-only property of WebSocket server: permessage-deflate. - * @type {NodeJSHttpServer|NodeJSHttpsServer} + * @type {HttpServer|HttpsServer} */ this.perMessageDeflate = undefined; Reflect.defineProperty(this, 'perMessageDeflate', { @@ -127,7 +127,7 @@ }); /** * Read-only property leaveOnceAlone. - * @type {NodeJSHttpServer|NodeJSHttpsServer} + * @type {HttpServer|HttpsServer} */ this.leaveOnceAlone = undefined; Reflect.defineProperty(this, 'leaveOnceAlone', { diff --git a/docs/file/src/WebChannelFacade.js.html b/docs/file/src/WebChannelFacade.js.html index f4a2f7fe..3a1e45f1 100644 --- a/docs/file/src/WebChannelFacade.js.html +++ b/docs/file/src/WebChannelFacade.js.html @@ -39,8 +39,8 @@
  • TDataType
  • TBotOptions
  • TWebGroupOptions
  • -
  • ENodeJSHttpServer
  • -
  • ENodeJSHttpsServer
  • +
  • EHttpServer
  • +
  • EHttpsServer
  • ERTCConfiguration
  • EUint8Array
  • diff --git a/docs/file/src/index.common.doc.js.html b/docs/file/src/index.common.doc.js.html index f727e0d7..fbe89856 100644 --- a/docs/file/src/index.common.doc.js.html +++ b/docs/file/src/index.common.doc.js.html @@ -39,8 +39,8 @@
  • TDataType
  • TBotOptions
  • TWebGroupOptions
  • -
  • ENodeJSHttpServer
  • -
  • ENodeJSHttpsServer
  • +
  • EHttpServer
  • +
  • EHttpsServer
  • ERTCConfiguration
  • EUint8Array
  • @@ -213,7 +213,7 @@ * @property {RTCConfiguration} [rtcConfiguration] See WebGroupOptions.rtcConfiguration * @property {boolean} [autoRejoin] See WebGroupOptions.autoRejoin * @property {Object} bot Server related options of the bot. - * @property {NodeJSHttpServer|NodeJSHttpsServer} bot.server NodeJS http(s) server. + * @property {HttpServer|HttpsServer} bot.server NodeJS http(s) server. * @property {string} [bot.url] Bot server URL. * @property {boolean} [bot.perMessageDeflate] Enable/disable permessage-deflate. * @property {boolean} [bot.leaveOnceAlone] If true, bot will live (disconnect from the signaling server) if no other peers left in the group. @@ -225,10 +225,10 @@ * @external {Uint8Array} https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array */ /** - * @external {NodeJSHttpServer} https://nodejs.org/api/http.html#http_class_http_server + * @external {HttpServer} https://nodejs.org/api/http.html#http_class_http_server */ /** - * @external {NodeJSHttpsServer} https://nodejs.org/api/https.html#https_class_https_server + * @external {HttpsServer} https://nodejs.org/api/https.html#https_class_https_server */ diff --git a/docs/function/index.html b/docs/function/index.html index 8bdc5b9a..ea2e6338 100644 --- a/docs/function/index.html +++ b/docs/function/index.html @@ -39,8 +39,8 @@
  • TDataType
  • TBotOptions
  • TWebGroupOptions
  • -
  • ENodeJSHttpServer
  • -
  • ENodeJSHttpsServer
  • +
  • EHttpServer
  • +
  • EHttpsServer
  • ERTCConfiguration
  • EUint8Array
  • diff --git a/docs/identifiers.html b/docs/identifiers.html index 6d5d2c67..56e26925 100644 --- a/docs/identifiers.html +++ b/docs/identifiers.html @@ -39,8 +39,8 @@
  • TDataType
  • TBotOptions
  • TWebGroupOptions
  • -
  • ENodeJSHttpServer
  • -
  • ENodeJSHttpsServer
  • +
  • EHttpServer
  • +
  • EHttpsServer
  • ERTCConfiguration
  • EUint8Array
  • @@ -362,7 +362,7 @@ E - NodeJSHttpServer + HttpServer

    @@ -390,7 +390,7 @@ E - NodeJSHttpsServer + HttpsServer

    diff --git a/docs/index.html b/docs/index.html index f1747e9c..8a2455d9 100644 --- a/docs/index.html +++ b/docs/index.html @@ -39,8 +39,8 @@
  • TDataType
  • TBotOptions
  • TWebGroupOptions
  • -
  • ENodeJSHttpServer
  • -
  • ENodeJSHttpsServer
  • +
  • EHttpServer
  • +
  • EHttpsServer
  • ERTCConfiguration
  • EUint8Array
  • diff --git a/docs/index.json b/docs/index.json index b9b54450..85d1d9cd 100644 --- a/docs/index.json +++ b/docs/index.json @@ -3,7 +3,7 @@ "__docId__": 0, "kind": "file", "name": "src/BotFacade.js", - "content": "import { Bot as BotServer } from './Bot';\nlet botServer;\n/**\n * Bot server may be a member of severals groups. Each group is isolated.\n * He can be invited by a group member via {@link WebGroup#invite} method.\n * @example\n * // In NodeJS:\n * // Create a bot server with full mesh topology, without autorejoin feature\n * // and with specified Signaling and ICE servers for WebRTC.\n * // Bot server is listening on 'ws://BOT_HOST:BOT_PORT'.\n *\n * const http = require('http')\n * const server = http.createServer()\n * const bot = new Bot({\n * server,\n * webGroupOptions: {\n * signalingServer: 'wss://mysignaling.com',\n * rtcConfiguration: {\n * iceServers: [\n * {\n * urls: 'stun.l.google.com:19302'\n * },\n * {\n * urls: ['turn:myturn.com?transport=udp', 'turn:myturn?transport=tcp'],\n * username: 'user',\n * password: 'password'\n * }\n * ]\n * }\n * }\n * })\n *\n * bot.onWebGroup = (wg) => {\n * // YOUR CODE\n * }\n *\n * bot.onError = (err) => {\n * // YOUR CODE\n * }\n *\n * server.listen(BOT_PORT, BOT_HOST)\n */\nexport class Bot {\n /**\n * @param {BotOptions} options\n * @param {NodeJSHttpServer|NodeJSHttpsServer} options.server NodeJS http(s) server.\n * @param {string} [options.url] Bot server URL.\n * @param {boolean} [options.perMessageDeflate=false] Enable/disable permessage-deflate.\n * @param {boolean} [options.leaveOnceAlone=false] If true, bot will live (disconnect from the signaling server) if no other peers left in the group.\n * @param {WebGroupOptions} options.webGroupOptions Options for each {@link WebGroup} the bot is member of.\n * @param {Topology} [options.webGroupOptions.topology=Topology.FULL_MESH]\n * @param {string} [options.webGroupOptions.signalingServer='wss://signaling.netflux.coedit.re']\n * @param {RTCConfiguration} [options.webGroupOptions.rtcConfiguration={iceServers: [{urls: 'stun:stun3.l.google.com:19302'}]}]\n * @param {boolean} [options.webGroupOptions.autoRejoin=true]\n */\n constructor(options) {\n botServer = new BotServer(options);\n /**\n * Read-only NodeJS http server instance.\n * @type {NodeJSHttpServer|NodeJSHttpsServer}\n */\n this.server = undefined;\n Reflect.defineProperty(this, 'server', {\n configurable: false,\n enumerable: true,\n get: () => botServer.server,\n });\n /**\n * Read-only property of WebSocket server: permessage-deflate.\n * @type {NodeJSHttpServer|NodeJSHttpsServer}\n */\n this.perMessageDeflate = undefined;\n Reflect.defineProperty(this, 'perMessageDeflate', {\n configurable: false,\n enumerable: true,\n get: () => botServer.perMessageDeflate,\n });\n /**\n * Read-only property leaveOnceAlone.\n * @type {NodeJSHttpServer|NodeJSHttpsServer}\n */\n this.leaveOnceAlone = undefined;\n Reflect.defineProperty(this, 'leaveOnceAlone', {\n configurable: false,\n enumerable: true,\n get: () => botServer.leaveOnceAlone,\n });\n /**\n * Read-only set of web groups the bot is member of.\n * @type {Set}\n */\n this.webGroups = undefined;\n Reflect.defineProperty(this, 'webGroups', {\n configurable: false,\n enumerable: true,\n get: () => botServer.webGroups,\n });\n /**\n * Bot server url. Used to invite the bot in a web group via {@link WebGroup#invite} method.\n * @type {string}\n */\n this.url = undefined;\n Reflect.defineProperty(this, 'url', {\n configurable: false,\n enumerable: true,\n get: () => botServer.url,\n });\n /**\n * This handler is called when the bot has been invited into a group by one of its members.\n * @type {function(wg: WebGroup)} handler\n */\n this.onWebGroup = undefined;\n Reflect.defineProperty(this, 'onWebGroup', {\n configurable: true,\n enumerable: true,\n get: () => (botServer.onWebGroup.name === 'none' ? undefined : botServer.onWebGroup),\n set: (handler) => {\n if (typeof handler !== 'function') {\n botServer.onWebGroup = function none() { };\n }\n else {\n botServer.onWebGroup = handler;\n }\n },\n });\n /**\n * This handler is called when an error occurs on WebSocket server.\n * @type {function(err: Error)}\n */\n this.onError = undefined;\n Reflect.defineProperty(this, 'onError', {\n configurable: true,\n enumerable: true,\n get: () => (botServer.onError.name === 'none' ? undefined : botServer.onError),\n set: (handler) => {\n if (typeof handler !== 'function') {\n botServer.onError = function none() { };\n }\n else {\n botServer.onError = handler;\n }\n },\n });\n }\n}\n", + "content": "import { Bot as BotServer } from './Bot';\nlet botServer;\n/**\n * Bot server may be a member of severals groups. Each group is isolated.\n * He can be invited by a group member via {@link WebGroup#invite} method.\n * @example\n * // In NodeJS:\n * // Create a bot server with full mesh topology, without autorejoin feature\n * // and with specified Signaling and ICE servers for WebRTC.\n * // Bot server is listening on 'ws://BOT_HOST:BOT_PORT'.\n *\n * const http = require('http')\n * const server = http.createServer()\n * const bot = new Bot({\n * server,\n * webGroupOptions: {\n * signalingServer: 'wss://mysignaling.com',\n * rtcConfiguration: {\n * iceServers: [\n * {\n * urls: 'stun.l.google.com:19302'\n * },\n * {\n * urls: ['turn:myturn.com?transport=udp', 'turn:myturn?transport=tcp'],\n * username: 'user',\n * password: 'password'\n * }\n * ]\n * }\n * }\n * })\n *\n * bot.onWebGroup = (wg) => {\n * // YOUR CODE\n * }\n *\n * bot.onError = (err) => {\n * // YOUR CODE\n * }\n *\n * server.listen(BOT_PORT, BOT_HOST)\n */\nexport class Bot {\n /**\n * @param {BotOptions} options\n * @param {HttpServer|HttpsServer} options.server NodeJS http(s) server.\n * @param {string} [options.url] Bot server URL.\n * @param {boolean} [options.perMessageDeflate=false] Enable/disable permessage-deflate.\n * @param {boolean} [options.leaveOnceAlone=false] If true, bot will live (disconnect from the signaling server) if no other peers left in the group.\n * @param {WebGroupOptions} options.webGroupOptions Options for each {@link WebGroup} the bot is member of.\n * @param {Topology} [options.webGroupOptions.topology=Topology.FULL_MESH]\n * @param {string} [options.webGroupOptions.signalingServer='wss://signaling.netflux.coedit.re']\n * @param {RTCConfiguration} [options.webGroupOptions.rtcConfiguration={iceServers: [{urls: 'stun:stun3.l.google.com:19302'}]}]\n * @param {boolean} [options.webGroupOptions.autoRejoin=true]\n */\n constructor(options) {\n botServer = new BotServer(options);\n /**\n * Read-only NodeJS http server instance.\n * @type {HttpServer|HttpsServer}\n */\n this.server = undefined;\n Reflect.defineProperty(this, 'server', {\n configurable: false,\n enumerable: true,\n get: () => botServer.server,\n });\n /**\n * Read-only property of WebSocket server: permessage-deflate.\n * @type {HttpServer|HttpsServer}\n */\n this.perMessageDeflate = undefined;\n Reflect.defineProperty(this, 'perMessageDeflate', {\n configurable: false,\n enumerable: true,\n get: () => botServer.perMessageDeflate,\n });\n /**\n * Read-only property leaveOnceAlone.\n * @type {HttpServer|HttpsServer}\n */\n this.leaveOnceAlone = undefined;\n Reflect.defineProperty(this, 'leaveOnceAlone', {\n configurable: false,\n enumerable: true,\n get: () => botServer.leaveOnceAlone,\n });\n /**\n * Read-only set of web groups the bot is member of.\n * @type {Set}\n */\n this.webGroups = undefined;\n Reflect.defineProperty(this, 'webGroups', {\n configurable: false,\n enumerable: true,\n get: () => botServer.webGroups,\n });\n /**\n * Bot server url. Used to invite the bot in a web group via {@link WebGroup#invite} method.\n * @type {string}\n */\n this.url = undefined;\n Reflect.defineProperty(this, 'url', {\n configurable: false,\n enumerable: true,\n get: () => botServer.url,\n });\n /**\n * This handler is called when the bot has been invited into a group by one of its members.\n * @type {function(wg: WebGroup)} handler\n */\n this.onWebGroup = undefined;\n Reflect.defineProperty(this, 'onWebGroup', {\n configurable: true,\n enumerable: true,\n get: () => (botServer.onWebGroup.name === 'none' ? undefined : botServer.onWebGroup),\n set: (handler) => {\n if (typeof handler !== 'function') {\n botServer.onWebGroup = function none() { };\n }\n else {\n botServer.onWebGroup = handler;\n }\n },\n });\n /**\n * This handler is called when an error occurs on WebSocket server.\n * @type {function(err: Error)}\n */\n this.onError = undefined;\n Reflect.defineProperty(this, 'onError', {\n configurable: true,\n enumerable: true,\n get: () => (botServer.onError.name === 'none' ? undefined : botServer.onError),\n set: (handler) => {\n if (typeof handler !== 'function') {\n botServer.onError = function none() { };\n }\n else {\n botServer.onError = handler;\n }\n },\n });\n }\n}\n", "static": true, "longname": "/home/philippe/workspace/netflux/docs/jsFromTs/src/BotFacade.js", "access": "public", @@ -54,8 +54,8 @@ { "nullable": null, "types": [ - "NodeJSHttpServer", - "NodeJSHttpsServer" + "HttpServer", + "HttpsServer" ], "spread": false, "optional": false, @@ -169,8 +169,8 @@ "type": { "nullable": null, "types": [ - "NodeJSHttpServer", - "NodeJSHttpsServer" + "HttpServer", + "HttpsServer" ], "spread": false, "description": null @@ -189,8 +189,8 @@ "type": { "nullable": null, "types": [ - "NodeJSHttpServer", - "NodeJSHttpsServer" + "HttpServer", + "HttpsServer" ], "spread": false, "description": null @@ -209,8 +209,8 @@ "type": { "nullable": null, "types": [ - "NodeJSHttpServer", - "NodeJSHttpsServer" + "HttpServer", + "HttpsServer" ], "spread": false, "description": null @@ -858,7 +858,7 @@ "__docId__": 36, "kind": "file", "name": "src/index.common.doc.js", - "content": "import { LogLevel as Logs, setLogLevel as setLogs } from './misc/util';\nimport { TopologyEnum } from './service/topology/Topology';\nimport { SignalingState as SigState } from './Signaling';\nimport { WebChannelState } from './WebChannelState';\nexport { WebGroup } from './WebChannelFacade';\n/**\n * Set log level for debugging utility. By default all logs are disabled.\n * @param {...LogLevel} levels\n */\nexport function setLogLevel(...levels) {\n setLogs(...levels);\n}\n/**\n * The state enum of the signaling server.\n */\nexport class SignalingState {\n /**\n * `0`: the connection is not yet open (equivalent to `WebSocket.CONNECTING`).\n * @type {number}\n */\n static get CONNECTING() {\n return SigState.CONNECTING;\n }\n /**\n * `1`: the connection is open and ready to communicate (equivalent to `WebSocket.OPEN`).\n * @type {number}\n */\n static get OPEN() {\n return SigState.OPEN;\n }\n /**\n * `3`: the connection is closed or couldn't be opened (equivalent to `WebSocket.CLOSED`).\n * @type {number}\n */\n static get CLOSED() {\n return SigState.CLOSED;\n }\n /**\n * `2`: signaling server is checking wether you are still connected to the group. If it is not the case, then\n * subscribs you to one of the group member in order to create a connection with him.\n * @type {number}\n */\n static get CHECKING() {\n return SigState.CHECKING;\n }\n /**\n * `4`: a connection has been established with one of the group member or you are the only member of the group.\n * From now the signaling is no longer needed, because the joining process will continue with a help of this member.\n * @type {number}\n */\n static get CHECKED() {\n return SigState.CHECKED;\n }\n}\n/**\n * The state enum of {@link WebGroup}.\n */\nexport class WebGroupState {\n /**\n * `0`: you haven't joined the group yet.\n * @type {number}\n */\n static get JOINING() {\n return WebChannelState.JOINING;\n }\n /**\n * `1`: you have sussessfully joined the group and ready to communicate.\n * @type {number}\n */\n static get JOINED() {\n return WebChannelState.JOINED;\n }\n /**\n * `3`: you have sussessfully left the group.\n * @type {number}\n */\n static get LEFT() {\n return WebChannelState.LEFT;\n }\n}\n/**\n * The topology enum. More topologies will be added in the future\n */\nexport class Topology {\n /**\n * Full mesh topology identifier.\n * @type {number}\n */\n static get FULL_MESH() {\n return TopologyEnum.FULL_MESH;\n }\n}\n/**\n * The log level enum for debugging purposes.\n */\nexport class LogLevel {\n /**\n * Equals to `1`, allows logs for debug.\n * @type {number}\n */\n static get DEBUG() {\n return Logs.DEBUG;\n }\n /**\n * Equals to `2`, logs for WebGroup module.\n * @type {number}\n */\n static get WEB_GROUP() {\n return Logs.WEB_GROUP;\n }\n /**\n * Equals to `3`, logs for DataChannelBuilder module.\n * @type {number}\n */\n static get WEBRTC() {\n return Logs.WEBRTC;\n }\n /**\n * Equals to `4`, logs for Channel module.\n * @type {number}\n */\n static get CHANNEL() {\n return Logs.CHANNEL;\n }\n /**\n * Equals to `5`, logs for Topology module.\n * @type {number}\n */\n static get TOPOLOGY() {\n return Logs.TOPOLOGY;\n }\n /**\n * Equals to `6`, logs for Signaling module.\n * @type {number}\n */\n static get SIGNALING() {\n return Logs.SIGNALING;\n }\n /**\n * Equals to `7`, logs for ChannelBuilder module.\n * @type {number}\n */\n static get CHANNEL_BUILDER() {\n return Logs.CHANNEL_BUILDER;\n }\n}\n/**\n * The options to be passed into {@link WebGroup} constructor.\n * @typedef {Object} WebGroupOptions\n * @property {Topology} [topology] Topology identifier\n * (Full mesh is the only one supported by Netflux for now).\n * @property {string} [signalingServer] Signaling URL for WebRTC.\n * @property {RTCConfiguration} [rtcConfiguration] Configuration for WebRTC.\n * @property {boolean} [autoRejoin] Whether to automatically rejoin the web group\n * on disconnect or not. Its value may be modified after {@link WebGroup}\n * instantiation at any time.\n */\n/**\n * The options to be passed into {@link Bot} constructor.\n * @typedef {Object} BotOptions\n * @property {Topology} [topology] See WebGroupOptions.topology\n * @property {string} [signalingServer] See WebGroupOptions.signalingServer\n * @property {RTCConfiguration} [rtcConfiguration] See WebGroupOptions.rtcConfiguration\n * @property {boolean} [autoRejoin] See WebGroupOptions.autoRejoin\n * @property {Object} bot Server related options of the bot.\n * @property {NodeJSHttpServer|NodeJSHttpsServer} bot.server NodeJS http(s) server.\n * @property {string} [bot.url] Bot server URL.\n * @property {boolean} [bot.perMessageDeflate] Enable/disable permessage-deflate.\n * @property {boolean} [bot.leaveOnceAlone] If true, bot will live (disconnect from the signaling server) if no other peers left in the group.\n */\n/**\n * @external {RTCConfiguration} https://developer.mozilla.org/en/docs/Web/API/RTCConfiguration\n */\n/**\n * @external {Uint8Array} https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array\n */\n/**\n * @external {NodeJSHttpServer} https://nodejs.org/api/http.html#http_class_http_server\n */\n/**\n * @external {NodeJSHttpsServer} https://nodejs.org/api/https.html#https_class_https_server\n */\n", + "content": "import { LogLevel as Logs, setLogLevel as setLogs } from './misc/util';\nimport { TopologyEnum } from './service/topology/Topology';\nimport { SignalingState as SigState } from './Signaling';\nimport { WebChannelState } from './WebChannelState';\nexport { WebGroup } from './WebChannelFacade';\n/**\n * Set log level for debugging utility. By default all logs are disabled.\n * @param {...LogLevel} levels\n */\nexport function setLogLevel(...levels) {\n setLogs(...levels);\n}\n/**\n * The state enum of the signaling server.\n */\nexport class SignalingState {\n /**\n * `0`: the connection is not yet open (equivalent to `WebSocket.CONNECTING`).\n * @type {number}\n */\n static get CONNECTING() {\n return SigState.CONNECTING;\n }\n /**\n * `1`: the connection is open and ready to communicate (equivalent to `WebSocket.OPEN`).\n * @type {number}\n */\n static get OPEN() {\n return SigState.OPEN;\n }\n /**\n * `3`: the connection is closed or couldn't be opened (equivalent to `WebSocket.CLOSED`).\n * @type {number}\n */\n static get CLOSED() {\n return SigState.CLOSED;\n }\n /**\n * `2`: signaling server is checking wether you are still connected to the group. If it is not the case, then\n * subscribs you to one of the group member in order to create a connection with him.\n * @type {number}\n */\n static get CHECKING() {\n return SigState.CHECKING;\n }\n /**\n * `4`: a connection has been established with one of the group member or you are the only member of the group.\n * From now the signaling is no longer needed, because the joining process will continue with a help of this member.\n * @type {number}\n */\n static get CHECKED() {\n return SigState.CHECKED;\n }\n}\n/**\n * The state enum of {@link WebGroup}.\n */\nexport class WebGroupState {\n /**\n * `0`: you haven't joined the group yet.\n * @type {number}\n */\n static get JOINING() {\n return WebChannelState.JOINING;\n }\n /**\n * `1`: you have sussessfully joined the group and ready to communicate.\n * @type {number}\n */\n static get JOINED() {\n return WebChannelState.JOINED;\n }\n /**\n * `3`: you have sussessfully left the group.\n * @type {number}\n */\n static get LEFT() {\n return WebChannelState.LEFT;\n }\n}\n/**\n * The topology enum. More topologies will be added in the future\n */\nexport class Topology {\n /**\n * Full mesh topology identifier.\n * @type {number}\n */\n static get FULL_MESH() {\n return TopologyEnum.FULL_MESH;\n }\n}\n/**\n * The log level enum for debugging purposes.\n */\nexport class LogLevel {\n /**\n * Equals to `1`, allows logs for debug.\n * @type {number}\n */\n static get DEBUG() {\n return Logs.DEBUG;\n }\n /**\n * Equals to `2`, logs for WebGroup module.\n * @type {number}\n */\n static get WEB_GROUP() {\n return Logs.WEB_GROUP;\n }\n /**\n * Equals to `3`, logs for DataChannelBuilder module.\n * @type {number}\n */\n static get WEBRTC() {\n return Logs.WEBRTC;\n }\n /**\n * Equals to `4`, logs for Channel module.\n * @type {number}\n */\n static get CHANNEL() {\n return Logs.CHANNEL;\n }\n /**\n * Equals to `5`, logs for Topology module.\n * @type {number}\n */\n static get TOPOLOGY() {\n return Logs.TOPOLOGY;\n }\n /**\n * Equals to `6`, logs for Signaling module.\n * @type {number}\n */\n static get SIGNALING() {\n return Logs.SIGNALING;\n }\n /**\n * Equals to `7`, logs for ChannelBuilder module.\n * @type {number}\n */\n static get CHANNEL_BUILDER() {\n return Logs.CHANNEL_BUILDER;\n }\n}\n/**\n * The options to be passed into {@link WebGroup} constructor.\n * @typedef {Object} WebGroupOptions\n * @property {Topology} [topology] Topology identifier\n * (Full mesh is the only one supported by Netflux for now).\n * @property {string} [signalingServer] Signaling URL for WebRTC.\n * @property {RTCConfiguration} [rtcConfiguration] Configuration for WebRTC.\n * @property {boolean} [autoRejoin] Whether to automatically rejoin the web group\n * on disconnect or not. Its value may be modified after {@link WebGroup}\n * instantiation at any time.\n */\n/**\n * The options to be passed into {@link Bot} constructor.\n * @typedef {Object} BotOptions\n * @property {Topology} [topology] See WebGroupOptions.topology\n * @property {string} [signalingServer] See WebGroupOptions.signalingServer\n * @property {RTCConfiguration} [rtcConfiguration] See WebGroupOptions.rtcConfiguration\n * @property {boolean} [autoRejoin] See WebGroupOptions.autoRejoin\n * @property {Object} bot Server related options of the bot.\n * @property {HttpServer|HttpsServer} bot.server NodeJS http(s) server.\n * @property {string} [bot.url] Bot server URL.\n * @property {boolean} [bot.perMessageDeflate] Enable/disable permessage-deflate.\n * @property {boolean} [bot.leaveOnceAlone] If true, bot will live (disconnect from the signaling server) if no other peers left in the group.\n */\n/**\n * @external {RTCConfiguration} https://developer.mozilla.org/en/docs/Web/API/RTCConfiguration\n */\n/**\n * @external {Uint8Array} https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array\n */\n/**\n * @external {HttpServer} https://nodejs.org/api/http.html#http_class_http_server\n */\n/**\n * @external {HttpsServer} https://nodejs.org/api/https.html#https_class_https_server\n */\n", "static": true, "longname": "/home/philippe/workspace/netflux/docs/jsFromTs/src/index.common.doc.js", "access": "public", @@ -1264,8 +1264,8 @@ { "nullable": null, "types": [ - "NodeJSHttpServer", - "NodeJSHttpsServer" + "HttpServer", + "HttpsServer" ], "spread": false, "optional": false, @@ -1336,22 +1336,22 @@ { "__docId__": 55, "kind": "external", - "name": "NodeJSHttpServer", + "name": "HttpServer", "externalLink": "https://nodejs.org/api/http.html#http_class_http_server", "memberof": "src/index.common.doc.js", "static": true, - "longname": "src/index.common.doc.js~NodeJSHttpServer", + "longname": "src/index.common.doc.js~HttpServer", "access": "public", "description": "" }, { "__docId__": 56, "kind": "external", - "name": "NodeJSHttpsServer", + "name": "HttpsServer", "externalLink": "https://nodejs.org/api/https.html#https_class_https_server", "memberof": "src/index.common.doc.js", "static": true, - "longname": "src/index.common.doc.js~NodeJSHttpsServer", + "longname": "src/index.common.doc.js~HttpsServer", "access": "public", "description": "" }, diff --git a/docs/jsFromTs/src/Bot.d.ts b/docs/jsFromTs/src/Bot.d.ts new file mode 100644 index 00000000..e2af7882 --- /dev/null +++ b/docs/jsFromTs/src/Bot.d.ts @@ -0,0 +1,28 @@ +/// +import { Server as HttpServer } from 'http'; +import { Server as HttpsServer } from 'https'; +import { IWebChannelOptions } from './WebChannel'; +import { WebGroup } from './WebChannelFacade'; +export interface IBotOptions { + url?: string; + server: HttpServer | HttpsServer; + perMessageDeflate?: boolean; + leaveOnceAlone?: boolean; + webGroupOptions?: IWebChannelOptions; +} +export declare class Bot { + server: HttpServer | HttpsServer; + perMessageDeflate: boolean; + webGroups: Map; + onWebGroup: (wg: WebGroup) => void; + onError: (err: Error) => void; + leaveOnceAlone: boolean; + private listenUrl; + private webSocketServer; + private wcOptions; + constructor(options: IBotOptions); + readonly url: string; + private init; + private validateURLQuery; + private readURLQuery; +} diff --git a/docs/jsFromTs/src/Bot.js b/docs/jsFromTs/src/Bot.js index a2ad7b6b..5d2f035d 100644 --- a/docs/jsFromTs/src/Bot.js +++ b/docs/jsFromTs/src/Bot.js @@ -1,11 +1,11 @@ +import * as urlLib from 'url'; +import { Server } from 'uws'; import { Channel } from './Channel'; import { WebGroupState } from './index.common.doc'; import { log } from './misc/util'; import { webChannelDefaultOptions } from './WebChannel'; import { wcs, WebGroup } from './WebChannelFacade'; import { WebSocketBuilder } from './WebSocketBuilder'; -const urlLib = require('url'); -const uws = require('uws'); const botDefaultOptions = { url: '', perMessageDeflate: false, @@ -15,13 +15,12 @@ const botDefaultOptions = { }; export class Bot { constructor(options) { - this.wcOptions = Object.assign({}, webChannelDefaultOptions, options.webGroupOptions); - const fullOptions = Object.assign({}, botDefaultOptions, options); - fullOptions.webGroupOptions = this.wcOptions; - this.leaveOnceAlone = fullOptions.leaveOnceAlone; - this.server = fullOptions.server; - this.listenUrl = fullOptions.url; - this.perMessageDeflate = fullOptions.perMessageDeflate; + this.wcOptions = { ...webChannelDefaultOptions, ...options.webGroupOptions }; + const { leaveOnceAlone, server, url, perMessageDeflate } = { ...botDefaultOptions, ...options }; + this.leaveOnceAlone = leaveOnceAlone; + this.server = server; + this.listenUrl = url; + this.perMessageDeflate = perMessageDeflate; this.webGroups = new Map(); this.onWebGroup = function none() { }; this.onError = function none() { }; @@ -33,12 +32,12 @@ export class Bot { return this.listenUrl; } else { - const info = this.server.address(); - return `ws://${info.address}:${info.port}`; + const { address, port } = this.server.address(); + return `ws://${address}:${port}`; } } init() { - this.webSocketServer = new uws.Server({ + this.webSocketServer = new Server({ perMessageDeflate: this.perMessageDeflate, verifyClient: (info) => this.validateURLQuery(info), server: this.server, @@ -52,8 +51,9 @@ export class Bot { this.webSocketServer.on('connection', (ws) => { const { type, wcId, senderId, key } = this.readURLQuery(ws.upgradeReq.url); let webSocketBuilder; - if (type === Channel.WITH_MEMBER) { - const wg = new WebGroup(this.wcOptions); + let wg = this.webGroups.get(wcId); + if (type === Channel.WITH_MEMBER && (wg === undefined || wg.state === WebGroupState.LEFT)) { + wg = new WebGroup(this.wcOptions); this.webGroups.set(wcId, wg); const wc = wcs.get(wg); if (this.leaveOnceAlone) { @@ -67,10 +67,12 @@ export class Bot { wc.onMyId(wc.myId); webSocketBuilder = wc.webSocketBuilder; } + else if (wg !== undefined) { + webSocketBuilder = wcs.get(wg).webSocketBuilder; + } else { - const wg = this.webGroups.get(wcId); - const wc = wcs.get(wg); - webSocketBuilder = wc.webSocketBuilder; + ws.close(); + return; } webSocketBuilder.newWebSocket(ws, senderId, type); }); @@ -99,15 +101,28 @@ export class Bot { } } readURLQuery(url) { + const prefix = 'Query parse error: '; const { type, wcId, senderId, key } = urlLib.parse(url, true).query; + if (typeof type !== 'string') { + throw new Error(`${prefix}"type" parameter is not a string `); + } + if (typeof wcId !== 'string') { + throw new Error(`${prefix}"wcId" parameter is not a string `); + } + if (typeof senderId !== 'string') { + throw new Error(`${prefix}"senderId" parameter is not a string `); + } + if (typeof key !== 'string' && typeof key !== 'undefined') { + throw new Error(`${prefix}"type" parameter is not a string `); + } if (!type) { - throw new Error('Query parse error: "type" parameter is undefined'); + throw new Error(`${prefix}"type" parameter is undefined`); } if (!wcId) { - throw new Error('Query parse error: "wcId" parameter is undefined'); + throw new Error(`${prefix}"wcId" parameter is undefined`); } if (!senderId) { - throw new Error('Query parse error: "senderId" parameter is undefined'); + throw new Error(`${prefix}"senderId" parameter is undefined`); } return { type: Number.parseInt(type, 10), diff --git a/docs/jsFromTs/src/BotFacade.d.ts b/docs/jsFromTs/src/BotFacade.d.ts new file mode 100644 index 00000000..7e4a40ca --- /dev/null +++ b/docs/jsFromTs/src/BotFacade.d.ts @@ -0,0 +1,68 @@ +/// +import { Server as HttpServer } from 'http'; +import { Server as HttpsServer } from 'https'; +import { IBotOptions as BotOptions } from './Bot'; +import { WebGroup } from './WebChannelFacade'; +export { BotOptions }; +/** + * Bot server may be a member of severals groups. Each group is isolated. + * He can be invited by a group member via {@link WebGroup#invite} method. + * @example + * // In NodeJS: + * // Create a bot server with full mesh topology, without autorejoin feature + * // and with specified Signaling and ICE servers for WebRTC. + * // Bot server is listening on 'ws://BOT_HOST:BOT_PORT'. + * + * const http = require('http') + * const server = http.createServer() + * const bot = new Bot({ + * server, + * webGroupOptions: { + * signalingServer: 'wss://mysignaling.com', + * rtcConfiguration: { + * iceServers: [ + * { + * urls: 'stun.l.google.com:19302' + * }, + * { + * urls: ['turn:myturn.com?transport=udp', 'turn:myturn?transport=tcp'], + * username: 'user', + * password: 'password' + * } + * ] + * } + * } + * }) + * + * bot.onWebGroup = (wg) => { + * // YOUR CODE + * } + * + * bot.onError = (err) => { + * // YOUR CODE + * } + * + * server.listen(BOT_PORT, BOT_HOST) + */ +export declare class Bot { + server: HttpServer | HttpsServer; + perMessageDeflate: boolean; + webGroups: Map; + url: string; + leaveOnceAlone: boolean; + onWebGroup: (((wg: WebGroup) => void)) | undefined | null; + onError: (((err: Error) => void)) | undefined | null; + /** + * @param {BotOptions} options + * @param {HttpServer|HttpsServer} options.server NodeJS http(s) server. + * @param {string} [options.url] Bot server URL. + * @param {boolean} [options.perMessageDeflate=false] Enable/disable permessage-deflate. + * @param {boolean} [options.leaveOnceAlone=false] If true, bot will live (disconnect from the signaling server) if no other peers left in the group. + * @param {WebGroupOptions} options.webGroupOptions Options for each {@link WebGroup} the bot is member of. + * @param {Topology} [options.webGroupOptions.topology=Topology.FULL_MESH] + * @param {string} [options.webGroupOptions.signalingServer='wss://signaling.netflux.coedit.re'] + * @param {RTCConfiguration} [options.webGroupOptions.rtcConfiguration={iceServers: [{urls: 'stun:stun3.l.google.com:19302'}]}] + * @param {boolean} [options.webGroupOptions.autoRejoin=true] + */ + constructor(options: BotOptions); +} diff --git a/docs/jsFromTs/src/BotFacade.js b/docs/jsFromTs/src/BotFacade.js index 42a2f9db..bfe1e5d0 100644 --- a/docs/jsFromTs/src/BotFacade.js +++ b/docs/jsFromTs/src/BotFacade.js @@ -43,7 +43,7 @@ let botServer; export class Bot { /** * @param {BotOptions} options - * @param {NodeJSHttpServer|NodeJSHttpsServer} options.server NodeJS http(s) server. + * @param {HttpServer|HttpsServer} options.server NodeJS http(s) server. * @param {string} [options.url] Bot server URL. * @param {boolean} [options.perMessageDeflate=false] Enable/disable permessage-deflate. * @param {boolean} [options.leaveOnceAlone=false] If true, bot will live (disconnect from the signaling server) if no other peers left in the group. @@ -57,7 +57,7 @@ export class Bot { botServer = new BotServer(options); /** * Read-only NodeJS http server instance. - * @type {NodeJSHttpServer|NodeJSHttpsServer} + * @type {HttpServer|HttpsServer} */ this.server = undefined; Reflect.defineProperty(this, 'server', { @@ -67,7 +67,7 @@ export class Bot { }); /** * Read-only property of WebSocket server: permessage-deflate. - * @type {NodeJSHttpServer|NodeJSHttpsServer} + * @type {HttpServer|HttpsServer} */ this.perMessageDeflate = undefined; Reflect.defineProperty(this, 'perMessageDeflate', { @@ -77,7 +77,7 @@ export class Bot { }); /** * Read-only property leaveOnceAlone. - * @type {NodeJSHttpServer|NodeJSHttpsServer} + * @type {HttpServer|HttpsServer} */ this.leaveOnceAlone = undefined; Reflect.defineProperty(this, 'leaveOnceAlone', { diff --git a/docs/jsFromTs/src/Channel.d.ts b/docs/jsFromTs/src/Channel.d.ts new file mode 100644 index 00000000..1e34fc33 --- /dev/null +++ b/docs/jsFromTs/src/Channel.d.ts @@ -0,0 +1,45 @@ +import { RTCDataChannel } from './misc/env'; +import { IMessage } from './proto/index'; +import { WebChannel } from './WebChannel'; +export interface IChannelInitData { + members: number[]; +} +export declare const MAXIMUM_MISSED_HEARTBEAT = 3; +/** + * Wrapper class for `RTCDataChannel` and `WebSocket`. + */ +export declare class Channel { + static WITH_INTERNAL: number; + static WITH_JOINING: number; + static WITH_MEMBER: number; + static remoteType(type: number): number; + id: number; + send: (data: Uint8Array) => void; + type: number; + missedHeartbeat: number; + init: Promise; + initData: IChannelInitData | undefined; + /** + * Id of the peer who is at the other end of this channel. + */ + private wsOrDc; + private pc; + private wc; + private heartbeatMsg; + private resolveInit; + /** + * Creates a channel from existing `RTCDataChannel` or `WebSocket`. + */ + constructor(wc: WebChannel, wsOrDc: WebSocket | RTCDataChannel, type: number, id: number, pc?: RTCPeerConnection); + readonly url: string; + encodeAndSend({ senderId, recipientId, serviceId, content }?: IMessage): void; + close(): void; + sendHeartbeat(): void; + private sendInBrowser; + private sendInNodeOverWebSocket; + private sendInNodeOverDataChannel; + private handleInitMessage; + private initHandlers; + private createHeartbeatMsg; + private sendInitPing; +} diff --git a/docs/jsFromTs/src/Channel.js b/docs/jsFromTs/src/Channel.js index 3c24f60d..7f40eaf0 100644 --- a/docs/jsFromTs/src/Channel.js +++ b/docs/jsFromTs/src/Channel.js @@ -172,7 +172,7 @@ export class Channel { // Service Message } else { - this.wc.streamSubject.next(Object.assign({ channel: this }, msg)); + this.wc.streamSubject.next({ channel: this, ...msg }); } } if (msg.recipientId !== this.wc.myId) { diff --git a/docs/jsFromTs/src/Signaling.d.ts b/docs/jsFromTs/src/Signaling.d.ts new file mode 100644 index 00000000..28b3dc31 --- /dev/null +++ b/docs/jsFromTs/src/Signaling.d.ts @@ -0,0 +1,48 @@ +import { Observable } from 'rxjs'; +import { IStream } from './misc/util'; +import { IMessage, Message } from './proto/index'; +import { WebChannel } from './WebChannel'; +export declare type InSigMsg = Message; +export declare type OutSigMsg = IMessage; +export declare enum SignalingState { + CONNECTING = 0, + OPEN = 1, + CHECKING = 2, + CHECKED = 4, + CLOSED = 3 +} +/** + * This class represents a door of the `WebChannel` for the current peer. If the door + * is open, then clients can join the `WebChannel` through this peer. There are as + * many doors as peers in the `WebChannel` and each of them can be closed or opened. + */ +export declare class Signaling implements IStream { + readonly STREAM_ID: number; + url: string; + state: SignalingState; + connected: boolean; + private wc; + private stateSubject; + private ws; + private connectionTimeout; + private streamSubject; + private heartbeatInterval; + private missedHeartbeat; + constructor(wc: WebChannel, url: string); + readonly messageFromStream: Observable; + sendOverStream(msg: OutSigMsg): void; + readonly onState: Observable; + check(): void; + connect(key: string): void; + /** + * Close the `WebSocket` with Signaling server. + */ + close(): void; + private clean; + private handleMessage; + private setState; + private startHeartbeat; + private send; + private heartbeat; + private fullUrl; +} diff --git a/docs/jsFromTs/src/WebChannel.d.ts b/docs/jsFromTs/src/WebChannel.d.ts new file mode 100644 index 00000000..c7f94b68 --- /dev/null +++ b/docs/jsFromTs/src/WebChannel.d.ts @@ -0,0 +1,91 @@ +import { Observable, Subject } from 'rxjs'; +import { Channel } from './Channel'; +import { IStream } from './misc/util'; +import { IMessage, Message } from './proto/index'; +import { ChannelBuilder } from './service/channelBuilder/ChannelBuilder'; +import { ITopology, TopologyEnum } from './service/topology/Topology'; +import { UserDataType, UserMessage } from './service/UserMessage'; +import { Signaling, SignalingState } from './Signaling'; +import { WebChannelState } from './WebChannelState'; +import { WebSocketBuilder } from './WebSocketBuilder'; +export interface IWebChannelOptions { + topology?: TopologyEnum; + signalingServer?: string; + rtcConfiguration?: RTCConfiguration; + autoRejoin?: boolean; +} +export declare const webChannelDefaultOptions: { + topology: TopologyEnum; + signalingServer: string; + rtcConfiguration: { + iceServers: { + urls: string; + }[]; + }; + autoRejoin: boolean; +}; +export interface InWcMsg extends Message { + channel: Channel; +} +export declare type OutWcMessage = IMessage; +/** + * This class is an API starting point. It represents a group of collaborators + * also called peers. Each peer can send/receive broadcast as well as personal + * messages. Every peer in the `WebChannel` can invite another person to join + * the `WebChannel` and he also possess enough information to be able to add it + * preserving the current `WebChannel` structure (network topology). + * [[include:installation.md]] + */ +export declare class WebChannel implements IStream { + readonly STREAM_ID: number; + members: number[]; + topologyEnum: TopologyEnum; + myId: number; + key: string; + autoRejoin: boolean; + rtcConfiguration: RTCConfiguration; + state: WebChannelState; + onSignalingStateChange: (state: SignalingState) => void; + onStateChange: (state: WebChannelState) => void; + onMemberJoin: (id: number) => void; + onMemberLeave: (id: number) => void; + onMessage: (id: number, msg: UserDataType) => void; + onMyId: (id: number) => void; + webSocketBuilder: WebSocketBuilder; + channelBuilder: ChannelBuilder; + topology: ITopology; + signaling: Signaling; + userMsg: UserMessage; + streamSubject: Subject; + private _id; + private idSubject; + private _onAlone; + private rejoinEnabled; + private rejoinTimer; + constructor(options: IWebChannelOptions); + readonly onIdChange: Observable; + id: number; + readonly messageFromStream: Observable; + onAlone: () => void; + sendOverStream(msg: OutWcMessage): void; + join(key?: string): void; + invite(url: string): void; + leave(): void; + send(data: UserDataType): void; + sendTo(id: number, data: UserDataType): void; + onMemberJoinProxy(id: number): void; + onAdjacentMembersLeaveProxy(ids: number[]): void; + onDistantMembersLeaveProxy(ids: number[]): void; + init(key: string, id?: number): void; + private clean; + private setState; + private setTopology; + private subscribeToSignalingState; + private subscribeToBrowserEvents; + private startJoin; + private rejoin; + private reconnectToSignaling; + private onBrowserBack; + private onMemberLeaveProxy; + private internalLeave; +} diff --git a/docs/jsFromTs/src/WebChannel.js b/docs/jsFromTs/src/WebChannel.js index a741b492..bc8e781f 100644 --- a/docs/jsFromTs/src/WebChannel.js +++ b/docs/jsFromTs/src/WebChannel.js @@ -28,12 +28,15 @@ const REJOIN_TIMEOUT = 3000; export class WebChannel { constructor(options) { this.STREAM_ID = 2; - const fullOptions = Object.assign({}, webChannelDefaultOptions, options); + const { topology, autoRejoin, rtcConfiguration, signalingServer } = { + ...webChannelDefaultOptions, + ...options, + }; this.streamSubject = new Subject(); this.idSubject = new Subject(); - this.topologyEnum = fullOptions.topology; - this.autoRejoin = fullOptions.autoRejoin; - this.rtcConfiguration = fullOptions.rtcConfiguration; + this.topologyEnum = topology; + this.autoRejoin = autoRejoin; + this.rtcConfiguration = rtcConfiguration; this.members = []; this._id = 0; this.key = ''; @@ -51,11 +54,11 @@ export class WebChannel { this.onSignalingStateChange = function none() { }; // Initialize services this.userMsg = new UserMessage(); - this.signaling = new Signaling(this, fullOptions.signalingServer); + this.signaling = new Signaling(this, signalingServer); this.subscribeToSignalingState(); this.webSocketBuilder = new WebSocketBuilder(this); this.channelBuilder = new ChannelBuilder(this); - this.setTopology(fullOptions.topology); + this.setTopology(topology); // Listen to browser events if (isBrowser) { this.subscribeToBrowserEvents(); diff --git a/docs/jsFromTs/src/WebChannelFacade.d.ts b/docs/jsFromTs/src/WebChannelFacade.d.ts new file mode 100644 index 00000000..6eb7ceef --- /dev/null +++ b/docs/jsFromTs/src/WebChannelFacade.d.ts @@ -0,0 +1,108 @@ +import { TopologyEnum } from './service/topology/Topology'; +import { SignalingState } from './Signaling'; +import { IWebChannelOptions as WebGroupOptions, WebChannel } from './WebChannel'; +/** + * Is a helper type representing types that can be sent/received over a web group. + * @typedef {string|Uint8Array} DataType + */ +/** + * @ignore + */ +export declare const wcs: WeakMap; +export { WebGroupOptions }; +export declare type DataType = string | Uint8Array; +/** + * This class is an API starting point. It represents a peer to peer network, + * simply called a group. Each group member can send/receive broadcast + * as well as personal messages, invite other persons or bots (see {@link Bot}). + * @example + * // Create a WebGroup with full mesh topology, autorejoin feature and + * // specified Signaling and ICE servers for WebRTC. + * + * const wg = new WebGroup({ + * signalingServer: 'wss://mysignaling.com', + * rtcConfiguration: { + * iceServers: [ + * { + * urls: 'stun.l.google.com:19302' + * }, + * { + * urls: ['turn:myturn.com?transport=udp', 'turn:myturn?transport=tcp'], + * username: 'user', + * password: 'password' + * } + * ] + * } + * }) + * + * wg.onMemberJoin = (id) => { + * // YOUR CODE... + * } + * wg.onMemberLeave = (id) => { + * // YOUR CODE... + * } + * wg.onMessage = (id, data) => { + * // YOUR CODE... + * } + * wg.onStateChange = (state) => { + * // YOUR CODE... + * } + * wg.onSignalingStateChange = (state) => { + * // YOUR CODE... + * } + */ +export declare class WebGroup { + id: number; + myId: number; + key: string; + members: number[]; + neighbors: number[]; + topology: TopologyEnum; + state: number; + signalingState: SignalingState; + signalingServer: string; + autoRejoin: boolean; + onMessage: ((id: number, data: DataType) => void) | undefined | null; + onMyId: ((id: number) => void) | undefined | null; + onMemberJoin: ((id: number) => void) | undefined | null; + onMemberLeave: ((id: number) => void) | undefined | null; + onStateChange: ((state: number) => void) | undefined | null; + onSignalingStateChange: ((state: SignalingState) => void) | undefined | null; + /** + * @param {WebGroupOptions} [options] + * @param {Topology} [options.topology=Topology.FULL_MESH] + * @param {string} [options.signalingServer='wss://signaling.netflux.coedit.re'] + * @param {RTCConfiguration} [options.rtcConfiguration={iceServers: [{urls: 'stun:stun3.l.google.com:19302'}]}] + * @param {boolean} [options.autoRejoin=true] + */ + constructor(options?: WebGroupOptions); + /** + * Join the group identified by a key provided by one of the group member. + * If the current {@link WebGroup#state} value is not {@link WebGroupState#LEFT} or + * {@link WebGroup#signalingState} value is not {@link SignalingState.CLOSED}, + * then do nothing. + * @param {string} [key] Will be generated if not provided + */ + join(key?: string): void; + /** + * Invite a bot server to join this group. + * @param {string} url - Bot server URL (See {@link BotOptions}) + */ + invite(url: string): void; + /** + * Leave the group which means close channels with all members and connection + * with the Signaling server. + */ + leave(): void; + /** + * Broadcast a message to the group. + * @param {DataType} data + */ + send(data: DataType): void; + /** + * Send a message to a particular group member. + * @param {number} id Member identifier + * @param {DataType} data Message + */ + sendTo(id: number, data: DataType): void; +} diff --git a/docs/jsFromTs/src/WebChannelState.d.ts b/docs/jsFromTs/src/WebChannelState.d.ts new file mode 100644 index 00000000..7d8618fd --- /dev/null +++ b/docs/jsFromTs/src/WebChannelState.d.ts @@ -0,0 +1,5 @@ +export declare enum WebChannelState { + JOINING = 0, + JOINED = 1, + LEFT = 2 +} diff --git a/docs/jsFromTs/src/WebSocketBuilder.d.ts b/docs/jsFromTs/src/WebSocketBuilder.d.ts new file mode 100644 index 00000000..fde1329e --- /dev/null +++ b/docs/jsFromTs/src/WebSocketBuilder.d.ts @@ -0,0 +1,21 @@ +import { BehaviorSubject, Observable } from 'rxjs'; +import { Channel } from './Channel'; +import { WebChannel } from './WebChannel'; +export declare const CONNECT_TIMEOUT = 4000; +/** + * Service class responsible to establish connections between peers via + * `WebSocket`. + */ +export declare class WebSocketBuilder { + static readonly listenUrl: BehaviorSubject; + private readonly wc; + private readonly channelsSubject; + constructor(wc: WebChannel); + readonly channels: Observable<{ + id: number; + channel: Channel; + }>; + newWebSocket(ws: WebSocket, id: number, type: number): void; + connect(url: string, type: number, targetId: number, myId: number, wcId: number): Promise; + private composeUrl; +} diff --git a/docs/jsFromTs/src/index.browser.d.ts b/docs/jsFromTs/src/index.browser.d.ts new file mode 100644 index 00000000..147eb1bb --- /dev/null +++ b/docs/jsFromTs/src/index.browser.d.ts @@ -0,0 +1,2 @@ +import './misc/polyfills.browser'; +export * from './index.common'; diff --git a/docs/jsFromTs/src/index.common.d.ts b/docs/jsFromTs/src/index.common.d.ts new file mode 100644 index 00000000..7e33399c --- /dev/null +++ b/docs/jsFromTs/src/index.common.d.ts @@ -0,0 +1,5 @@ +export { LogLevel, setLogLevel } from './misc/util'; +export { TopologyEnum as Topology } from './service/topology/Topology'; +export { SignalingState } from './Signaling'; +export { WebChannelState as WebGroupState } from './WebChannelState'; +export { WebGroup, WebGroupOptions, DataType } from './WebChannelFacade'; diff --git a/docs/jsFromTs/src/index.common.doc.d.ts b/docs/jsFromTs/src/index.common.doc.d.ts new file mode 100644 index 00000000..59377e9e --- /dev/null +++ b/docs/jsFromTs/src/index.common.doc.d.ts @@ -0,0 +1,145 @@ +import { LogLevel as Logs } from './misc/util'; +export { WebGroup, WebGroupOptions, DataType } from './WebChannelFacade'; +/** + * Set log level for debugging utility. By default all logs are disabled. + * @param {...LogLevel} levels + */ +export declare function setLogLevel(...levels: Logs[]): void; +/** + * The state enum of the signaling server. + */ +export declare class SignalingState { + /** + * `0`: the connection is not yet open (equivalent to `WebSocket.CONNECTING`). + * @type {number} + */ + static readonly CONNECTING: number; + /** + * `1`: the connection is open and ready to communicate (equivalent to `WebSocket.OPEN`). + * @type {number} + */ + static readonly OPEN: number; + /** + * `3`: the connection is closed or couldn't be opened (equivalent to `WebSocket.CLOSED`). + * @type {number} + */ + static readonly CLOSED: number; + /** + * `2`: signaling server is checking wether you are still connected to the group. If it is not the case, then + * subscribs you to one of the group member in order to create a connection with him. + * @type {number} + */ + static readonly CHECKING: number; + /** + * `4`: a connection has been established with one of the group member or you are the only member of the group. + * From now the signaling is no longer needed, because the joining process will continue with a help of this member. + * @type {number} + */ + static readonly CHECKED: number; +} +/** + * The state enum of {@link WebGroup}. + */ +export declare class WebGroupState { + /** + * `0`: you haven't joined the group yet. + * @type {number} + */ + static readonly JOINING: number; + /** + * `1`: you have sussessfully joined the group and ready to communicate. + * @type {number} + */ + static readonly JOINED: number; + /** + * `3`: you have sussessfully left the group. + * @type {number} + */ + static readonly LEFT: number; +} +/** + * The topology enum. More topologies will be added in the future + */ +export declare class Topology { + /** + * Full mesh topology identifier. + * @type {number} + */ + static readonly FULL_MESH: number; +} +/** + * The log level enum for debugging purposes. + */ +export declare class LogLevel { + /** + * Equals to `1`, allows logs for debug. + * @type {number} + */ + static readonly DEBUG: number; + /** + * Equals to `2`, logs for WebGroup module. + * @type {number} + */ + static readonly WEB_GROUP: number; + /** + * Equals to `3`, logs for DataChannelBuilder module. + * @type {number} + */ + static readonly WEBRTC: number; + /** + * Equals to `4`, logs for Channel module. + * @type {number} + */ + static readonly CHANNEL: number; + /** + * Equals to `5`, logs for Topology module. + * @type {number} + */ + static readonly TOPOLOGY: number; + /** + * Equals to `6`, logs for Signaling module. + * @type {number} + */ + static readonly SIGNALING: number; + /** + * Equals to `7`, logs for ChannelBuilder module. + * @type {number} + */ + static readonly CHANNEL_BUILDER: number; +} +/** + * The options to be passed into {@link WebGroup} constructor. + * @typedef {Object} WebGroupOptions + * @property {Topology} [topology] Topology identifier + * (Full mesh is the only one supported by Netflux for now). + * @property {string} [signalingServer] Signaling URL for WebRTC. + * @property {RTCConfiguration} [rtcConfiguration] Configuration for WebRTC. + * @property {boolean} [autoRejoin] Whether to automatically rejoin the web group + * on disconnect or not. Its value may be modified after {@link WebGroup} + * instantiation at any time. + */ +/** + * The options to be passed into {@link Bot} constructor. + * @typedef {Object} BotOptions + * @property {Topology} [topology] See WebGroupOptions.topology + * @property {string} [signalingServer] See WebGroupOptions.signalingServer + * @property {RTCConfiguration} [rtcConfiguration] See WebGroupOptions.rtcConfiguration + * @property {boolean} [autoRejoin] See WebGroupOptions.autoRejoin + * @property {Object} bot Server related options of the bot. + * @property {HttpServer|HttpsServer} bot.server NodeJS http(s) server. + * @property {string} [bot.url] Bot server URL. + * @property {boolean} [bot.perMessageDeflate] Enable/disable permessage-deflate. + * @property {boolean} [bot.leaveOnceAlone] If true, bot will live (disconnect from the signaling server) if no other peers left in the group. + */ +/** + * @external {RTCConfiguration} https://developer.mozilla.org/en/docs/Web/API/RTCConfiguration + */ +/** + * @external {Uint8Array} https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array + */ +/** + * @external {HttpServer} https://nodejs.org/api/http.html#http_class_http_server + */ +/** + * @external {HttpsServer} https://nodejs.org/api/https.html#https_class_https_server + */ diff --git a/docs/jsFromTs/src/index.common.doc.js b/docs/jsFromTs/src/index.common.doc.js index 9e42d6cb..6f41bc4f 100644 --- a/docs/jsFromTs/src/index.common.doc.js +++ b/docs/jsFromTs/src/index.common.doc.js @@ -163,7 +163,7 @@ export class LogLevel { * @property {RTCConfiguration} [rtcConfiguration] See WebGroupOptions.rtcConfiguration * @property {boolean} [autoRejoin] See WebGroupOptions.autoRejoin * @property {Object} bot Server related options of the bot. - * @property {NodeJSHttpServer|NodeJSHttpsServer} bot.server NodeJS http(s) server. + * @property {HttpServer|HttpsServer} bot.server NodeJS http(s) server. * @property {string} [bot.url] Bot server URL. * @property {boolean} [bot.perMessageDeflate] Enable/disable permessage-deflate. * @property {boolean} [bot.leaveOnceAlone] If true, bot will live (disconnect from the signaling server) if no other peers left in the group. @@ -175,8 +175,8 @@ export class LogLevel { * @external {Uint8Array} https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array */ /** - * @external {NodeJSHttpServer} https://nodejs.org/api/http.html#http_class_http_server + * @external {HttpServer} https://nodejs.org/api/http.html#http_class_http_server */ /** - * @external {NodeJSHttpsServer} https://nodejs.org/api/https.html#https_class_https_server + * @external {HttpsServer} https://nodejs.org/api/https.html#https_class_https_server */ diff --git a/docs/jsFromTs/src/index.node.d.ts b/docs/jsFromTs/src/index.node.d.ts new file mode 100644 index 00000000..9e5d4251 --- /dev/null +++ b/docs/jsFromTs/src/index.node.d.ts @@ -0,0 +1,3 @@ +import './misc/polyfills.node'; +export * from './index.common'; +export { Bot, BotOptions } from './BotFacade'; diff --git a/docs/jsFromTs/src/misc/env.d.ts b/docs/jsFromTs/src/misc/env.d.ts new file mode 100644 index 00000000..a5f7dd7f --- /dev/null +++ b/docs/jsFromTs/src/misc/env.d.ts @@ -0,0 +1,28 @@ +/// +import * as CryptoNode from 'crypto'; +export interface RTCDataChannelEvent { + readonly channel: RTCDataChannel; +} +export interface RTCDataChannel extends EventTarget { + label: string; + reliable: boolean; + readyState: string; + bufferedAmount: number; + binaryType: string; + onopen: (event: Event) => void; + onerror: (event: Event) => void; + onclose: (event: Event) => void; + onmessage: (event: Event) => void; + close(): void; + send(data: string | ArrayBuffer | Blob): void; +} +export interface IEnvironment { + RTCPeerConnection: typeof RTCPeerConnection; + RTCIceCandidate: typeof RTCIceCandidate; + TextEncoder: typeof TextEncoder; + TextDecoder: typeof TextDecoder; + WebSocket: typeof WebSocket; + crypto: Crypto; + cryptoNode: typeof CryptoNode; +} +export declare const env: IEnvironment; diff --git a/docs/jsFromTs/src/misc/env.js b/docs/jsFromTs/src/misc/env.js index 3e2edc6e..1c60631f 100644 --- a/docs/jsFromTs/src/misc/env.js +++ b/docs/jsFromTs/src/misc/env.js @@ -1,2 +1 @@ -/* tslint:disable:interface-name */ export const env = {}; diff --git a/docs/jsFromTs/src/misc/polyfills.browser.d.ts b/docs/jsFromTs/src/misc/polyfills.browser.d.ts new file mode 100644 index 00000000..84e015a5 --- /dev/null +++ b/docs/jsFromTs/src/misc/polyfills.browser.d.ts @@ -0,0 +1 @@ +import 'webrtc-adapter/out/adapter_no_edge_no_global.js'; diff --git a/docs/jsFromTs/src/misc/polyfills.node.d.ts b/docs/jsFromTs/src/misc/polyfills.node.d.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/docs/jsFromTs/src/misc/polyfills.node.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/docs/jsFromTs/src/misc/polyfills.node.js b/docs/jsFromTs/src/misc/polyfills.node.js index ed973323..9ea345b2 100644 --- a/docs/jsFromTs/src/misc/polyfills.node.js +++ b/docs/jsFromTs/src/misc/polyfills.node.js @@ -1,14 +1,16 @@ +import * as crypto from 'crypto'; +import { TextDecoder, TextEncoder } from 'text-encoding'; +import * as WebSocket from 'uws'; import { env } from './env'; -try { - const wrtc = require('wrtc'); - env.RTCPeerConnection = wrtc.RTCPeerConnection; - env.RTCIceCandidate = wrtc.RTCIceCandidate; -} -catch (err) { - console.warn(err.message); -} -env.WebSocket = require('uws'); -const textEncoding = require('text-encoding'); -env.TextEncoder = textEncoding.TextEncoder; -env.TextDecoder = textEncoding.TextDecoder; -env.cryptoNode = require('crypto'); +// TODO: add wrtc for WebRTC/RTCDataChannel support in NodeJS +// try { +// const wrtc = require('wrtc') +// env.RTCPeerConnection = wrtc.RTCPeerConnection +// env.RTCIceCandidate = wrtc.RTCIceCandidate +// } catch (err) { +// console.warn(err.message) +// } +env.WebSocket = WebSocket; +env.TextEncoder = TextEncoder; +env.TextDecoder = TextDecoder; +env.cryptoNode = crypto; diff --git a/docs/jsFromTs/src/misc/util.d.ts b/docs/jsFromTs/src/misc/util.d.ts new file mode 100644 index 00000000..1fe34c7f --- /dev/null +++ b/docs/jsFromTs/src/misc/util.d.ts @@ -0,0 +1,34 @@ +import { Observable } from 'rxjs'; +export declare const MIN_ID = 2147483648; +/** + * Equals to true in any browser. + */ +export declare const isBrowser: boolean; +export declare function isOnline(): boolean; +export declare function isVisible(): boolean; +/** + * Check whether the string is a valid URL. + */ +export declare function validateWebSocketURL(url: string): void; +/** + * Generate random key which will be used to join the network. + */ +export declare function generateKey(): string; +export declare function generateId(exclude?: number[]): number; +export declare function validateKey(key: string): boolean; +export declare function extractHostnameAndPort(url: string): string; +export declare function equal(array1: number[], array2: number[]): boolean; +/** + * Indicates whether WebSocket is supported by the environment. + */ +export declare function isWebSocketSupported(): boolean; +/** + * Indicates whether WebRTC & RTCDataChannel is supported by the environment. + */ +export declare function isWebRTCSupported(): boolean; +export * from './util.log'; +export interface IStream { + readonly STREAM_ID: number; + messageFromStream: Observable; + sendOverStream: (msg: OutMsg, id?: number) => void; +} diff --git a/docs/jsFromTs/src/misc/util.log.d.ts b/docs/jsFromTs/src/misc/util.log.d.ts new file mode 100644 index 00000000..813a635e --- /dev/null +++ b/docs/jsFromTs/src/misc/util.log.d.ts @@ -0,0 +1,25 @@ +export interface ILog { + webgroup: (msg: string, ...rest: any[]) => void; + signalingState: (msg: string, id: number) => void; + webGroupState: (msg: string, id: number) => void; + webrtc: (msg: string, ...rest: any[]) => void; + channel: (msg: string, ...rest: any[]) => void; + topology: (msg: string, ...rest: any[]) => void; + signaling: (msg: string, ...rest: any[]) => void; + channelBuilder: (msg: string, ...rest: any[]) => void; + debug: (msg: string, ...rest: any[]) => void; + warn: (msg: string, ...rest: any[]) => void; +} +declare const log: ILog; +export declare enum LogLevel { + DEBUG = 0, + WEB_GROUP = 1, + WEBRTC = 2, + CHANNEL = 3, + TOPOLOGY = 4, + SIGNALING = 5, + CHANNEL_BUILDER = 6 +} +export declare let logLevels: LogLevel[]; +export declare function setLogLevel(...levels: LogLevel[]): void; +export { log }; diff --git a/docs/jsFromTs/src/service/Service.d.ts b/docs/jsFromTs/src/service/Service.d.ts new file mode 100644 index 00000000..417aa14b --- /dev/null +++ b/docs/jsFromTs/src/service/Service.d.ts @@ -0,0 +1,67 @@ +import { Observable } from 'rxjs'; +import { Channel } from '../Channel'; +import { IStream } from '../misc/util'; +import { InSigMsg, OutSigMsg } from '../Signaling'; +import { InWcMsg, OutWcMessage, WebChannel } from '../WebChannel'; +export interface IMessageFactory { + create: (properties?: OutMsg) => InMsg; + encode: (message: OutMsg) => { + finish: () => Uint8Array; + }; + decode: (reader: Uint8Array) => InMsg; +} +export interface IWebChannelStream { + id: number; + message: Observable<{ + senderId: number; + msg: InMsg; + channel: Channel; + recipientId: number; + }>; + send: (msg: Uint8Array | OutMsg, recipientId: number) => void; +} +export interface ISignalingStream { + id: number; + message: Observable<{ + senderId: number; + recipientId: number; + msg: InMsg; + }>; + send: (msg: Uint8Array | OutMsg, recipientId: number, senderId: number) => void; +} +export interface IAllStreams { + message: Observable<{ + streamId: number; + senderId: number; + recipientId: number; + msg: InMsg; + }>; + sendOver: (streamId: number, msg: Uint8Array | OutMsg, recipientId: number, senderId: number) => void; +} +/** + * Services are specific classes. Instance of such class communicates via + * network with another instance of the same class. Indeed each peer in the + * network instantiates its own service. + * Each service has `.proto` file containing the desciption of its + * communication protocol. + */ +export declare abstract class Service { + private serviceId; + private proto; + constructor(serviceId: number, proto: IMessageFactory); + protected useWebChannelStream(wc: IStream & WebChannel): IWebChannelStream; + protected useSignalingStream(sig: IStream): ISignalingStream; + protected useAllStreams(wc: IStream & WebChannel, sig: IStream): IAllStreams; + /** + * Encode service message for sending over the network. + * + * @param msg Service specific message object + */ + protected encode(msg: OutMsg): Uint8Array; + /** + * Decode service message received from the network. + * + * @return Service specific message object + */ + protected decode(bytes: Uint8Array): InMsg; +} diff --git a/docs/jsFromTs/src/service/UserMessage.d.ts b/docs/jsFromTs/src/service/UserMessage.d.ts new file mode 100644 index 00000000..09dc7c5c --- /dev/null +++ b/docs/jsFromTs/src/service/UserMessage.d.ts @@ -0,0 +1,29 @@ +import { userMessage as proto } from '../proto/index'; +import { Service } from '../service/Service'; +export declare type UserDataType = Uint8Array | string; +/** + * Message builder service is responsible to build messages to send them over the + * `WebChannel` and treat messages received by the `WebChannel`. It also manage + * big messages (more then 16ko) sent by users. Internal messages are always less + * 16ko. + */ +export declare class UserMessage extends Service { + static readonly SERVICE_ID: number; + private buffers; + constructor(); + clean(): void; + /** + * Encode user message for sending over the network. + */ + encodeUserMessage(data: UserDataType): Uint8Array[]; + /** + * Decode user message received from the network. + */ + decodeUserMessage(bytes: Uint8Array, senderId: number): UserDataType | undefined; + /** + * Identify the user data type. + */ + private userDataToType; + private getBuffer; + private setBuffer; +} diff --git a/docs/jsFromTs/src/service/channelBuilder/ChannelBuilder.d.ts b/docs/jsFromTs/src/service/channelBuilder/ChannelBuilder.d.ts new file mode 100644 index 00000000..05c7a86d --- /dev/null +++ b/docs/jsFromTs/src/service/channelBuilder/ChannelBuilder.d.ts @@ -0,0 +1,38 @@ +import { Observable } from 'rxjs'; +import { Channel } from '../../Channel'; +import { channelBuilder as proto } from '../../proto/index'; +import { WebChannel } from '../../WebChannel'; +import { Service } from '../Service'; +/** + * It is responsible to build a channel between two peers with a help of `WebSocketBuilder` and `DataChannelBuilder`. + * Its algorithm determine which channel (socket or dataChannel) should be created + * based on the services availability and peers' preferences. + */ +export declare class ChannelBuilder extends Service { + static readonly SERVICE_ID: number; + private static connectResTrueEncoded; + private static connectResFalseEncoded; + onConnectionRequest: (streamId: number, data: Uint8Array) => boolean; + private negotiationEncoded; + private allStreams; + private wc; + private dataChannelBuilder; + private channelsSubject; + private connectsInProgress; + private myInfo; + constructor(wc: WebChannel); + clean(): void; + readonly onChannel: Observable; + connectOverWebChannel(id: number, cb?: () => void, data?: Uint8Array): Promise; + connectOverSignaling(cb?: () => void, data?: Uint8Array): Promise; + private connectOver; + private handleMessage; + private proceedNegotiation; + private tryWs; + private tryDc; + private getType; + private isNagotiable; + private subscribeToChannels; + private subscribeToURLandIDChange; + private rejectConnection; +} diff --git a/docs/jsFromTs/src/service/channelBuilder/ChannelBuilder.js b/docs/jsFromTs/src/service/channelBuilder/ChannelBuilder.js index 110bdcdb..73970816 100644 --- a/docs/jsFromTs/src/service/channelBuilder/ChannelBuilder.js +++ b/docs/jsFromTs/src/service/channelBuilder/ChannelBuilder.js @@ -120,7 +120,7 @@ export class ChannelBuilder extends Service { if (!passive) { // This is the first message sent by the initiator initiator.id = senderId; - passive = Object.assign({}, this.myInfo); + passive = { ...this.myInfo }; passive.id = recipientId; } log.channelBuilder(`NEGOTIATION message to proceed from ${senderId}: `, JSON.stringify({ diff --git a/docs/jsFromTs/src/service/channelBuilder/ConnectionError.d.ts b/docs/jsFromTs/src/service/channelBuilder/ConnectionError.d.ts new file mode 100644 index 00000000..eba6b8b4 --- /dev/null +++ b/docs/jsFromTs/src/service/channelBuilder/ConnectionError.d.ts @@ -0,0 +1,8 @@ +export declare enum ConnectionError { + RESPONSE_TIMEOUT = "Response timeout: remote peer is not responding", + CONNECTION_TIMEOUT = "Connection timeout: unable to establish a channel within a specified time", + DENIED = "Connection denied: remote peer refused the connection request", + CLEAN = "Clean: all connections in progress must be stopped", + IN_PROGRESS = "Connection setup is already in progress", + NEGOTIATION_ERROR = "All connection possibilities have been tried and none of them worked" +} diff --git a/docs/jsFromTs/src/service/channelBuilder/ConnectionsInProgress.d.ts b/docs/jsFromTs/src/service/channelBuilder/ConnectionsInProgress.d.ts new file mode 100644 index 00000000..d586986a --- /dev/null +++ b/docs/jsFromTs/src/service/channelBuilder/ConnectionsInProgress.d.ts @@ -0,0 +1,13 @@ +export interface IConnectionInProgress { + promise: Promise; + resolve: () => void; + reject: (err: Error) => void; +} +export declare class ConnectionsInProgress { + private connections; + constructor(); + create(id: number, connectionTimeout: number, responseTimeout: number, onConnectionTimeoutCallback: () => void): IConnectionInProgress; + get(id: number): IConnectionInProgress | undefined; + has(streamId: number, id: number): boolean; + clean(): void; +} diff --git a/docs/jsFromTs/src/service/dataChannelBuilder/DataChannelBuilder.d.ts b/docs/jsFromTs/src/service/dataChannelBuilder/DataChannelBuilder.d.ts new file mode 100644 index 00000000..1ecdac63 --- /dev/null +++ b/docs/jsFromTs/src/service/dataChannelBuilder/DataChannelBuilder.d.ts @@ -0,0 +1,30 @@ +import { Observable } from 'rxjs'; +import { Channel } from '../../Channel'; +import '../../misc/env'; +import { dataChannelBuilder as proto } from '../../proto/index'; +import { WebChannel } from '../../WebChannel'; +import { Service } from '../Service'; +export declare const CONNECT_TIMEOUT = 9000; +/** + * Service class responsible to establish `RTCDataChannel` between two remotes via + * signaling server or `WebChannel`. + */ +export declare class DataChannelBuilder extends Service { + static readonly SERVICE_ID: number; + private readonly remotes; + private readonly channelsSubject; + private rtcConfiguration; + private allStreams; + private wc; + constructor(wc: WebChannel, rtcConfiguration: RTCConfiguration); + readonly channels: Observable<{ + id: number; + channel: Channel; + }>; + /** + * Establish an `RTCDataChannel`. Starts by sending an **SDP offer**. + */ + connect(targetId: number, myId: number, type: number): Promise; + clean(id?: number): void; + private createRemote; +} diff --git a/docs/jsFromTs/src/service/dataChannelBuilder/Remote.d.ts b/docs/jsFromTs/src/service/dataChannelBuilder/Remote.d.ts new file mode 100644 index 00000000..46e05937 --- /dev/null +++ b/docs/jsFromTs/src/service/dataChannelBuilder/Remote.d.ts @@ -0,0 +1,21 @@ +import { RTCDataChannel } from '../../misc/env'; +import { dataChannelBuilder as proto } from '../../proto/index'; +export declare class Remote { + readonly id: number; + readonly pc: RTCPeerConnection; + finalMessageReceived: boolean; + private readonly candidates; + private readonly send; + private readonly remotes; + private isSDPSent; + private _onError; + private timer; + private finalMessageSent; + constructor(id: number, pc: RTCPeerConnection, send: (msg: proto.IMessage) => void, remotes: Map, timeout: number); + onError: (err: Error) => void; + sdpIsSent(): void; + clean(sendFinalMessage?: boolean): void; + dataChannelOpen(dc: RTCDataChannel): void; + handleMessage(msg: proto.Message): void; + private sendFinalMessage; +} diff --git a/docs/jsFromTs/src/service/topology/FullMesh.d.ts b/docs/jsFromTs/src/service/topology/FullMesh.d.ts new file mode 100644 index 00000000..53fa09b0 --- /dev/null +++ b/docs/jsFromTs/src/service/topology/FullMesh.d.ts @@ -0,0 +1,45 @@ +import { Channel } from '../../Channel'; +import { fullMesh as proto } from '../../proto/index'; +import { InWcMsg, WebChannel } from '../../WebChannel'; +import { ITopology, Topology } from './Topology'; +/** + * Fully connected web channel manager. Implements fully connected topology + * network, when each peer is connected to each other. + * + */ +export declare class FullMesh extends Topology implements ITopology { + static readonly SERVICE_ID: number; + /** + * Directly connected peers. + */ + private adjacentMembers; + /** + * Peers that are not adjacent. When the connection with a distant peer is established, + * his id is removed from this map a new entry is added to the `adjacentMembers` property. + */ + private distantMembers; + private antecedentId; + private heartbeatInterval; + private delayedMembers; + private delayedMembersTimers; + private membersCheckInterval; + private heartbeatMsg; + private adjacentBots; + constructor(wc: WebChannel); + send(msg: InWcMsg): void; + sendTo(msg: InWcMsg): void; + forward(msg: InWcMsg): void; + leave(): void; + onChannelClose(channel: Channel): void; + readonly neighbors: Channel[]; + private clean; + private handleServiceMessage; + private connectToMembers; + private notifyDistantMembers; + private startMembersCheckIntervals; + private startHeartbeatInterval; + private sendToDistantPeer; + private findRoutedChannel; + private createOrUpdateDistantMember; + private updateAntecedentId; +} diff --git a/docs/jsFromTs/src/service/topology/FullMesh.js b/docs/jsFromTs/src/service/topology/FullMesh.js index 8d4db66f..7e4be75f 100644 --- a/docs/jsFromTs/src/service/topology/FullMesh.js +++ b/docs/jsFromTs/src/service/topology/FullMesh.js @@ -97,7 +97,7 @@ export class FullMesh extends Topology { send(msg) { this.adjacentMembers.forEach((ch) => ch.encodeAndSend(msg)); this.distantMembers.forEach((distantMember, id) => { - this.sendToDistantPeer(distantMember, Object.assign(msg, { recipientId: id })); + this.sendToDistantPeer(distantMember, { ...msg, recipientId: id }); }); } sendTo(msg) { diff --git a/docs/jsFromTs/src/service/topology/Topology.d.ts b/docs/jsFromTs/src/service/topology/Topology.d.ts new file mode 100644 index 00000000..4e197425 --- /dev/null +++ b/docs/jsFromTs/src/service/topology/Topology.d.ts @@ -0,0 +1,63 @@ +import { Observable } from 'rxjs'; +import { Channel } from '../../Channel'; +import { IMessage } from '../../proto/index'; +import { WebChannel } from '../../WebChannel'; +import { IMessageFactory, IWebChannelStream, Service } from '../Service'; +export declare enum TopologyEnum { + FULL_MESH = 0 +} +export declare enum TopologyState { + CONSTRUCTING = 0, + CONSTRUCTED = 1, + IDLE = 2 +} +/** + * It is responsible to preserve Web Channel + * structure intact (i.e. all peers have the same vision of the Web Channel). + * Among its duties are: + * + * - Add a new peer into Web Channel. + * - Remove a peer from Web Channel. + * - Send a broadcast message. + * - Send a message to a particular peer. + * + * @see FullMesh + */ +export declare abstract class Topology extends Service { + protected wcStream: IWebChannelStream; + protected wc: WebChannel; + private _state; + private stateSubject; + constructor(wc: WebChannel, serviceId: number, proto: IMessageFactory); + readonly onState: Observable; + readonly state: TopologyState; + setJoinedState(): void; + protected setState(state: TopologyState): void; + abstract readonly neighbors: Channel[]; +} +export interface ITopology { + onState: Observable; + state: TopologyState; + neighbors: Channel[]; + setJoinedState(): void; + /** + * Broadcast a message to the network. + */ + send(msg: IMessage): void; + /** + * Forward the message to its recipient(s). + */ + forward(msg: IMessage): void; + /** + * Send a message to a particular peer in the network. + */ + sendTo(msg: IMessage): void; + /** + * Disconnect from the network + */ + leave(): void; + /** + * This handler will be called when one of the network channel closed. + */ + onChannelClose(channel: Channel): void; +} diff --git a/docs/jsFromTs/test/functional/1-bot.test.d.ts b/docs/jsFromTs/test/functional/1-bot.test.d.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/docs/jsFromTs/test/functional/1-bot.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/docs/jsFromTs/test/functional/1-client.test.d.ts b/docs/jsFromTs/test/functional/1-client.test.d.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/docs/jsFromTs/test/functional/1-client.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/docs/jsFromTs/test/functional/2-bot_client.test.d.ts b/docs/jsFromTs/test/functional/2-bot_client.test.d.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/docs/jsFromTs/test/functional/2-bot_client.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/docs/jsFromTs/test/functional/2-client_bot.test.d.ts b/docs/jsFromTs/test/functional/2-client_bot.test.d.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/docs/jsFromTs/test/functional/2-client_bot.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/docs/jsFromTs/test/functional/2-clients.test.d.ts b/docs/jsFromTs/test/functional/2-clients.test.d.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/docs/jsFromTs/test/functional/2-clients.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/docs/jsFromTs/test/functional/3-bot_client_client.test.d.ts b/docs/jsFromTs/test/functional/3-bot_client_client.test.d.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/docs/jsFromTs/test/functional/3-bot_client_client.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/docs/jsFromTs/test/functional/3-client_bot_client.test.d.ts b/docs/jsFromTs/test/functional/3-client_bot_client.test.d.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/docs/jsFromTs/test/functional/3-client_bot_client.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/docs/jsFromTs/test/functional/3-client_client_bot.test.d.ts b/docs/jsFromTs/test/functional/3-client_client_bot.test.d.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/docs/jsFromTs/test/functional/3-client_client_bot.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/docs/jsFromTs/test/functional/3-clients.test.d.ts b/docs/jsFromTs/test/functional/3-clients.test.d.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/docs/jsFromTs/test/functional/3-clients.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/docs/jsFromTs/test/util/botServer.d.ts b/docs/jsFromTs/test/util/botServer.d.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/docs/jsFromTs/test/util/botServer.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/docs/jsFromTs/test/util/helper.d.ts b/docs/jsFromTs/test/util/helper.d.ts new file mode 100644 index 00000000..b7330dea --- /dev/null +++ b/docs/jsFromTs/test/util/helper.d.ts @@ -0,0 +1,52 @@ +import { SignalingState, WebGroup, WebGroupState } from '../../src/index.browser'; +export declare const SIGNALING_URL = "ws://localhost:13477"; +export declare const BOT_HOST = "localhost"; +export declare const BOT_PORT = 10001; +export declare const BOT_URL: string; +export declare function randomKey(): string; +export declare function randomBigArrayBuffer(): Uint8Array; +export declare function copyArrayBuffer(bytes: Uint8Array): Uint8Array; +export declare function areTheSame(array1: Array, array2: Array): boolean; +export declare class Queue { + private promises; + private resolvers; + private counter; + constructor(length: number, afterAllDone: () => void); + done(): void; +} +export interface IBotData { + id: number; + onMemberJoinCalled: number; + joinedMembers: number[]; + onMemberLeaveCalled: number; + leftMembers: number[]; + onStateCalled: number; + states: number[]; + onSignalingStateCalled: number; + signalingStates: number[]; + messages: IBotMessage[]; + onMessageToBeCalled: number; + onMyIdToBeCalled: number; + state: WebGroupState; + signalingState: SignalingState; + key: string; + topology: number; + members: number[]; + myId: number; + autoRejoin: boolean; + signalingServer: string; +} +export interface IBotMessage { + id: number; + msg: string | Uint8Array; +} +export declare function botGetData(key: string): Promise; +export declare function botWaitJoin(key: string): Promise; +export declare function botJoin(key: string): Promise; +export declare function botLeave(key: string): Promise; +export declare function wait(milliseconds: number): Promise; +export declare function cleanWebGroup(...wgs: WebGroup[]): void; +export interface IMessages { + ids: number[]; + msgs: Array; +} diff --git a/docs/script/search_index.js b/docs/script/search_index.js index 3febf076..3fabc7bb 100644 --- a/docs/script/search_index.js +++ b/docs/script/search_index.js @@ -251,6 +251,18 @@ window.esdocSearchIndex = [ "src/index.common.doc.js~BotOptions", "typedef" ], + [ + "src/index.common.doc.js~httpserver", + "https://nodejs.org/api/http.html#http_class_http_server", + "src/index.common.doc.js~HttpServer", + "external" + ], + [ + "src/index.common.doc.js~httpsserver", + "https://nodejs.org/api/https.html#https_class_https_server", + "src/index.common.doc.js~HttpsServer", + "external" + ], [ "src/index.common.doc.js~loglevel.channel", "class/src/index.common.doc.js~LogLevel.html#static-get-CHANNEL", @@ -293,18 +305,6 @@ window.esdocSearchIndex = [ "src/index.common.doc.js~LogLevel.WEB_GROUP", "member" ], - [ - "src/index.common.doc.js~nodejshttpserver", - "https://nodejs.org/api/http.html#http_class_http_server", - "src/index.common.doc.js~NodeJSHttpServer", - "external" - ], - [ - "src/index.common.doc.js~nodejshttpsserver", - "https://nodejs.org/api/https.html#https_class_https_server", - "src/index.common.doc.js~NodeJSHttpsServer", - "external" - ], [ "src/index.common.doc.js~rtcconfiguration", "https://developer.mozilla.org/en/docs/Web/API/RTCConfiguration", diff --git a/docs/source.html b/docs/source.html index 97e2eb48..61fd66a9 100644 --- a/docs/source.html +++ b/docs/source.html @@ -39,8 +39,8 @@
  • TDataType
  • TBotOptions
  • TWebGroupOptions
  • -
  • ENodeJSHttpServer
  • -
  • ENodeJSHttpsServer
  • +
  • EHttpServer
  • +
  • EHttpsServer
  • ERTCConfiguration
  • EUint8Array
  • @@ -66,9 +66,9 @@ src/BotFacade.js Bot 100 %9/9 - 5223 byte + 5175 byte 145 - 2018-08-04 14:18:40 (UTC) + 2018-09-06 14:00:41 (UTC) src/WebChannelFacade.js @@ -76,7 +76,7 @@ 100 %24/24 10516 byte 300 - 2018-08-04 14:18:39 (UTC) + 2018-09-06 14:00:41 (UTC) src/index.common.doc.js @@ -86,9 +86,9 @@ WebGroupState setLogLevel 100 %21/21 - 5547 byte + 5523 byte 182 - 2018-08-04 14:18:39 (UTC) + 2018-09-06 14:00:41 (UTC) diff --git a/docs/test-file/test/functional/1-bot.test.js.html b/docs/test-file/test/functional/1-bot.test.js.html index 39bfc6af..3b429a70 100644 --- a/docs/test-file/test/functional/1-bot.test.js.html +++ b/docs/test-file/test/functional/1-bot.test.js.html @@ -39,8 +39,8 @@
  • TDataType
  • TBotOptions
  • TWebGroupOptions
  • -
  • ENodeJSHttpServer
  • -
  • ENodeJSHttpsServer
  • +
  • EHttpServer
  • +
  • EHttpsServer
  • ERTCConfiguration
  • EUint8Array
  • diff --git a/docs/test-file/test/functional/1-client.test.js.html b/docs/test-file/test/functional/1-client.test.js.html index bd24443e..f76eedb4 100644 --- a/docs/test-file/test/functional/1-client.test.js.html +++ b/docs/test-file/test/functional/1-client.test.js.html @@ -39,8 +39,8 @@
  • TDataType
  • TBotOptions
  • TWebGroupOptions
  • -
  • ENodeJSHttpServer
  • -
  • ENodeJSHttpsServer
  • +
  • EHttpServer
  • +
  • EHttpsServer
  • ERTCConfiguration
  • EUint8Array
  • diff --git a/docs/test-file/test/functional/2-bot_client.test.js.html b/docs/test-file/test/functional/2-bot_client.test.js.html index 48283133..9abd0fc7 100644 --- a/docs/test-file/test/functional/2-bot_client.test.js.html +++ b/docs/test-file/test/functional/2-bot_client.test.js.html @@ -39,8 +39,8 @@
  • TDataType
  • TBotOptions
  • TWebGroupOptions
  • -
  • ENodeJSHttpServer
  • -
  • ENodeJSHttpsServer
  • +
  • EHttpServer
  • +
  • EHttpsServer
  • ERTCConfiguration
  • EUint8Array
  • diff --git a/docs/test-file/test/functional/2-client_bot.test.js.html b/docs/test-file/test/functional/2-client_bot.test.js.html index 1e9643bb..cb4fa126 100644 --- a/docs/test-file/test/functional/2-client_bot.test.js.html +++ b/docs/test-file/test/functional/2-client_bot.test.js.html @@ -39,8 +39,8 @@
  • TDataType
  • TBotOptions
  • TWebGroupOptions
  • -
  • ENodeJSHttpServer
  • -
  • ENodeJSHttpsServer
  • +
  • EHttpServer
  • +
  • EHttpsServer
  • ERTCConfiguration
  • EUint8Array
  • diff --git a/docs/test-file/test/functional/2-clients.test.js.html b/docs/test-file/test/functional/2-clients.test.js.html index 7fd1173b..8d2031ce 100644 --- a/docs/test-file/test/functional/2-clients.test.js.html +++ b/docs/test-file/test/functional/2-clients.test.js.html @@ -39,8 +39,8 @@
  • TDataType
  • TBotOptions
  • TWebGroupOptions
  • -
  • ENodeJSHttpServer
  • -
  • ENodeJSHttpsServer
  • +
  • EHttpServer
  • +
  • EHttpsServer
  • ERTCConfiguration
  • EUint8Array
  • diff --git a/docs/test-file/test/functional/3-bot_client_client.test.js.html b/docs/test-file/test/functional/3-bot_client_client.test.js.html index f25012dd..8a85a14e 100644 --- a/docs/test-file/test/functional/3-bot_client_client.test.js.html +++ b/docs/test-file/test/functional/3-bot_client_client.test.js.html @@ -39,8 +39,8 @@
  • TDataType
  • TBotOptions
  • TWebGroupOptions
  • -
  • ENodeJSHttpServer
  • -
  • ENodeJSHttpsServer
  • +
  • EHttpServer
  • +
  • EHttpsServer
  • ERTCConfiguration
  • EUint8Array
  • diff --git a/docs/test-file/test/functional/3-client_bot_client.test.js.html b/docs/test-file/test/functional/3-client_bot_client.test.js.html index 4a7fff6d..6df3a3ec 100644 --- a/docs/test-file/test/functional/3-client_bot_client.test.js.html +++ b/docs/test-file/test/functional/3-client_bot_client.test.js.html @@ -39,8 +39,8 @@
  • TDataType
  • TBotOptions
  • TWebGroupOptions
  • -
  • ENodeJSHttpServer
  • -
  • ENodeJSHttpsServer
  • +
  • EHttpServer
  • +
  • EHttpsServer
  • ERTCConfiguration
  • EUint8Array
  • diff --git a/docs/test-file/test/functional/3-client_client_bot.test.js.html b/docs/test-file/test/functional/3-client_client_bot.test.js.html index 36af4920..52e0a844 100644 --- a/docs/test-file/test/functional/3-client_client_bot.test.js.html +++ b/docs/test-file/test/functional/3-client_client_bot.test.js.html @@ -39,8 +39,8 @@
  • TDataType
  • TBotOptions
  • TWebGroupOptions
  • -
  • ENodeJSHttpServer
  • -
  • ENodeJSHttpsServer
  • +
  • EHttpServer
  • +
  • EHttpsServer
  • ERTCConfiguration
  • EUint8Array
  • diff --git a/docs/test-file/test/functional/3-clients.test.js.html b/docs/test-file/test/functional/3-clients.test.js.html index 72472e77..2c95a999 100644 --- a/docs/test-file/test/functional/3-clients.test.js.html +++ b/docs/test-file/test/functional/3-clients.test.js.html @@ -39,8 +39,8 @@
  • TDataType
  • TBotOptions
  • TWebGroupOptions
  • -
  • ENodeJSHttpServer
  • -
  • ENodeJSHttpsServer
  • +
  • EHttpServer
  • +
  • EHttpsServer
  • ERTCConfiguration
  • EUint8Array
  • diff --git a/docs/test.html b/docs/test.html index 8e017783..7d02e2ae 100644 --- a/docs/test.html +++ b/docs/test.html @@ -39,8 +39,8 @@
  • TDataType
  • TBotOptions
  • TWebGroupOptions
  • -
  • ENodeJSHttpServer
  • -
  • ENodeJSHttpsServer
  • +
  • EHttpServer
  • +
  • EHttpsServer
  • ERTCConfiguration
  • EUint8Array
  • diff --git a/docs/typedef/index.html b/docs/typedef/index.html index dabe29d9..4c4deafa 100644 --- a/docs/typedef/index.html +++ b/docs/typedef/index.html @@ -39,8 +39,8 @@
  • TDataType
  • TBotOptions
  • TWebGroupOptions
  • -
  • ENodeJSHttpServer
  • -
  • ENodeJSHttpsServer
  • +
  • EHttpServer
  • +
  • EHttpsServer
  • ERTCConfiguration
  • EUint8Array
  • @@ -213,7 +213,7 @@

    Properties:

    bot.server - NodeJSHttpServer | NodeJSHttpsServer + HttpServer | HttpsServer

    NodeJS http(s) server.