This commit is contained in:
2022-09-30 05:39:11 +00:00
parent 41ee9463ae
commit 4687fa49bc
11418 changed files with 1312504 additions and 0 deletions

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectInspectionProfilesVisibleTreeState">
<entry key="Project Default">
<profile-state>
<expanded-state>
<State>
<id />
</State>
<State>
<id>General</id>
</State>
<State>
<id>XPath</id>
</State>
</expanded-state>
<selected-state>
<State>
<id>AngularJS</id>
</State>
</selected-state>
</profile-state>
</entry>
</component>
</project>

View File

@ -0,0 +1,5 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="PROJECT_PROFILE" />
</settings>
</component>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
</project>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/socket.io-adapter.iml" filepath="$PROJECT_DIR$/.idea/socket.io-adapter.iml" />
</modules>
</component>
</project>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="8eb8a9e4-bb46-4154-84dd-8a1398682382" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/package-lock.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="JsFlowSettings">
<service-enabled>true</service-enabled>
<exe-path />
<annotation-enable>false</annotation-enable>
<other-services-enabled>true</other-services-enabled>
<auto-save>true</auto-save>
</component>
<component name="ProjectId" id="1U6jPzQEt3o8mt2AnrjVrsfgg2l" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="PropertiesComponent">
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="nodejs_interpreter_path" value="$USER_HOME$/.nvm/versions/node/v6.10.3/bin/node" />
<property name="settings.editor.selected.configurable" value="configurable.group.editor" />
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="8eb8a9e4-bb46-4154-84dd-8a1398682382" name="Default Changelist" comment="" />
<created>1574683918794</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1574683918794</updated>
<workItem from="1574683921646" duration="413000" />
</task>
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State />
</value>
</entry>
</map>
</option>
</component>
</project>

20
buildfiles/app/node_modules/socket.io-adapter/LICENSE generated vendored Normal file
View File

@ -0,0 +1,20 @@
(The MIT License)
Copyright (c) 2014 Guillermo Rauch <guillermo@learnboost.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the 'Software'), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -0,0 +1,16 @@
# socket.io-adapter
Default socket.io in-memory adapter class.
## How to use
This module is not intended for end-user usage, but can be used as an
interface to inherit from other adapters you might want to build.
As an example of an adapter that builds on top of this, please take a look
at [socket.io-redis](https://github.com/learnboost/socket.io-redis).
## License
MIT

263
buildfiles/app/node_modules/socket.io-adapter/index.js generated vendored Normal file
View File

@ -0,0 +1,263 @@
/**
* Module dependencies.
*/
var Emitter = require('events').EventEmitter;
/**
* Module exports.
*/
module.exports = Adapter;
/**
* Memory adapter constructor.
*
* @param {Namespace} nsp
* @api public
*/
function Adapter(nsp){
this.nsp = nsp;
this.rooms = {};
this.sids = {};
this.encoder = nsp.server.encoder;
}
/**
* Inherits from `EventEmitter`.
*/
Adapter.prototype.__proto__ = Emitter.prototype;
/**
* Adds a socket to a room.
*
* @param {String} socket id
* @param {String} room name
* @param {Function} callback
* @api public
*/
Adapter.prototype.add = function(id, room, fn){
return this.addAll(id, [ room ], fn);
};
/**
* Adds a socket to a list of room.
*
* @param {String} socket id
* @param {String} rooms
* @param {Function} callback
* @api public
*/
Adapter.prototype.addAll = function(id, rooms, fn){
for (var i = 0; i < rooms.length; i++) {
var room = rooms[i];
this.sids[id] = this.sids[id] || {};
this.sids[id][room] = true;
this.rooms[room] = this.rooms[room] || Room();
this.rooms[room].add(id);
}
if (fn) process.nextTick(fn.bind(null, null));
};
/**
* Removes a socket from a room.
*
* @param {String} socket id
* @param {String} room name
* @param {Function} callback
* @api public
*/
Adapter.prototype.del = function(id, room, fn){
if (this.sids[id]) delete this.sids[id][room];
if (this.rooms.hasOwnProperty(room)) {
this.rooms[room].del(id);
if (this.rooms[room].length === 0) delete this.rooms[room];
}
if (fn) process.nextTick(fn.bind(null, null));
};
/**
* Removes a socket from all rooms it's joined.
*
* @param {String} socket id
* @param {Function} callback
* @api public
*/
Adapter.prototype.delAll = function(id, fn){
var rooms = this.sids[id];
if (rooms) {
for (var room in rooms) {
if (this.rooms.hasOwnProperty(room)) {
this.rooms[room].del(id);
if (this.rooms[room].length === 0) delete this.rooms[room];
}
}
}
delete this.sids[id];
if (fn) process.nextTick(fn.bind(null, null));
};
/**
* Broadcasts a packet.
*
* Options:
* - `flags` {Object} flags for this packet
* - `except` {Array} sids that should be excluded
* - `rooms` {Array} list of rooms to broadcast to
*
* @param {Object} packet object
* @api public
*/
Adapter.prototype.broadcast = function(packet, opts){
var rooms = opts.rooms || [];
var except = opts.except || [];
var flags = opts.flags || {};
var packetOpts = {
preEncoded: true,
volatile: flags.volatile,
compress: flags.compress
};
var ids = {};
var self = this;
var socket;
packet.nsp = this.nsp.name;
this.encoder.encode(packet, function(encodedPackets) {
if (rooms.length) {
for (var i = 0; i < rooms.length; i++) {
var room = self.rooms[rooms[i]];
if (!room) continue;
var sockets = room.sockets;
for (var id in sockets) {
if (sockets.hasOwnProperty(id)) {
if (ids[id] || ~except.indexOf(id)) continue;
socket = self.nsp.connected[id];
if (socket) {
socket.packet(encodedPackets, packetOpts);
ids[id] = true;
}
}
}
}
} else {
for (var id in self.sids) {
if (self.sids.hasOwnProperty(id)) {
if (~except.indexOf(id)) continue;
socket = self.nsp.connected[id];
if (socket) socket.packet(encodedPackets, packetOpts);
}
}
}
});
};
/**
* Gets a list of clients by sid.
*
* @param {Array} explicit set of rooms to check.
* @param {Function} callback
* @api public
*/
Adapter.prototype.clients = function(rooms, fn){
if ('function' == typeof rooms){
fn = rooms;
rooms = null;
}
rooms = rooms || [];
var ids = {};
var sids = [];
var socket;
if (rooms.length) {
for (var i = 0; i < rooms.length; i++) {
var room = this.rooms[rooms[i]];
if (!room) continue;
var sockets = room.sockets;
for (var id in sockets) {
if (sockets.hasOwnProperty(id)) {
if (ids[id]) continue;
socket = this.nsp.connected[id];
if (socket) {
sids.push(id);
ids[id] = true;
}
}
}
}
} else {
for (var id in this.sids) {
if (this.sids.hasOwnProperty(id)) {
socket = this.nsp.connected[id];
if (socket) sids.push(id);
}
}
}
if (fn) process.nextTick(fn.bind(null, null, sids));
};
/**
* Gets the list of rooms a given client has joined.
*
* @param {String} socket id
* @param {Function} callback
* @api public
*/
Adapter.prototype.clientRooms = function(id, fn){
var rooms = this.sids[id];
if (fn) process.nextTick(fn.bind(null, null, rooms ? Object.keys(rooms) : null));
};
/**
* Room constructor.
*
* @api private
*/
function Room(){
if (!(this instanceof Room)) return new Room();
this.sockets = {};
this.length = 0;
}
/**
* Adds a socket to a room.
*
* @param {String} socket id
* @api private
*/
Room.prototype.add = function(id){
if (!this.sockets.hasOwnProperty(id)) {
this.sockets[id] = true;
this.length++;
}
};
/**
* Removes a socket from a room.
*
* @param {String} socket id
* @api private
*/
Room.prototype.del = function(id){
if (this.sockets.hasOwnProperty(id)) {
delete this.sockets[id];
this.length--;
}
};

View File

@ -0,0 +1,42 @@
{
"_args": [
[
"socket.io-adapter@1.1.2",
"/home/shihaam/www/freezer.shihaam.me/app"
]
],
"_from": "socket.io-adapter@1.1.2",
"_id": "socket.io-adapter@1.1.2",
"_inBundle": false,
"_integrity": "sha512-WzZRUj1kUjrTIrUKpZLEzFZ1OLj5FwLlAFQs9kuZJzJi5DKdU7FsWc36SNmA8iDOtwBQyT8FkrriRM8vXLYz8g==",
"_location": "/socket.io-adapter",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "socket.io-adapter@1.1.2",
"name": "socket.io-adapter",
"escapedName": "socket.io-adapter",
"rawSpec": "1.1.2",
"saveSpec": null,
"fetchSpec": "1.1.2"
},
"_requiredBy": [
"/socket.io"
],
"_resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.2.tgz",
"_spec": "1.1.2",
"_where": "/home/shihaam/www/freezer.shihaam.me/app",
"bugs": {
"url": "https://github.com/socketio/socket.io-adapter/issues"
},
"description": "default socket.io in-memory adapter",
"homepage": "https://github.com/socketio/socket.io-adapter#readme",
"license": "MIT",
"name": "socket.io-adapter",
"repository": {
"type": "git",
"url": "git://github.com/socketio/socket.io-adapter.git"
},
"version": "1.1.2"
}