@eleven-am/pondsocket-nest 0.0.63 → 0.0.64
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/decorators/channel.js +1 -2
- package/decorators/channelInstance.js +1 -2
- package/decorators/endpoint.js +1 -2
- package/decorators/endpointInstance.js +1 -2
- package/decorators/onConnectionRequest.js +1 -2
- package/decorators/onEvent.js +1 -2
- package/decorators/onJoinRequest.js +1 -2
- package/decorators/onLeave.js +1 -2
- package/decorators/pondGuards.js +1 -2
- package/helpers/createParamDecorator.js +1 -2
- package/managers/channel.js +1 -2
- package/managers/channelInstance.js +1 -2
- package/managers/class.js +1 -2
- package/managers/connection.js +1 -2
- package/managers/endpoint.js +1 -2
- package/managers/endpointInstance.js +1 -2
- package/managers/event.js +1 -2
- package/managers/guards.js +2 -3
- package/managers/handlers.js +1 -2
- package/managers/join.js +1 -2
- package/managers/leave.js +1 -2
- package/managers/method.js +1 -2
- package/managers/parametres.js +1 -2
- package/managers/property.js +1 -2
- package/package.json +4 -4
- package/performers/action.js +2 -3
- package/performers/errors.js +1 -2
- package/performers/guards.js +1 -2
- package/performers/narrow.js +6 -7
- package/performers/response.js +1 -2
package/decorators/channel.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Channel =
|
|
3
|
+
exports.Channel = Channel;
|
|
4
4
|
const channel_1 = require("../managers/channel");
|
|
5
5
|
function Channel(path = '*') {
|
|
6
6
|
return (target) => {
|
|
@@ -8,4 +8,3 @@ function Channel(path = '*') {
|
|
|
8
8
|
set(path);
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
|
-
exports.Channel = Channel;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ChannelInstance =
|
|
3
|
+
exports.ChannelInstance = ChannelInstance;
|
|
4
4
|
const channelInstance_1 = require("../managers/channelInstance");
|
|
5
5
|
function ChannelInstance(channel) {
|
|
6
6
|
return (target, propertyKey) => {
|
|
@@ -13,4 +13,3 @@ function ChannelInstance(channel) {
|
|
|
13
13
|
});
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
exports.ChannelInstance = ChannelInstance;
|
package/decorators/endpoint.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Endpoint =
|
|
3
|
+
exports.Endpoint = Endpoint;
|
|
4
4
|
const endpoint_1 = require("../managers/endpoint");
|
|
5
5
|
function Endpoint(path = '*') {
|
|
6
6
|
return (target) => {
|
|
@@ -8,4 +8,3 @@ function Endpoint(path = '*') {
|
|
|
8
8
|
set(path);
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
|
-
exports.Endpoint = Endpoint;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EndpointInstance =
|
|
3
|
+
exports.EndpointInstance = EndpointInstance;
|
|
4
4
|
const endpointInstance_1 = require("../managers/endpointInstance");
|
|
5
5
|
function EndpointInstance() {
|
|
6
6
|
return (target, propertyKey) => {
|
|
@@ -8,4 +8,3 @@ function EndpointInstance() {
|
|
|
8
8
|
build(propertyKey);
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
|
-
exports.EndpointInstance = EndpointInstance;
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.OnConnectionRequest =
|
|
12
|
+
exports.OnConnectionRequest = OnConnectionRequest;
|
|
13
13
|
const connection_1 = require("../managers/connection");
|
|
14
14
|
const action_1 = require("../performers/action");
|
|
15
15
|
const errors_1 = require("../performers/errors");
|
|
@@ -27,4 +27,3 @@ function OnConnectionRequest() {
|
|
|
27
27
|
}));
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
exports.OnConnectionRequest = OnConnectionRequest;
|
package/decorators/onEvent.js
CHANGED
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.OnEvent =
|
|
12
|
+
exports.OnEvent = OnEvent;
|
|
13
13
|
const event_1 = require("../managers/event");
|
|
14
14
|
const action_1 = require("../performers/action");
|
|
15
15
|
const errors_1 = require("../performers/errors");
|
|
@@ -27,4 +27,3 @@ function OnEvent(event = '*') {
|
|
|
27
27
|
}));
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
exports.OnEvent = OnEvent;
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.OnJoinRequest =
|
|
12
|
+
exports.OnJoinRequest = OnJoinRequest;
|
|
13
13
|
const join_1 = require("../managers/join");
|
|
14
14
|
const action_1 = require("../performers/action");
|
|
15
15
|
const errors_1 = require("../performers/errors");
|
|
@@ -27,4 +27,3 @@ function OnJoinRequest() {
|
|
|
27
27
|
}));
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
exports.OnJoinRequest = OnJoinRequest;
|
package/decorators/onLeave.js
CHANGED
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.OnLeave =
|
|
12
|
+
exports.OnLeave = OnLeave;
|
|
13
13
|
const leave_1 = require("../managers/leave");
|
|
14
14
|
const action_1 = require("../performers/action");
|
|
15
15
|
function OnLeave() {
|
|
@@ -21,4 +21,3 @@ function OnLeave() {
|
|
|
21
21
|
}));
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
exports.OnLeave = OnLeave;
|
package/decorators/pondGuards.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PondGuards =
|
|
3
|
+
exports.PondGuards = PondGuards;
|
|
4
4
|
const guards_1 = require("../managers/guards");
|
|
5
5
|
function PondGuards(...guards) {
|
|
6
6
|
return (target, propertyKey) => {
|
|
@@ -8,4 +8,3 @@ function PondGuards(...guards) {
|
|
|
8
8
|
set(guards);
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
|
-
exports.PondGuards = PondGuards;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createParamDecorator =
|
|
3
|
+
exports.createParamDecorator = createParamDecorator;
|
|
4
4
|
require("reflect-metadata");
|
|
5
5
|
const parametres_1 = require("../managers/parametres");
|
|
6
6
|
function createParamDecorator(callback) {
|
|
@@ -10,4 +10,3 @@ function createParamDecorator(callback) {
|
|
|
10
10
|
set(index, (context) => callback(data, context, type));
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
|
-
exports.createParamDecorator = createParamDecorator;
|
package/managers/channel.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.manageChannel =
|
|
3
|
+
exports.manageChannel = manageChannel;
|
|
4
4
|
const class_1 = require("./class");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
function manageChannel(target) {
|
|
7
7
|
return (0, class_1.manageClass)(constants_1.channelKey, target);
|
|
8
8
|
}
|
|
9
|
-
exports.manageChannel = manageChannel;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.manageChannelInstance =
|
|
3
|
+
exports.manageChannelInstance = manageChannelInstance;
|
|
4
4
|
const property_1 = require("./property");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
function manageChannelInstance(target) {
|
|
7
7
|
return (0, property_1.manageProperty)(constants_1.channelInstanceKey, target);
|
|
8
8
|
}
|
|
9
|
-
exports.manageChannelInstance = manageChannelInstance;
|
package/managers/class.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.manageClass =
|
|
3
|
+
exports.manageClass = manageClass;
|
|
4
4
|
require("reflect-metadata");
|
|
5
5
|
function manageClass(key, target) {
|
|
6
6
|
return {
|
|
@@ -13,4 +13,3 @@ function manageClass(key, target) {
|
|
|
13
13
|
},
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
exports.manageClass = manageClass;
|
package/managers/connection.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.manageConnection =
|
|
3
|
+
exports.manageConnection = manageConnection;
|
|
4
4
|
const handlers_1 = require("./handlers");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
function manageConnection(target) {
|
|
7
7
|
return (0, handlers_1.manageHandlers)(constants_1.onConnectionHandlerKey, target);
|
|
8
8
|
}
|
|
9
|
-
exports.manageConnection = manageConnection;
|
package/managers/endpoint.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.manageEndpoint =
|
|
3
|
+
exports.manageEndpoint = manageEndpoint;
|
|
4
4
|
const class_1 = require("./class");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
function manageEndpoint(target) {
|
|
7
7
|
return (0, class_1.manageClass)(constants_1.endpointKey, target);
|
|
8
8
|
}
|
|
9
|
-
exports.manageEndpoint = manageEndpoint;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.manageEndpointInstance =
|
|
3
|
+
exports.manageEndpointInstance = manageEndpointInstance;
|
|
4
4
|
const property_1 = require("./property");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
function manageEndpointInstance(target) {
|
|
7
7
|
return (0, property_1.manageProperty)(constants_1.endpointInstanceKey, target);
|
|
8
8
|
}
|
|
9
|
-
exports.manageEndpointInstance = manageEndpointInstance;
|
package/managers/event.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.manageEvent =
|
|
3
|
+
exports.manageEvent = manageEvent;
|
|
4
4
|
const handlers_1 = require("./handlers");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
function manageEvent(target) {
|
|
7
7
|
return (0, handlers_1.manageHandlers)(constants_1.onEventHandlerKey, target);
|
|
8
8
|
}
|
|
9
|
-
exports.manageEvent = manageEvent;
|
package/managers/guards.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.manageGuards = manageGuards;
|
|
4
|
+
exports.getLocalGuards = getLocalGuards;
|
|
4
5
|
const class_1 = require("./class");
|
|
5
6
|
const method_1 = require("./method");
|
|
6
7
|
const constants_1 = require("../constants");
|
|
@@ -28,8 +29,6 @@ function manageGuards(target, propertyKey) {
|
|
|
28
29
|
},
|
|
29
30
|
};
|
|
30
31
|
}
|
|
31
|
-
exports.manageGuards = manageGuards;
|
|
32
32
|
function getLocalGuards() {
|
|
33
33
|
return Array.from(localGuards);
|
|
34
34
|
}
|
|
35
|
-
exports.getLocalGuards = getLocalGuards;
|
package/managers/handlers.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.manageHandlers =
|
|
3
|
+
exports.manageHandlers = manageHandlers;
|
|
4
4
|
const class_1 = require("./class");
|
|
5
5
|
function manageHandlers(key, target) {
|
|
6
6
|
const { get, set } = (0, class_1.manageClass)(key, target);
|
|
@@ -20,4 +20,3 @@ function manageHandlers(key, target) {
|
|
|
20
20
|
},
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
exports.manageHandlers = manageHandlers;
|
package/managers/join.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.manageJoin =
|
|
3
|
+
exports.manageJoin = manageJoin;
|
|
4
4
|
const handlers_1 = require("./handlers");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
function manageJoin(target) {
|
|
7
7
|
return (0, handlers_1.manageHandlers)(constants_1.onJoinHandlerKey, target);
|
|
8
8
|
}
|
|
9
|
-
exports.manageJoin = manageJoin;
|
package/managers/leave.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.manageLeave =
|
|
3
|
+
exports.manageLeave = manageLeave;
|
|
4
4
|
const handlers_1 = require("./handlers");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
function manageLeave(target) {
|
|
7
7
|
return (0, handlers_1.manageHandlers)(constants_1.onLeaveHandlerKey, target);
|
|
8
8
|
}
|
|
9
|
-
exports.manageLeave = manageLeave;
|
package/managers/method.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.manageMethod =
|
|
3
|
+
exports.manageMethod = manageMethod;
|
|
4
4
|
require("reflect-metadata");
|
|
5
5
|
function manageMethod(key, target, propertyKey) {
|
|
6
6
|
return {
|
|
@@ -13,4 +13,3 @@ function manageMethod(key, target, propertyKey) {
|
|
|
13
13
|
},
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
exports.manageMethod = manageMethod;
|
package/managers/parametres.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.manageParameters =
|
|
3
|
+
exports.manageParameters = manageParameters;
|
|
4
4
|
require("reflect-metadata");
|
|
5
5
|
const method_1 = require("./method");
|
|
6
6
|
const constants_1 = require("../constants");
|
|
@@ -22,4 +22,3 @@ function manageParameters(target, propertyKey) {
|
|
|
22
22
|
},
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
exports.manageParameters = manageParameters;
|
package/managers/property.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.manageProperty =
|
|
3
|
+
exports.manageProperty = manageProperty;
|
|
4
4
|
function manageProperty(key, target) {
|
|
5
5
|
function build(propertyKey, callback) {
|
|
6
6
|
Object.defineProperty(target, propertyKey, {
|
|
@@ -26,4 +26,3 @@ function manageProperty(key, target) {
|
|
|
26
26
|
set,
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
exports.manageProperty = manageProperty;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eleven-am/pondsocket-nest",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.64",
|
|
4
4
|
"description": "PondSocket is a fast simple socket server",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"socket",
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
"eslint-plugin-file-progress": "^1.3.0",
|
|
40
40
|
"eslint-plugin-import": "^2.29.1",
|
|
41
41
|
"jest": "^29.7.0",
|
|
42
|
-
"prettier": "^3.2
|
|
43
|
-
"ts-jest": "^29.1.
|
|
42
|
+
"prettier": "^3.3.2",
|
|
43
|
+
"ts-jest": "^29.1.5",
|
|
44
44
|
"ts-loader": "^9.5.1",
|
|
45
45
|
"ts-node": "^10.9.2",
|
|
46
|
-
"typescript": "^5.
|
|
46
|
+
"typescript": "^5.5.2"
|
|
47
47
|
},
|
|
48
48
|
"jest": {
|
|
49
49
|
"moduleFileExtensions": [
|
package/performers/action.js
CHANGED
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.performAction =
|
|
12
|
+
exports.performAction = performAction;
|
|
13
13
|
const guards_1 = require("./guards");
|
|
14
14
|
const narrow_1 = require("./narrow");
|
|
15
15
|
const response_1 = require("./response");
|
|
@@ -20,7 +20,7 @@ function retrieveParameters(context) {
|
|
|
20
20
|
var _a;
|
|
21
21
|
const gottenValues = (_a = (0, parametres_1.manageParameters)(context.getInstance(), context.getMethod()).get()) !== null && _a !== void 0 ? _a : [];
|
|
22
22
|
const promises = gottenValues
|
|
23
|
-
.map((
|
|
23
|
+
.map((_a) => __awaiter(this, [_a], void 0, function* ({ callback, index }) {
|
|
24
24
|
return ({
|
|
25
25
|
value: yield callback(context),
|
|
26
26
|
index,
|
|
@@ -66,4 +66,3 @@ function performAction(instance, moduleRef, originalMethod, propertyKey, leaveEv
|
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
exports.performAction = performAction;
|
package/performers/errors.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.performErrors =
|
|
3
|
+
exports.performErrors = performErrors;
|
|
4
4
|
// eslint-disable-next-line import/no-unresolved
|
|
5
5
|
const common_1 = require("@nestjs/common");
|
|
6
6
|
const narrow_1 = require("./narrow");
|
|
@@ -32,4 +32,3 @@ function performErrors(error, response) {
|
|
|
32
32
|
console.error(error);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
exports.performErrors = performErrors;
|
package/performers/guards.js
CHANGED
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.performGuards =
|
|
12
|
+
exports.performGuards = performGuards;
|
|
13
13
|
const guards_1 = require("../managers/guards");
|
|
14
14
|
function retrieveGuard(moduleRef, Guard) {
|
|
15
15
|
try {
|
|
@@ -32,4 +32,3 @@ function performGuards(moduleRef, context) {
|
|
|
32
32
|
return results.every((result) => result);
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
-
exports.performGuards = performGuards;
|
package/performers/narrow.js
CHANGED
|
@@ -1,27 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.isEventRequest = isEventRequest;
|
|
4
|
+
exports.isJoinRequest = isJoinRequest;
|
|
5
|
+
exports.isConnectionRequest = isConnectionRequest;
|
|
6
|
+
exports.isEventResponse = isEventResponse;
|
|
7
|
+
exports.isJoinResponse = isJoinResponse;
|
|
8
|
+
exports.isConnectionResponse = isConnectionResponse;
|
|
4
9
|
function isEventRequest(request) {
|
|
5
10
|
return 'channel' in request && !('joinParams' in request);
|
|
6
11
|
}
|
|
7
|
-
exports.isEventRequest = isEventRequest;
|
|
8
12
|
function isJoinRequest(request) {
|
|
9
13
|
return 'joinParams' in request;
|
|
10
14
|
}
|
|
11
|
-
exports.isJoinRequest = isJoinRequest;
|
|
12
15
|
function isConnectionRequest(request) {
|
|
13
16
|
return 'headers' in request;
|
|
14
17
|
}
|
|
15
|
-
exports.isConnectionRequest = isConnectionRequest;
|
|
16
18
|
function isEventResponse(response) {
|
|
17
19
|
return !('accept' in response);
|
|
18
20
|
}
|
|
19
|
-
exports.isEventResponse = isEventResponse;
|
|
20
21
|
function isJoinResponse(response) {
|
|
21
22
|
return 'accept' in response && 'broadcast' in response;
|
|
22
23
|
}
|
|
23
|
-
exports.isJoinResponse = isJoinResponse;
|
|
24
24
|
function isConnectionResponse(response) {
|
|
25
25
|
return 'accept' in response && !('broadcast' in response);
|
|
26
26
|
}
|
|
27
|
-
exports.isConnectionResponse = isConnectionResponse;
|
package/performers/response.js
CHANGED
|
@@ -11,7 +11,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
return t;
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.performResponse =
|
|
14
|
+
exports.performResponse = performResponse;
|
|
15
15
|
const narrow_1 = require("./narrow");
|
|
16
16
|
function isNotEmpty(value) {
|
|
17
17
|
return value !== null &&
|
|
@@ -68,4 +68,3 @@ function performResponse(socketId, channel, data, response) {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
exports.performResponse = performResponse;
|