@eleven-am/pondsocket 0.1.112 → 0.1.114
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/client.d.ts +3 -1
- package/client.js +2 -0
- package/nest.d.ts +2 -0
- package/nest.js +4 -0
- package/package.json +1 -1
- package/types.d.ts +5 -0
package/client.d.ts
CHANGED
package/client.js
CHANGED
|
@@ -12,8 +12,10 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
12
12
|
};
|
|
13
13
|
var _PondClient_instances, _PondClient_channels, _PondClient_createPublisher;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ChannelState = void 0;
|
|
15
16
|
const channel_1 = require("./client/channel");
|
|
16
17
|
const enums_1 = require("./enums");
|
|
18
|
+
Object.defineProperty(exports, "ChannelState", { enumerable: true, get: function () { return enums_1.ChannelState; } });
|
|
17
19
|
const subject_1 = require("./subjects/subject");
|
|
18
20
|
class PondClient {
|
|
19
21
|
constructor(endpoint, params = {}) {
|
package/nest.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
export {
|
|
2
2
|
OnJoinRequest,
|
|
3
3
|
ChannelInstance,
|
|
4
|
+
EndpointInstance,
|
|
4
5
|
DChannel as Channel,
|
|
5
6
|
OnConnectionRequest,
|
|
6
7
|
DEndpoint as Endpoint,
|
|
7
8
|
OnEvent, PondSocketModule,
|
|
9
|
+
GetLeaveEvent, OnLeaveEvent,
|
|
8
10
|
GetEventParams, GetEventQuery,
|
|
9
11
|
GetEventRequest, GetEventResponse,
|
|
10
12
|
GetJoinResponse, GetConnectionParams,
|
package/nest.js
CHANGED
|
@@ -239,6 +239,10 @@ class Context {
|
|
|
239
239
|
}
|
|
240
240
|
return null;
|
|
241
241
|
}
|
|
242
|
+
get assigns() {
|
|
243
|
+
var _a, _b, _c, _d, _e, _f;
|
|
244
|
+
return (_f = (_d = (_b = (_a = this.joinRequest) === null || _a === void 0 ? void 0 : _a.user.assigns) !== null && _b !== void 0 ? _b : (_c = this.eventRequest) === null || _c === void 0 ? void 0 : _c.user.assigns) !== null && _d !== void 0 ? _d : (_e = this.leveeEvent) === null || _e === void 0 ? void 0 : _e.assigns) !== null && _f !== void 0 ? _f : null;
|
|
245
|
+
}
|
|
242
246
|
retrieveClassData(key) {
|
|
243
247
|
return manageClassData(key, this.instance.constructor).get();
|
|
244
248
|
}
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -169,6 +169,11 @@ declare class Context<Path extends string = string> {
|
|
|
169
169
|
*/
|
|
170
170
|
event: PondEvent<Path> | null;
|
|
171
171
|
|
|
172
|
+
/**
|
|
173
|
+
* @desc The assigns, available in onJoin, onEvent handlers
|
|
174
|
+
*/
|
|
175
|
+
assigns: PondAssigns | null;
|
|
176
|
+
|
|
172
177
|
/**
|
|
173
178
|
* @desc Returns the *type* of the controller class which the current handler belongs to.
|
|
174
179
|
*/
|