@hytopia.com/server-protocol 1.3.56 → 1.3.57

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": "@hytopia.com/server-protocol",
3
- "version": "1.3.56",
3
+ "version": "1.3.57",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -35,12 +35,12 @@ type WrtcTransportConnect = {
35
35
  }
36
36
 
37
37
  export type ConnectionSchema = {
38
- c?: WrtcTransportConnect[], // wrtc transport connect | client -> server | 3rd wrtc packet
39
- ca?: WrtcConnectAck[], // wrtc connect ack | server -> client | 4th wrtc packet
40
- d?: WrtcDataChannel[], // wrtc data channels | server <-> client | 2nd wrtc packet s->c, 5th wrtc packet c->s
41
- p?: 'wss' | 'wrtc'; // protocol switch signal | client -> server | 1st wrtc packet (send 'wrtc')
42
- pa?: WrtcProduceDataAck[], // wrtc produce data ack | server -> client | 6th wrtc packet
43
- t?: WrtcTransport[], // wrtc transports | server -> client | 2nd wrtc packet
38
+ c?: WrtcTransportConnect, // wrtc transport connect | client -> server | 3rd wrtc packet
39
+ ca?: WrtcConnectAck, // wrtc connect ack | server -> client | 4th wrtc packet
40
+ d?: WrtcDataChannel[], // wrtc data channels | server <-> client | 2nd wrtc packet s->c, 5th wrtc packet c->s
41
+ p?: 'wss' | 'wrtc'; // protocol switch signal | client -> server | 1st wrtc packet (send 'wrtc')
42
+ pa?: WrtcProduceDataAck, // wrtc produce data ack | server -> client | 6th wrtc packet
43
+ t?: WrtcTransport[], // wrtc transports | server -> client | 2nd wrtc packet
44
44
  };
45
45
 
46
46
  /**
@@ -175,11 +175,11 @@ const wrtcDataChannelSchema: JSONSchemaType<WrtcDataChannel> = {
175
175
  export const connectionSchema: JSONSchemaType<ConnectionSchema> = {
176
176
  type: 'object',
177
177
  properties: {
178
- c: { type: 'array', items: { ...wrtcTransportConnectSchema }, nullable: true },
179
- ca: { type: 'array', items: { ...wrtcConnectAckSchema }, nullable: true },
178
+ c: { ...wrtcTransportConnectSchema, nullable: true },
179
+ ca: { ...wrtcConnectAckSchema, nullable: true },
180
180
  d: { type: 'array', items: { ...wrtcDataChannelSchema }, nullable: true },
181
181
  p: { type: 'string', enum: [ 'wss', 'wrtc' ], nullable: true },
182
- pa: { type: 'array', items: { ...wrtcProduceDataAckSchema }, nullable: true },
182
+ pa: { ...wrtcProduceDataAckSchema, nullable: true },
183
183
  t: { type: 'array', items: { ...wrtcTransportSchema }, nullable: true },
184
184
  },
185
185
  additionalProperties: false,