@rbxts/tether 1.4.5 → 1.4.7

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.
@@ -41,5 +41,4 @@ export declare class MessageEmitter<MessageData> extends Destroyable {
41
41
  private executeEventCallbacks;
42
42
  private executeServerCallback;
43
43
  private executeClientCallback;
44
- private deserializeAndValidate;
45
44
  }
@@ -234,7 +234,7 @@ do
234
234
  if functions == nil then
235
235
  return nil
236
236
  end
237
- local data = self:deserializeAndValidate(message, serializedPacket)
237
+ local data = self.serdes:deserializePacket(message, serializedPacket)
238
238
  for callback in functions do
239
239
  self:executeClientCallback(callback, message, data)
240
240
  end
@@ -246,7 +246,7 @@ do
246
246
  if callbacks == nil then
247
247
  return nil
248
248
  end
249
- local data = self:deserializeAndValidate(message, serializedPacket)
249
+ local data = self.serdes:deserializePacket(message, serializedPacket)
250
250
  for callback in callbacks do
251
251
  if isServer then
252
252
  local _arg0 = player ~= nil
@@ -275,11 +275,6 @@ do
275
275
  end
276
276
  callback(newData)
277
277
  end
278
- function MessageEmitter:deserializeAndValidate(message, serializedPacket)
279
- local data = self.serdes:deserializePacket(message, serializedPacket)
280
- self:validateData(message, data)
281
- return data
282
- end
283
278
  end
284
279
  return {
285
280
  MessageEmitter = MessageEmitter,
@@ -81,7 +81,7 @@ do
81
81
  if type(_middlewares) == "function" then
82
82
  local _condition = order
83
83
  if _condition == nil then
84
- _condition = #messageMiddleware - 1
84
+ _condition = math.max(#messageMiddleware - 1, 0)
85
85
  end
86
86
  local _middlewares_1 = middlewares
87
87
  table.insert(messageMiddleware, _condition + 1, _middlewares_1)
@@ -98,7 +98,7 @@ do
98
98
  if type(_middlewares) == "function" then
99
99
  local _condition = order
100
100
  if _condition == nil then
101
- _condition = #messageMiddleware - 1
101
+ _condition = math.max(#messageMiddleware - 1, 0)
102
102
  end
103
103
  local _middlewares_1 = middlewares
104
104
  table.insert(messageMiddleware, _condition + 1, _middlewares_1)
@@ -134,7 +134,7 @@ do
134
134
  if type(_middlewares) == "function" then
135
135
  local _condition = order
136
136
  if _condition == nil then
137
- _condition = #messageMiddleware - 1
137
+ _condition = math.max(#messageMiddleware - 1, 0)
138
138
  end
139
139
  local _middlewares_1 = middlewares
140
140
  table.insert(messageMiddleware, _condition + 1, _middlewares_1)
@@ -151,7 +151,7 @@ do
151
151
  if type(_middlewares) == "function" then
152
152
  local _condition = order
153
153
  if _condition == nil then
154
- _condition = #messageMiddleware - 1
154
+ _condition = math.max(#messageMiddleware - 1, 0)
155
155
  end
156
156
  local _middlewares_1 = middlewares
157
157
  table.insert(messageMiddleware, _condition + 1, _middlewares_1)
@@ -187,7 +187,7 @@ do
187
187
  if type(_middlewares) == "function" then
188
188
  local _condition = order
189
189
  if _condition == nil then
190
- _condition = #globalMiddleware - 1
190
+ _condition = math.max(#globalMiddleware - 1, 0)
191
191
  end
192
192
  local _middlewares_1 = middlewares
193
193
  table.insert(globalMiddleware, _condition + 1, _middlewares_1)
@@ -204,7 +204,7 @@ do
204
204
  if type(_middlewares) == "function" then
205
205
  local _condition = order
206
206
  if _condition == nil then
207
- _condition = #globalMiddleware - 1
207
+ _condition = math.max(#globalMiddleware - 1, 0)
208
208
  end
209
209
  local _middlewares_1 = middlewares
210
210
  table.insert(globalMiddleware, _condition + 1, _middlewares_1)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rbxts/tether",
3
- "version": "1.4.5",
3
+ "version": "1.4.7",
4
4
  "main": "out/init.luau",
5
5
  "scripts": {
6
6
  "setup-rokit": "rokit trust lune-org/lune && rokit trust rojo-rbx/rojo && rokit install",