@colyseus/shared-types 0.17.5 → 0.17.6
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/build/Protocol.cjs +1 -0
- package/build/Protocol.cjs.map +2 -2
- package/build/Protocol.d.ts +1 -0
- package/build/Protocol.mjs +1 -0
- package/build/Protocol.mjs.map +2 -2
- package/package.json +3 -3
- package/src/Protocol.ts +3 -1
package/build/Protocol.cjs
CHANGED
package/build/Protocol.cjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/Protocol.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Colyseus protocol codes range between 0~100\n * Use codes between 0~127 for lesser throughput (1 byte)\n */\nexport const Protocol = {\n // Room-related (10~19)\n JOIN_ROOM: 10,\n ERROR: 11,\n LEAVE_ROOM: 12,\n ROOM_DATA: 13,\n ROOM_STATE: 14,\n ROOM_STATE_PATCH: 15,\n ROOM_DATA_SCHEMA: 16, // DEPRECATED: used to send schema instances via room.send()\n ROOM_DATA_BYTES: 17,\n PING: 18,\n} as const;\nexport type Protocol = typeof Protocol[keyof typeof Protocol];\n\n/**\n * HTTP MatchMaking Error Codes\n */\nexport const ErrorCode = {\n MATCHMAKE_NO_HANDLER: 520,\n MATCHMAKE_INVALID_CRITERIA: 521,\n MATCHMAKE_INVALID_ROOM_ID: 522,\n MATCHMAKE_UNHANDLED: 523, // generic exception during onCreate/onJoin\n MATCHMAKE_EXPIRED: 524, // generic exception during onCreate/onJoin\n AUTH_FAILED: 525,\n APPLICATION_ERROR: 526,\n\n INVALID_PAYLOAD: 4217,\n} as const;\nexport type ErrorCode = typeof ErrorCode[keyof typeof ErrorCode];\n\n/**\n * WebSocket close codes\n * (See https://github.com/Luka967/websocket-close-codes)\n */\nexport const CloseCode = {\n NORMAL_CLOSURE: 1000,\n GOING_AWAY: 1001,\n NO_STATUS_RECEIVED: 1005,\n ABNORMAL_CLOSURE: 1006,\n\n CONSENTED: 4000,\n SERVER_SHUTDOWN: 4001,\n WITH_ERROR: 4002,\n MAY_TRY_RECONNECT: 4010
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,IAAM,WAAW;AAAA;AAAA,EAEtB,WAAW;AAAA,EACX,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,kBAAkB;AAAA,EAClB,kBAAkB;AAAA;AAAA,EAClB,iBAAiB;AAAA,EACjB,MAAM;AACR;AAMO,IAAM,YAAY;AAAA,EACvB,sBAAsB;AAAA,EACtB,4BAA4B;AAAA,EAC5B,2BAA2B;AAAA,EAC3B,qBAAqB;AAAA;AAAA,EACrB,mBAAmB;AAAA;AAAA,EACnB,aAAa;AAAA,EACb,mBAAmB;AAAA,EAEnB,iBAAiB;AACnB;AAOO,IAAM,YAAY;AAAA,EACvB,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,oBAAoB;AAAA,EACpB,kBAAkB;AAAA,EAElB,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ,mBAAmB;AACrB;",
|
|
4
|
+
"sourcesContent": ["/**\n * Colyseus protocol codes range between 0~100\n * Use codes between 0~127 for lesser throughput (1 byte)\n */\nexport const Protocol = {\n // Room-related (10~19)\n JOIN_ROOM: 10,\n ERROR: 11,\n LEAVE_ROOM: 12,\n ROOM_DATA: 13,\n ROOM_STATE: 14,\n ROOM_STATE_PATCH: 15,\n ROOM_DATA_SCHEMA: 16, // DEPRECATED: used to send schema instances via room.send()\n ROOM_DATA_BYTES: 17,\n PING: 18,\n} as const;\nexport type Protocol = typeof Protocol[keyof typeof Protocol];\n\n/**\n * HTTP MatchMaking Error Codes\n */\nexport const ErrorCode = {\n MATCHMAKE_NO_HANDLER: 520,\n MATCHMAKE_INVALID_CRITERIA: 521,\n MATCHMAKE_INVALID_ROOM_ID: 522,\n MATCHMAKE_UNHANDLED: 523, // generic exception during onCreate/onJoin\n MATCHMAKE_EXPIRED: 524, // generic exception during onCreate/onJoin\n AUTH_FAILED: 525,\n APPLICATION_ERROR: 526,\n\n INVALID_PAYLOAD: 4217,\n} as const;\nexport type ErrorCode = typeof ErrorCode[keyof typeof ErrorCode];\n\n/**\n * WebSocket close codes\n * (See https://github.com/Luka967/websocket-close-codes)\n */\nexport const CloseCode = {\n NORMAL_CLOSURE: 1000,\n GOING_AWAY: 1001,\n NO_STATUS_RECEIVED: 1005,\n ABNORMAL_CLOSURE: 1006,\n\n CONSENTED: 4000,\n SERVER_SHUTDOWN: 4001,\n WITH_ERROR: 4002,\n FAILED_TO_RECONNECT: 4003,\n\n MAY_TRY_RECONNECT: 4010,\n} as const;\nexport type CloseCode = typeof CloseCode[keyof typeof CloseCode];\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,IAAM,WAAW;AAAA;AAAA,EAEtB,WAAW;AAAA,EACX,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,kBAAkB;AAAA,EAClB,kBAAkB;AAAA;AAAA,EAClB,iBAAiB;AAAA,EACjB,MAAM;AACR;AAMO,IAAM,YAAY;AAAA,EACvB,sBAAsB;AAAA,EACtB,4BAA4B;AAAA,EAC5B,2BAA2B;AAAA,EAC3B,qBAAqB;AAAA;AAAA,EACrB,mBAAmB;AAAA;AAAA,EACnB,aAAa;AAAA,EACb,mBAAmB;AAAA,EAEnB,iBAAiB;AACnB;AAOO,IAAM,YAAY;AAAA,EACvB,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,oBAAoB;AAAA,EACpB,kBAAkB;AAAA,EAElB,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ,qBAAqB;AAAA,EAErB,mBAAmB;AACrB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/build/Protocol.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export declare const CloseCode: {
|
|
|
40
40
|
readonly CONSENTED: 4000;
|
|
41
41
|
readonly SERVER_SHUTDOWN: 4001;
|
|
42
42
|
readonly WITH_ERROR: 4002;
|
|
43
|
+
readonly FAILED_TO_RECONNECT: 4003;
|
|
43
44
|
readonly MAY_TRY_RECONNECT: 4010;
|
|
44
45
|
};
|
|
45
46
|
export type CloseCode = typeof CloseCode[keyof typeof CloseCode];
|
package/build/Protocol.mjs
CHANGED
package/build/Protocol.mjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/Protocol.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Colyseus protocol codes range between 0~100\n * Use codes between 0~127 for lesser throughput (1 byte)\n */\nexport const Protocol = {\n // Room-related (10~19)\n JOIN_ROOM: 10,\n ERROR: 11,\n LEAVE_ROOM: 12,\n ROOM_DATA: 13,\n ROOM_STATE: 14,\n ROOM_STATE_PATCH: 15,\n ROOM_DATA_SCHEMA: 16, // DEPRECATED: used to send schema instances via room.send()\n ROOM_DATA_BYTES: 17,\n PING: 18,\n} as const;\nexport type Protocol = typeof Protocol[keyof typeof Protocol];\n\n/**\n * HTTP MatchMaking Error Codes\n */\nexport const ErrorCode = {\n MATCHMAKE_NO_HANDLER: 520,\n MATCHMAKE_INVALID_CRITERIA: 521,\n MATCHMAKE_INVALID_ROOM_ID: 522,\n MATCHMAKE_UNHANDLED: 523, // generic exception during onCreate/onJoin\n MATCHMAKE_EXPIRED: 524, // generic exception during onCreate/onJoin\n AUTH_FAILED: 525,\n APPLICATION_ERROR: 526,\n\n INVALID_PAYLOAD: 4217,\n} as const;\nexport type ErrorCode = typeof ErrorCode[keyof typeof ErrorCode];\n\n/**\n * WebSocket close codes\n * (See https://github.com/Luka967/websocket-close-codes)\n */\nexport const CloseCode = {\n NORMAL_CLOSURE: 1000,\n GOING_AWAY: 1001,\n NO_STATUS_RECEIVED: 1005,\n ABNORMAL_CLOSURE: 1006,\n\n CONSENTED: 4000,\n SERVER_SHUTDOWN: 4001,\n WITH_ERROR: 4002,\n MAY_TRY_RECONNECT: 4010
|
|
5
|
-
"mappings": ";AAIO,IAAM,WAAW;AAAA;AAAA,EAEtB,WAAW;AAAA,EACX,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,kBAAkB;AAAA,EAClB,kBAAkB;AAAA;AAAA,EAClB,iBAAiB;AAAA,EACjB,MAAM;AACR;AAMO,IAAM,YAAY;AAAA,EACvB,sBAAsB;AAAA,EACtB,4BAA4B;AAAA,EAC5B,2BAA2B;AAAA,EAC3B,qBAAqB;AAAA;AAAA,EACrB,mBAAmB;AAAA;AAAA,EACnB,aAAa;AAAA,EACb,mBAAmB;AAAA,EAEnB,iBAAiB;AACnB;AAOO,IAAM,YAAY;AAAA,EACvB,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,oBAAoB;AAAA,EACpB,kBAAkB;AAAA,EAElB,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ,mBAAmB;AACrB;",
|
|
4
|
+
"sourcesContent": ["/**\n * Colyseus protocol codes range between 0~100\n * Use codes between 0~127 for lesser throughput (1 byte)\n */\nexport const Protocol = {\n // Room-related (10~19)\n JOIN_ROOM: 10,\n ERROR: 11,\n LEAVE_ROOM: 12,\n ROOM_DATA: 13,\n ROOM_STATE: 14,\n ROOM_STATE_PATCH: 15,\n ROOM_DATA_SCHEMA: 16, // DEPRECATED: used to send schema instances via room.send()\n ROOM_DATA_BYTES: 17,\n PING: 18,\n} as const;\nexport type Protocol = typeof Protocol[keyof typeof Protocol];\n\n/**\n * HTTP MatchMaking Error Codes\n */\nexport const ErrorCode = {\n MATCHMAKE_NO_HANDLER: 520,\n MATCHMAKE_INVALID_CRITERIA: 521,\n MATCHMAKE_INVALID_ROOM_ID: 522,\n MATCHMAKE_UNHANDLED: 523, // generic exception during onCreate/onJoin\n MATCHMAKE_EXPIRED: 524, // generic exception during onCreate/onJoin\n AUTH_FAILED: 525,\n APPLICATION_ERROR: 526,\n\n INVALID_PAYLOAD: 4217,\n} as const;\nexport type ErrorCode = typeof ErrorCode[keyof typeof ErrorCode];\n\n/**\n * WebSocket close codes\n * (See https://github.com/Luka967/websocket-close-codes)\n */\nexport const CloseCode = {\n NORMAL_CLOSURE: 1000,\n GOING_AWAY: 1001,\n NO_STATUS_RECEIVED: 1005,\n ABNORMAL_CLOSURE: 1006,\n\n CONSENTED: 4000,\n SERVER_SHUTDOWN: 4001,\n WITH_ERROR: 4002,\n FAILED_TO_RECONNECT: 4003,\n\n MAY_TRY_RECONNECT: 4010,\n} as const;\nexport type CloseCode = typeof CloseCode[keyof typeof CloseCode];\n"],
|
|
5
|
+
"mappings": ";AAIO,IAAM,WAAW;AAAA;AAAA,EAEtB,WAAW;AAAA,EACX,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,kBAAkB;AAAA,EAClB,kBAAkB;AAAA;AAAA,EAClB,iBAAiB;AAAA,EACjB,MAAM;AACR;AAMO,IAAM,YAAY;AAAA,EACvB,sBAAsB;AAAA,EACtB,4BAA4B;AAAA,EAC5B,2BAA2B;AAAA,EAC3B,qBAAqB;AAAA;AAAA,EACrB,mBAAmB;AAAA;AAAA,EACnB,aAAa;AAAA,EACb,mBAAmB;AAAA,EAEnB,iBAAiB;AACnB;AAOO,IAAM,YAAY;AAAA,EACvB,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,oBAAoB;AAAA,EACpB,kBAAkB;AAAA,EAElB,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ,qBAAqB;AAAA,EAErB,mBAAmB;AACrB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@colyseus/shared-types",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.6",
|
|
4
4
|
"description": "Shared TypeScript types for Colyseus server and client SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"input": "./src/index.ts",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"vitest": "^3.1.1",
|
|
50
|
-
"@colyseus/
|
|
51
|
-
"@colyseus/
|
|
50
|
+
"@colyseus/core": "^0.17.30",
|
|
51
|
+
"@colyseus/sdk": "^0.17.26"
|
|
52
52
|
},
|
|
53
53
|
"publishConfig": {
|
|
54
54
|
"access": "public"
|
package/src/Protocol.ts
CHANGED
|
@@ -45,6 +45,8 @@ export const CloseCode = {
|
|
|
45
45
|
CONSENTED: 4000,
|
|
46
46
|
SERVER_SHUTDOWN: 4001,
|
|
47
47
|
WITH_ERROR: 4002,
|
|
48
|
-
|
|
48
|
+
FAILED_TO_RECONNECT: 4003,
|
|
49
|
+
|
|
50
|
+
MAY_TRY_RECONNECT: 4010,
|
|
49
51
|
} as const;
|
|
50
52
|
export type CloseCode = typeof CloseCode[keyof typeof CloseCode];
|