@eleven-am/pondsocket 0.1.76 → 0.1.78
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/nest.js +8 -7
- package/package.json +1 -1
package/nest.js
CHANGED
|
@@ -21,8 +21,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
23
|
exports.PondSocketModule = exports.Endpoints = exports.Endpoint = exports.Channels = exports.ChannelInstance = exports.Channel = exports.OnConnectionRequest = exports.OnEvent = exports.OnJoinRequest = exports.GetConnectionQuery = exports.GetConnectionHeaders = exports.GetConnectionParams = exports.GetConnectionRequestId = exports.GetConnectionResponse = exports.GetConnectionRequest = exports.GetEventRequest = exports.GetEventResponse = exports.GetEventQuery = exports.GetEventParams = exports.GetEventPayload = exports.GetUserPresence = exports.GetInternalChannel = exports.GetUserData = exports.GetJoinParams = exports.GetJoinResponse = exports.GetJoinRequest = void 0;
|
|
24
|
-
require("reflect-metadata");
|
|
25
24
|
const common_1 = require("@nestjs/common");
|
|
25
|
+
require("reflect-metadata");
|
|
26
26
|
const pondSocket_1 = require("./server/pondSocket");
|
|
27
27
|
const joinRequestKey = Symbol('joinRequestKey');
|
|
28
28
|
const joinResponseKey = Symbol('joinResponseKey');
|
|
@@ -438,7 +438,7 @@ function Channel(path = '*') {
|
|
|
438
438
|
response.accept();
|
|
439
439
|
}
|
|
440
440
|
}));
|
|
441
|
-
const { set } = manageChannelInstance(
|
|
441
|
+
const { set } = manageChannelInstance(constructor.prototype);
|
|
442
442
|
const { get } = manageEventHandlers(this);
|
|
443
443
|
set(channel);
|
|
444
444
|
get().forEach((handler) => {
|
|
@@ -503,14 +503,15 @@ function Endpoints(endpoints) {
|
|
|
503
503
|
const channels = get();
|
|
504
504
|
return [...acc, ...channels];
|
|
505
505
|
}, []);
|
|
506
|
-
// eslint-disable-next-line new-cap
|
|
507
|
-
const NestJSModule = (0, common_1.Module)({
|
|
508
|
-
providers: [...endpoints, ...channels],
|
|
509
|
-
});
|
|
510
506
|
const { set } = manageEndpoints(constructor.prototype);
|
|
511
507
|
set(endpoints);
|
|
512
508
|
// eslint-disable-next-line new-cap
|
|
513
|
-
|
|
509
|
+
const globalConstructor = (0, common_1.Global)()(constructor);
|
|
510
|
+
// eslint-disable-next-line new-cap
|
|
511
|
+
return (0, common_1.Module)({
|
|
512
|
+
providers: [...endpoints, ...channels],
|
|
513
|
+
exports: [...endpoints, ...channels],
|
|
514
|
+
})(globalConstructor);
|
|
514
515
|
};
|
|
515
516
|
}
|
|
516
517
|
exports.Endpoints = Endpoints;
|