@eleven-am/pondsocket 0.1.41 → 0.1.43

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eleven-am/pondsocket",
3
- "version": "0.1.41",
3
+ "version": "0.1.43",
4
4
  "description": "PondSocket is a fast simple socket server",
5
5
  "keywords": [
6
6
  "socket",
@@ -22,6 +22,7 @@ class EventResponse extends abstractResponse_1.PondResponse {
22
22
  */
23
23
  accept(assigns) {
24
24
  this._manageAssigns(assigns);
25
+ this._engine.sendMessage('channel', [this._event.sender], this._event.action, this._event.event, this._event.payload);
25
26
  this._hasExecuted = true;
26
27
  return this;
27
28
  }
@@ -8,6 +8,13 @@ class MatchPattern {
8
8
  * @param address - the address to resolve
9
9
  */
10
10
  parseEvent(path, address) {
11
+ if (path === '*') {
12
+ return {
13
+ params: {},
14
+ address,
15
+ query: this._parseQueries(address),
16
+ };
17
+ }
11
18
  const match = this._matchStringToPattern(address, path);
12
19
  if (match) {
13
20
  return {
package/types.d.ts CHANGED
@@ -166,7 +166,7 @@ export declare class Channel {
166
166
  * @param payload - The message to send.
167
167
  * @param recipient - The clients to send the message to.
168
168
  */
169
- public sendMessage(event: string, payload: PondMessage, recipient?: string[]): void;
169
+ public sendMessage(event: string, payload: PondMessage, recipient: string[]): void;
170
170
 
171
171
  /**
172
172
  * @desc Broadcasts a message to every other client in the channel except yourself.