polfan-server-js-client 0.1.99934 → 0.1.99936
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.idea/workspace.xml +54 -20
- package/build/index.js +19 -19
- package/build/index.js.map +1 -1
- package/build/types/AbstractChatClient.d.ts +4 -1
- package/build/types/IndexedObjectCollection.d.ts +3 -2
- package/build/types/types/src/index.d.ts +5 -1
- package/build/types/types/src/schemes/Room.d.ts +2 -0
- package/build/types/types/src/schemes/RoomStream.d.ts +5 -0
- package/build/types/types/src/schemes/commands/GetClientData.d.ts +2 -0
- package/build/types/types/src/schemes/commands/SetClientData.d.ts +1 -0
- package/build/types/types/src/schemes/commands/UpdateRoom.d.ts +2 -0
- package/build/types/types/src/schemes/events/ClientData.d.ts +1 -0
- package/package.json +1 -1
- package/src/AbstractChatClient.ts +4 -1
- package/src/IndexedObjectCollection.ts +10 -8
- package/src/state-tracker/RoomsManager.ts +2 -2
- package/src/state-tracker/SpacesManager.ts +1 -1
- package/src/types/src/index.ts +9 -0
- package/src/types/src/schemes/Room.ts +2 -0
- package/src/types/src/schemes/RoomStream.ts +6 -0
- package/src/types/src/schemes/commands/GetClientData.ts +3 -0
- package/src/types/src/schemes/commands/SetClientData.ts +1 -0
- package/src/types/src/schemes/commands/UpdateRoom.ts +3 -0
- package/src/types/src/schemes/events/ClientData.ts +1 -0
package/.idea/workspace.xml
CHANGED
|
@@ -4,8 +4,11 @@
|
|
|
4
4
|
<option name="autoReloadType" value="SELECTIVE" />
|
|
5
5
|
</component>
|
|
6
6
|
<component name="ChangeListManager">
|
|
7
|
-
<list default="true" id="831dae43-0da1-47fd-a5f7-33dd5eec2992" name="Changes" comment="
|
|
8
|
-
<change beforePath="$PROJECT_DIR$/
|
|
7
|
+
<list default="true" id="831dae43-0da1-47fd-a5f7-33dd5eec2992" name="Changes" comment="Client data and room stream support">
|
|
8
|
+
<change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
|
|
9
|
+
<change beforePath="$PROJECT_DIR$/src/IndexedObjectCollection.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/IndexedObjectCollection.ts" afterDir="false" />
|
|
10
|
+
<change beforePath="$PROJECT_DIR$/src/state-tracker/RoomsManager.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/state-tracker/RoomsManager.ts" afterDir="false" />
|
|
11
|
+
<change beforePath="$PROJECT_DIR$/src/state-tracker/SpacesManager.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/state-tracker/SpacesManager.ts" afterDir="false" />
|
|
9
12
|
</list>
|
|
10
13
|
<option name="SHOW_DIALOG" value="false" />
|
|
11
14
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
@@ -35,22 +38,22 @@
|
|
|
35
38
|
<option name="hideEmptyMiddlePackages" value="true" />
|
|
36
39
|
<option name="showLibraryContents" value="true" />
|
|
37
40
|
</component>
|
|
38
|
-
<component name="PropertiesComponent"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
41
|
+
<component name="PropertiesComponent"><![CDATA[{
|
|
42
|
+
"keyToString": {
|
|
43
|
+
"RunOnceActivity.ShowReadmeOnStart": "true",
|
|
44
|
+
"RunOnceActivity.git.unshallow": "true",
|
|
45
|
+
"git-widget-placeholder": "master",
|
|
46
|
+
"ignore.virus.scanning.warn.message": "true",
|
|
47
|
+
"last_opened_file_path": "//wsl.localhost/Debian/home/jarek/polfan-js-client-library",
|
|
48
|
+
"node.js.detected.package.eslint": "true",
|
|
49
|
+
"node.js.detected.package.tslint": "true",
|
|
50
|
+
"node.js.selected.package.eslint": "(autodetect)",
|
|
51
|
+
"node.js.selected.package.tslint": "(autodetect)",
|
|
52
|
+
"nodejs_package_manager_path": "npm",
|
|
53
|
+
"ts.external.directory.path": "\\\\wsl.localhost\\Debian\\home\\jarek\\polfan-js-client-library\\node_modules\\typescript\\lib",
|
|
54
|
+
"vue.rearranger.settings.migration": "true"
|
|
52
55
|
}
|
|
53
|
-
}
|
|
56
|
+
}]]></component>
|
|
54
57
|
<component name="SharedIndexes">
|
|
55
58
|
<attachedChunks>
|
|
56
59
|
<set>
|
|
@@ -75,7 +78,12 @@
|
|
|
75
78
|
<workItem from="1740512570698" duration="1386000" />
|
|
76
79
|
<workItem from="1740565900826" duration="1191000" />
|
|
77
80
|
<workItem from="1740919664352" duration="592000" />
|
|
78
|
-
<workItem from="1741078506978" duration="
|
|
81
|
+
<workItem from="1741078506978" duration="5526000" />
|
|
82
|
+
<workItem from="1741205852989" duration="586000" />
|
|
83
|
+
<workItem from="1741207438028" duration="38000" />
|
|
84
|
+
<workItem from="1741543251744" duration="1234000" />
|
|
85
|
+
<workItem from="1741554932034" duration="1521000" />
|
|
86
|
+
<workItem from="1741900021179" duration="4250000" />
|
|
79
87
|
</task>
|
|
80
88
|
<task id="LOCAL-00001" summary="Emoticons objects">
|
|
81
89
|
<option name="closed" value="true" />
|
|
@@ -229,7 +237,31 @@
|
|
|
229
237
|
<option name="project" value="LOCAL" />
|
|
230
238
|
<updated>1740515104457</updated>
|
|
231
239
|
</task>
|
|
232
|
-
<
|
|
240
|
+
<task id="LOCAL-00020" summary="UsersManager">
|
|
241
|
+
<option name="closed" value="true" />
|
|
242
|
+
<created>1741170174335</created>
|
|
243
|
+
<option name="number" value="00020" />
|
|
244
|
+
<option name="presentableId" value="LOCAL-00020" />
|
|
245
|
+
<option name="project" value="LOCAL" />
|
|
246
|
+
<updated>1741170174335</updated>
|
|
247
|
+
</task>
|
|
248
|
+
<task id="LOCAL-00021" summary="Client data and room stream support">
|
|
249
|
+
<option name="closed" value="true" />
|
|
250
|
+
<created>1741970680171</created>
|
|
251
|
+
<option name="number" value="00021" />
|
|
252
|
+
<option name="presentableId" value="LOCAL-00021" />
|
|
253
|
+
<option name="project" value="LOCAL" />
|
|
254
|
+
<updated>1741970680171</updated>
|
|
255
|
+
</task>
|
|
256
|
+
<task id="LOCAL-00022" summary="Client data and room stream support">
|
|
257
|
+
<option name="closed" value="true" />
|
|
258
|
+
<created>1741971884190</created>
|
|
259
|
+
<option name="number" value="00022" />
|
|
260
|
+
<option name="presentableId" value="LOCAL-00022" />
|
|
261
|
+
<option name="project" value="LOCAL" />
|
|
262
|
+
<updated>1741971884190</updated>
|
|
263
|
+
</task>
|
|
264
|
+
<option name="localTasksCounter" value="23" />
|
|
233
265
|
<servers />
|
|
234
266
|
</component>
|
|
235
267
|
<component name="TypeScriptGeneratedFilesManager">
|
|
@@ -257,6 +289,8 @@
|
|
|
257
289
|
<MESSAGE value="New scheme of Bye event" />
|
|
258
290
|
<MESSAGE value="Fix authentication" />
|
|
259
291
|
<MESSAGE value="Add notify option to Kick command" />
|
|
260
|
-
<
|
|
292
|
+
<MESSAGE value="UsersManager" />
|
|
293
|
+
<MESSAGE value="Client data and room stream support" />
|
|
294
|
+
<option name="LAST_COMMIT_MESSAGE" value="Client data and room stream support" />
|
|
261
295
|
</component>
|
|
262
296
|
</project>
|
package/build/index.js
CHANGED
|
@@ -261,9 +261,15 @@ var IndexedCollection = /*#__PURE__*/function () {
|
|
|
261
261
|
var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
262
262
|
IndexedObjectCollection_classCallCheck(this, IndexedCollection);
|
|
263
263
|
IndexedObjectCollection_defineProperty(this, "_items", new Map());
|
|
264
|
+
IndexedObjectCollection_defineProperty(this, "_mutationCounter", 0);
|
|
264
265
|
this.set.apply(this, _toConsumableArray(items));
|
|
265
266
|
}
|
|
266
267
|
IndexedObjectCollection_createClass(IndexedCollection, [{
|
|
268
|
+
key: "mutationCounter",
|
|
269
|
+
get: function get() {
|
|
270
|
+
return this._mutationCounter;
|
|
271
|
+
}
|
|
272
|
+
}, {
|
|
267
273
|
key: "items",
|
|
268
274
|
get: function get() {
|
|
269
275
|
return this._items;
|
|
@@ -276,6 +282,7 @@ var IndexedCollection = /*#__PURE__*/function () {
|
|
|
276
282
|
}, {
|
|
277
283
|
key: "set",
|
|
278
284
|
value: function set() {
|
|
285
|
+
this._mutationCounter++;
|
|
279
286
|
for (var _len = arguments.length, items = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
280
287
|
items[_key] = arguments[_key];
|
|
281
288
|
}
|
|
@@ -326,13 +333,6 @@ var IndexedCollection = /*#__PURE__*/function () {
|
|
|
326
333
|
}
|
|
327
334
|
return result;
|
|
328
335
|
}
|
|
329
|
-
}, {
|
|
330
|
-
key: "map",
|
|
331
|
-
value: function map(callback) {
|
|
332
|
-
return Array.from(this.items.entries()).map(function (entry) {
|
|
333
|
-
return callback(entry[1], entry[0]);
|
|
334
|
-
});
|
|
335
|
-
}
|
|
336
336
|
}]);
|
|
337
337
|
return IndexedCollection;
|
|
338
338
|
}();
|
|
@@ -355,6 +355,11 @@ var IndexedObjectCollection = /*#__PURE__*/function () {
|
|
|
355
355
|
get: function get() {
|
|
356
356
|
return this._items.length;
|
|
357
357
|
}
|
|
358
|
+
}, {
|
|
359
|
+
key: "mutationCounter",
|
|
360
|
+
get: function get() {
|
|
361
|
+
return this._items.mutationCounter;
|
|
362
|
+
}
|
|
358
363
|
}, {
|
|
359
364
|
key: "set",
|
|
360
365
|
value: function set() {
|
|
@@ -417,11 +422,6 @@ var IndexedObjectCollection = /*#__PURE__*/function () {
|
|
|
417
422
|
}
|
|
418
423
|
return result;
|
|
419
424
|
}
|
|
420
|
-
}, {
|
|
421
|
-
key: "map",
|
|
422
|
-
value: function map(callback) {
|
|
423
|
-
return this.items.map(callback);
|
|
424
|
-
}
|
|
425
425
|
}, {
|
|
426
426
|
key: "getId",
|
|
427
427
|
value: function getId(item) {
|
|
@@ -2179,11 +2179,11 @@ var RoomsManager = /*#__PURE__*/function () {
|
|
|
2179
2179
|
(_this$members = this.members)["delete"].apply(_this$members, roomIds);
|
|
2180
2180
|
(_this$membersPromises = this.membersPromises).forget.apply(_this$membersPromises, roomIds);
|
|
2181
2181
|
for (var _i = 0, _roomIds = roomIds; _i < _roomIds.length; _i++) {
|
|
2182
|
-
var _this$topics$get$
|
|
2182
|
+
var _this$topics$get$item, _this$topics$get, _this$messages;
|
|
2183
2183
|
var roomId = _roomIds[_i];
|
|
2184
|
-
var topicIds = (_this$topics$get$
|
|
2184
|
+
var topicIds = (_this$topics$get$item = (_this$topics$get = this.topics.get(roomId)) === null || _this$topics$get === void 0 ? void 0 : _this$topics$get.items.map(function (topic) {
|
|
2185
2185
|
return topic.id;
|
|
2186
|
-
})) !== null && _this$topics$get$
|
|
2186
|
+
})) !== null && _this$topics$get$item !== void 0 ? _this$topics$get$item : [];
|
|
2187
2187
|
(_this$messages = this.messages)._deleteByTopicIds.apply(_this$messages, [roomId].concat(RoomsManager_toConsumableArray(topicIds)));
|
|
2188
2188
|
}
|
|
2189
2189
|
(_this$topics = this.topics)["delete"].apply(_this$topics, roomIds);
|
|
@@ -2191,7 +2191,7 @@ var RoomsManager = /*#__PURE__*/function () {
|
|
|
2191
2191
|
}, {
|
|
2192
2192
|
key: "deleteRoomsBySpaceId",
|
|
2193
2193
|
value: function deleteRoomsBySpaceId(spaceId) {
|
|
2194
|
-
this.deleteRoom.apply(this, RoomsManager_toConsumableArray(this.list.findBy('spaceId', spaceId).map(function (room) {
|
|
2194
|
+
this.deleteRoom.apply(this, RoomsManager_toConsumableArray(this.list.findBy('spaceId', spaceId).items.map(function (room) {
|
|
2195
2195
|
return room.id;
|
|
2196
2196
|
})));
|
|
2197
2197
|
}
|
|
@@ -2828,10 +2828,10 @@ var SpacesManager = /*#__PURE__*/function () {
|
|
|
2828
2828
|
}, {
|
|
2829
2829
|
key: "handleSpaceDeleted",
|
|
2830
2830
|
value: function handleSpaceDeleted(ev) {
|
|
2831
|
-
var _this$rooms$get$
|
|
2832
|
-
var roomIds = (_this$rooms$get$
|
|
2831
|
+
var _this$rooms$get$items, _this$rooms$get3, _this$roomIdToSpaceId;
|
|
2832
|
+
var roomIds = (_this$rooms$get$items = (_this$rooms$get3 = this.rooms.get(ev.id)) === null || _this$rooms$get3 === void 0 ? void 0 : _this$rooms$get3.items.map(function (item) {
|
|
2833
2833
|
return item.id;
|
|
2834
|
-
})) !== null && _this$rooms$get$
|
|
2834
|
+
})) !== null && _this$rooms$get$items !== void 0 ? _this$rooms$get$items : [];
|
|
2835
2835
|
(_this$roomIdToSpaceId = this.roomIdToSpaceId)["delete"].apply(_this$roomIdToSpaceId, SpacesManager_toConsumableArray(roomIds));
|
|
2836
2836
|
this.roles["delete"](ev.id);
|
|
2837
2837
|
this.members["delete"](ev.id);
|