Ignore:
Timestamp:
11/25/21 22:08:24 (3 years ago)
Author:
Ema <ema_spirova@…>
Branches:
master
Children:
8d391a1
Parents:
59329aa
Message:

primeNG components

Location:
trip-planner-front/node_modules/socket.io-adapter
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • trip-planner-front/node_modules/socket.io-adapter/CHANGELOG.md

    r59329aa re29cc2e  
     1## [2.3.3](https://github.com/socketio/socket.io-adapter/compare/2.3.2...2.3.3) (2021-11-16)
     2
     3
     4### Bug Fixes
     5
     6* fix broadcasting volatile packets with binary attachments ([88eee59](https://github.com/socketio/socket.io-adapter/commit/88eee5948aba94f999405239025f29c754a002e2))
     7
     8
     9
     10## [2.3.2](https://github.com/socketio/socket.io-adapter/compare/2.3.1...2.3.2) (2021-08-28)
     11
     12
     13### Bug Fixes
     14
     15* fix race condition when leaving rooms ([#74](https://github.com/socketio/socket.io-adapter/issues/74)) ([912e13a](https://github.com/socketio/socket.io-adapter/commit/912e13ad30bd584e2ece747be96a1ba0669dd874))
     16
     17
     18## [2.3.1](https://github.com/socketio/socket.io-adapter/compare/2.3.0...2.3.1) (2021-05-19)
     19
     20
     21### Bug Fixes
     22
     23* restore compatibility with binary parsers ([a33e42b](https://github.com/socketio/socket.io-adapter/commit/a33e42bb7b935ccdd3688b4c305714b791ade0db))
     24
     25
     26# [2.3.0](https://github.com/socketio/socket.io-adapter/compare/2.2.0...2.3.0) (2021-05-10)
     27
     28
     29### Features
     30
     31* add a serverSideEmit empty function ([c4cbd4b](https://github.com/socketio/socket.io-adapter/commit/c4cbd4ba2d8997f9ab8e06cfb631c8f9a43d16f1))
     32* add support for the "wsPreEncoded" writing option ([5579d40](https://github.com/socketio/socket.io-adapter/commit/5579d40c24d15f69e44246f788fb93beb367f994))
     33
     34
     35# [2.2.0](https://github.com/socketio/socket.io-adapter/compare/2.1.0...2.2.0) (2021-02-27)
     36
     37
     38### Features
     39
     40* add some utility methods ([1c9827e](https://github.com/socketio/socket.io-adapter/commit/1c9827ec1136e24094295907efaf4d4e6c2fef2f))
     41* allow excluding all sockets in a room ([#66](https://github.com/socketio/socket.io-adapter/issues/66)) ([985bb41](https://github.com/socketio/socket.io-adapter/commit/985bb41fa2c04f17f1cf3a17c14ab9acde8947f7))
     42
     43
    144# [2.1.0](https://github.com/socketio/socket.io-adapter/compare/2.0.3...2.1.0) (2021-01-15)
    245
  • trip-planner-front/node_modules/socket.io-adapter/dist/index.d.ts

    r59329aa re29cc2e  
    8181     */
    8282    socketRooms(id: SocketId): Set<Room> | undefined;
     83    /**
     84     * Returns the matching socket instances
     85     *
     86     * @param opts - the filters to apply
     87     */
     88    fetchSockets(opts: BroadcastOptions): Promise<any[]>;
     89    /**
     90     * Makes the matching socket instances join the specified rooms
     91     *
     92     * @param opts - the filters to apply
     93     * @param rooms - the rooms to join
     94     */
     95    addSockets(opts: BroadcastOptions, rooms: Room[]): void;
     96    /**
     97     * Makes the matching socket instances leave the specified rooms
     98     *
     99     * @param opts - the filters to apply
     100     * @param rooms - the rooms to leave
     101     */
     102    delSockets(opts: BroadcastOptions, rooms: Room[]): void;
     103    /**
     104     * Makes the matching socket instances disconnect
     105     *
     106     * @param opts - the filters to apply
     107     * @param close - whether to close the underlying connection
     108     */
     109    disconnectSockets(opts: BroadcastOptions, close: boolean): void;
     110    private apply;
     111    private computeExceptSids;
     112    /**
     113     * Send a packet to the other Socket.IO servers in the cluster
     114     * @param packet - an array of arguments, which may include an acknowledgement callback at the end
     115     */
     116    serverSideEmit(packet: any[]): void;
    83117}
  • trip-planner-front/node_modules/socket.io-adapter/dist/index.js

    r59329aa re29cc2e  
    6060    }
    6161    _del(room, id) {
    62         if (this.rooms.has(room)) {
    63             const deleted = this.rooms.get(room).delete(id);
     62        const _room = this.rooms.get(room);
     63        if (_room != null) {
     64            const deleted = _room.delete(id);
    6465            if (deleted) {
    6566                this.emit("leave-room", room, id);
    6667            }
    67             if (this.rooms.get(room).size === 0) {
    68                 this.rooms.delete(room);
     68            if (_room.size === 0 && this.rooms.delete(room)) {
    6969                this.emit("delete-room", room);
    7070            }
     
    9898     */
    9999    broadcast(packet, opts) {
    100         const rooms = opts.rooms;
    101         const except = opts.except || new Set();
    102100        const flags = opts.flags || {};
    103101        const packetOpts = {
     
    106104            compress: flags.compress
    107105        };
    108         const ids = new Set();
    109106        packet.nsp = this.nsp.name;
    110107        const encodedPackets = this.encoder.encode(packet);
     108        this.apply(opts, socket => {
     109            socket.client.writeToEngine(encodedPackets, packetOpts);
     110        });
     111    }
     112    /**
     113     * Gets a list of sockets by sid.
     114     *
     115     * @param {Set<Room>} rooms   the explicit set of rooms to check.
     116     */
     117    sockets(rooms) {
     118        const sids = new Set();
     119        this.apply({ rooms }, socket => {
     120            sids.add(socket.id);
     121        });
     122        return Promise.resolve(sids);
     123    }
     124    /**
     125     * Gets the list of rooms a given socket has joined.
     126     *
     127     * @param {SocketId} id   the socket id
     128     */
     129    socketRooms(id) {
     130        return this.sids.get(id);
     131    }
     132    /**
     133     * Returns the matching socket instances
     134     *
     135     * @param opts - the filters to apply
     136     */
     137    fetchSockets(opts) {
     138        const sockets = [];
     139        this.apply(opts, socket => {
     140            sockets.push(socket);
     141        });
     142        return Promise.resolve(sockets);
     143    }
     144    /**
     145     * Makes the matching socket instances join the specified rooms
     146     *
     147     * @param opts - the filters to apply
     148     * @param rooms - the rooms to join
     149     */
     150    addSockets(opts, rooms) {
     151        this.apply(opts, socket => {
     152            socket.join(rooms);
     153        });
     154    }
     155    /**
     156     * Makes the matching socket instances leave the specified rooms
     157     *
     158     * @param opts - the filters to apply
     159     * @param rooms - the rooms to leave
     160     */
     161    delSockets(opts, rooms) {
     162        this.apply(opts, socket => {
     163            rooms.forEach(room => socket.leave(room));
     164        });
     165    }
     166    /**
     167     * Makes the matching socket instances disconnect
     168     *
     169     * @param opts - the filters to apply
     170     * @param close - whether to close the underlying connection
     171     */
     172    disconnectSockets(opts, close) {
     173        this.apply(opts, socket => {
     174            socket.disconnect(close);
     175        });
     176    }
     177    apply(opts, callback) {
     178        const rooms = opts.rooms;
     179        const except = this.computeExceptSids(opts.except);
    111180        if (rooms.size) {
     181            const ids = new Set();
    112182            for (const room of rooms) {
    113183                if (!this.rooms.has(room))
     
    118188                    const socket = this.nsp.sockets.get(id);
    119189                    if (socket) {
    120                         socket.packet(encodedPackets, packetOpts);
     190                        callback(socket);
    121191                        ids.add(id);
    122192                    }
     
    130200                const socket = this.nsp.sockets.get(id);
    131201                if (socket)
    132                     socket.packet(encodedPackets, packetOpts);
    133             }
    134         }
    135     }
    136     /**
    137      * Gets a list of sockets by sid.
    138      *
    139      * @param {Set<Room>} rooms   the explicit set of rooms to check.
    140      */
    141     sockets(rooms) {
    142         const sids = new Set();
    143         if (rooms.size) {
    144             for (const room of rooms) {
    145                 if (!this.rooms.has(room))
    146                     continue;
    147                 for (const id of this.rooms.get(room)) {
    148                     if (this.nsp.sockets.has(id)) {
    149                         sids.add(id);
    150                     }
     202                    callback(socket);
     203            }
     204        }
     205    }
     206    computeExceptSids(exceptRooms) {
     207        const exceptSids = new Set();
     208        if (exceptRooms && exceptRooms.size > 0) {
     209            for (const room of exceptRooms) {
     210                if (this.rooms.has(room)) {
     211                    this.rooms.get(room).forEach(sid => exceptSids.add(sid));
    151212                }
    152213            }
    153214        }
    154         else {
    155             for (const [id] of this.sids) {
    156                 if (this.nsp.sockets.has(id))
    157                     sids.add(id);
    158             }
    159         }
    160         return Promise.resolve(sids);
    161     }
    162     /**
    163      * Gets the list of rooms a given socket has joined.
    164      *
    165      * @param {SocketId} id   the socket id
    166      */
    167     socketRooms(id) {
    168         return this.sids.get(id);
     215        return exceptSids;
     216    }
     217    /**
     218     * Send a packet to the other Socket.IO servers in the cluster
     219     * @param packet - an array of arguments, which may include an acknowledgement callback at the end
     220     */
     221    serverSideEmit(packet) {
     222        throw new Error("this adapter does not support the serverSideEmit() functionality");
    169223    }
    170224}
  • trip-planner-front/node_modules/socket.io-adapter/package.json

    r59329aa re29cc2e  
    11{
    2   "_args": [
    3     [
    4       "socket.io-adapter@2.1.0",
    5       "C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front"
    6     ]
    7   ],
    8   "_development": true,
    9   "_from": "socket.io-adapter@2.1.0",
    10   "_id": "socket.io-adapter@2.1.0",
     2  "_from": "socket.io-adapter@~2.3.3",
     3  "_id": "socket.io-adapter@2.3.3",
    114  "_inBundle": false,
    12   "_integrity": "sha512-+vDov/aTsLjViYTwS9fPy5pEtTkrbEKsw2M+oVSoFGw6OD1IpvlV1VPhUzNbofCQ8oyMbdYJqDtGdmHQK6TdPg==",
     5  "_integrity": "sha512-Qd/iwn3VskrpNO60BeRyCyr8ZWw9CPZyitW4AQwmRZ8zCiyDiL+znRnWX6tDHXnWn1sJrM1+b6Mn6wEDJJ4aYQ==",
    136  "_location": "/socket.io-adapter",
    147  "_phantomChildren": {},
    158  "_requested": {
    16     "type": "version",
     9    "type": "range",
    1710    "registry": true,
    18     "raw": "socket.io-adapter@2.1.0",
     11    "raw": "socket.io-adapter@~2.3.3",
    1912    "name": "socket.io-adapter",
    2013    "escapedName": "socket.io-adapter",
    21     "rawSpec": "2.1.0",
     14    "rawSpec": "~2.3.3",
    2215    "saveSpec": null,
    23     "fetchSpec": "2.1.0"
     16    "fetchSpec": "~2.3.3"
    2417  },
    2518  "_requiredBy": [
    2619    "/socket.io"
    2720  ],
    28   "_resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.1.0.tgz",
    29   "_spec": "2.1.0",
    30   "_where": "C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front",
     21  "_resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.3.3.tgz",
     22  "_shasum": "4d6111e4d42e9f7646e365b4f578269821f13486",
     23  "_spec": "socket.io-adapter@~2.3.3",
     24  "_where": "C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\node_modules\\socket.io",
    3125  "bugs": {
    3226    "url": "https://github.com/socketio/socket.io-adapter/issues"
    3327  },
     28  "bundleDependencies": false,
     29  "deprecated": false,
    3430  "description": "default socket.io in-memory adapter",
    3531  "devDependencies": {
     
    5955  },
    6056  "types": "./dist/index.d.ts",
    61   "version": "2.1.0"
     57  "version": "2.3.3"
    6258}
Note: See TracChangeset for help on using the changeset viewer.