@colyseus/sdk 0.17.13 → 0.17.14
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/3rd_party/discord.cjs +1 -1
- package/build/3rd_party/discord.mjs +1 -1
- package/build/Auth.cjs +1 -1
- package/build/Auth.mjs +1 -1
- package/build/Client.cjs +3 -2
- package/build/Client.cjs.map +1 -1
- package/build/Client.d.ts +1 -1
- package/build/Client.mjs +3 -2
- package/build/Client.mjs.map +1 -1
- package/build/Connection.cjs +1 -1
- package/build/Connection.mjs +1 -1
- package/build/HTTP.cjs +1 -1
- package/build/HTTP.mjs +1 -1
- package/build/Protocol.cjs +1 -1
- package/build/Protocol.mjs +1 -1
- package/build/Room.cjs +7 -7
- package/build/Room.cjs.map +1 -1
- package/build/Room.mjs +2 -2
- package/build/Room.mjs.map +1 -1
- package/build/Storage.cjs +1 -1
- package/build/Storage.mjs +1 -1
- package/build/core/nanoevents.cjs +1 -1
- package/build/core/nanoevents.mjs +1 -1
- package/build/core/signal.cjs +1 -1
- package/build/core/signal.mjs +1 -1
- package/build/core/utils.cjs +1 -1
- package/build/core/utils.mjs +1 -1
- package/build/debug.cjs +1 -1
- package/build/debug.mjs +1 -1
- package/build/errors/Errors.cjs +1 -12
- package/build/errors/Errors.cjs.map +1 -1
- package/build/errors/Errors.d.ts +0 -10
- package/build/errors/Errors.mjs +2 -13
- package/build/errors/Errors.mjs.map +1 -1
- package/build/index.cjs +11 -11
- package/build/index.cjs.map +1 -1
- package/build/index.d.ts +2 -2
- package/build/index.mjs +3 -3
- package/build/index.mjs.map +1 -1
- package/build/legacy.cjs +1 -1
- package/build/legacy.mjs +1 -1
- package/build/serializer/NoneSerializer.cjs +1 -1
- package/build/serializer/NoneSerializer.mjs +1 -1
- package/build/serializer/SchemaSerializer.cjs +1 -1
- package/build/serializer/SchemaSerializer.mjs +1 -1
- package/build/serializer/Serializer.cjs +1 -1
- package/build/serializer/Serializer.mjs +1 -1
- package/build/transport/H3Transport.cjs +1 -1
- package/build/transport/H3Transport.mjs +1 -1
- package/build/transport/WebSocketTransport.cjs +1 -1
- package/build/transport/WebSocketTransport.mjs +1 -1
- package/dist/colyseus-cocos-creator.js +67 -38
- package/dist/colyseus-cocos-creator.js.map +1 -1
- package/dist/colyseus.js +67 -38
- package/dist/colyseus.js.map +1 -1
- package/dist/debug.js +9 -20
- package/dist/debug.js.map +1 -1
- package/package.json +3 -3
- package/src/Client.ts +2 -2
- package/src/Room.ts +1 -2
- package/src/errors/Errors.ts +0 -11
- package/src/index.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@colyseus/sdk",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.14",
|
|
4
4
|
"description": "Colyseus Multiplayer SDK for JavaScript/TypeScript",
|
|
5
5
|
"author": "Endel Dreyer",
|
|
6
6
|
"license": "MIT",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@colyseus/schema": "^4.0.1",
|
|
56
56
|
"tslib": "^2.1.0",
|
|
57
57
|
"ws": "^8.13.0",
|
|
58
|
-
"@colyseus/shared-types": "^0.17.
|
|
58
|
+
"@colyseus/shared-types": "^0.17.1",
|
|
59
59
|
"@colyseus/better-call": "^1.0.26"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"typescript": "^5.9.3",
|
|
83
83
|
"vite": "^5.0.11",
|
|
84
84
|
"vitest": "^2.1.1",
|
|
85
|
-
"@colyseus/core": "^0.17.
|
|
85
|
+
"@colyseus/core": "^0.17.11"
|
|
86
86
|
},
|
|
87
87
|
"peerDependencies": {
|
|
88
88
|
"@colyseus/core": "0.17.x"
|
package/src/Client.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { CloseCode, type SDKTypes, type ServerRoomLike, type ISeatReservation } from '@colyseus/shared-types';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { ServerError } from './errors/Errors.ts';
|
|
4
4
|
import { Room } from './Room.ts';
|
|
5
5
|
import { SchemaConstructor } from './serializer/SchemaSerializer.ts';
|
|
6
6
|
import { HTTP } from './HTTP.ts';
|
package/src/Room.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type InferState, type ExtractRoomMessages, type ExtractRoomClientMessages, type ExtractMessageType } from '@colyseus/shared-types';
|
|
1
|
+
import { CloseCode, type InferState, type ExtractRoomMessages, type ExtractRoomClientMessages, type ExtractMessageType } from '@colyseus/shared-types';
|
|
2
2
|
import { decode, encode, Iterator, Schema } from '@colyseus/schema';
|
|
3
3
|
|
|
4
4
|
import { Packr, unpack } from '@colyseus/msgpackr';
|
|
@@ -14,7 +14,6 @@ import { createSignal } from './core/signal.ts';
|
|
|
14
14
|
|
|
15
15
|
import { SchemaConstructor, SchemaSerializer } from './serializer/SchemaSerializer.ts';
|
|
16
16
|
|
|
17
|
-
import { CloseCode } from './errors/Errors.ts';
|
|
18
17
|
import { now } from './core/utils.ts';
|
|
19
18
|
|
|
20
19
|
// Infer serializer type based on State: SchemaSerializer for Schema types, Serializer otherwise
|
package/src/errors/Errors.ts
CHANGED
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
export enum CloseCode {
|
|
2
|
-
NORMAL_CLOSURE = 1000,
|
|
3
|
-
GOING_AWAY = 1001,
|
|
4
|
-
NO_STATUS_RECEIVED = 1005,
|
|
5
|
-
ABNORMAL_CLOSURE = 1006,
|
|
6
|
-
|
|
7
|
-
CONSENTED = 4000,
|
|
8
|
-
SERVER_SHUTDOWN = 4001,
|
|
9
|
-
WITH_ERROR = 4002,
|
|
10
|
-
DEVMODE_RESTART = 4010
|
|
11
|
-
}
|
|
12
1
|
|
|
13
2
|
export class ServerError extends Error {
|
|
14
3
|
public code: number;
|
package/src/index.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import './legacy';
|
|
2
2
|
|
|
3
3
|
export { ColyseusSDK, Client, MatchMakeError, type JoinOptions, type EndpointSettings, type ClientOptions, type ISeatReservation as SeatReservation } from './Client.ts';
|
|
4
|
-
export { Protocol, ErrorCode } from './Protocol.ts';
|
|
5
4
|
export { Room, type RoomAvailable } from './Room.ts';
|
|
6
5
|
export { Auth, type AuthSettings, type PopupSettings, type AuthResponse, type UserDataResponse, type ForgotPasswordResponse, type AuthData } from "./Auth.ts";
|
|
7
|
-
export { ServerError
|
|
6
|
+
export { ServerError } from './errors/Errors.ts';
|
|
7
|
+
export { CloseCode, ErrorCode, Protocol } from '@colyseus/shared-types'; // convenience re-export / backwards compatibility
|
|
8
8
|
export type { InferRoomConstructor } from './core/utils.ts';
|
|
9
9
|
|
|
10
10
|
/*
|