@colyseus/sdk 0.17.8 → 0.17.10
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 +1 -1
- package/build/Client.cjs.map +1 -1
- package/build/Client.d.ts +7 -6
- package/build/Client.mjs +1 -1
- package/build/Client.mjs.map +1 -1
- package/build/Connection.cjs +1 -1
- package/build/Connection.mjs +1 -1
- package/build/HTTP.cjs +17 -2
- package/build/HTTP.cjs.map +1 -1
- package/build/HTTP.d.ts +3 -0
- package/build/HTTP.mjs +17 -2
- package/build/HTTP.mjs.map +1 -1
- package/build/Protocol.cjs +1 -1
- package/build/Protocol.mjs +1 -1
- package/build/Room.cjs +1 -1
- package/build/Room.mjs +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.cjs.map +1 -1
- package/build/core/utils.d.ts +11 -0
- package/build/core/utils.mjs +1 -1
- package/build/core/utils.mjs.map +1 -1
- package/build/errors/Errors.cjs +1 -1
- package/build/errors/Errors.mjs +1 -1
- package/build/index.cjs +1 -1
- package/build/index.cjs.map +1 -1
- package/build/index.d.ts +1 -0
- package/build/index.mjs +1 -1
- 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 +16 -2
- package/dist/colyseus-cocos-creator.js.map +1 -1
- package/dist/colyseus.js +16 -2
- package/dist/colyseus.js.map +1 -1
- package/dist/debug.js +1 -1
- package/package.json +1 -1
- package/src/Client.ts +21 -20
- package/src/HTTP.ts +18 -1
- package/src/core/utils.ts +18 -1
- package/src/index.ts +1 -0
package/dist/colyseus.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// This software is released under the MIT License.
|
|
4
4
|
// https://opensource.org/license/MIT
|
|
5
5
|
//
|
|
6
|
-
// colyseus.js@0.17.
|
|
6
|
+
// colyseus.js@0.17.10 - @colyseus/schema 4.0.1
|
|
7
7
|
(function (global, factory) {
|
|
8
8
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
9
9
|
typeof define === 'function' && define.amd ? define('@colyseus/sdk', ['exports'], factory) :
|
|
@@ -8917,6 +8917,7 @@
|
|
|
8917
8917
|
}
|
|
8918
8918
|
executeRequest(method, path, requestOptions) {
|
|
8919
8919
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8920
|
+
var _a;
|
|
8920
8921
|
//
|
|
8921
8922
|
// FIXME: if FormData is provided, merging "baseOptions.body" with
|
|
8922
8923
|
// "options.body" will not work as intended
|
|
@@ -8951,7 +8952,20 @@
|
|
|
8951
8952
|
body,
|
|
8952
8953
|
method });
|
|
8953
8954
|
const url = getURLWithQueryParams(this.sdk['getHttpEndpoint'](path.toString()), mergedOptions);
|
|
8954
|
-
|
|
8955
|
+
let response;
|
|
8956
|
+
try {
|
|
8957
|
+
response = yield fetch(url, mergedOptions);
|
|
8958
|
+
}
|
|
8959
|
+
catch (err) {
|
|
8960
|
+
// If it's an AbortError, re-throw as-is
|
|
8961
|
+
if (err.name === 'AbortError') {
|
|
8962
|
+
throw err;
|
|
8963
|
+
}
|
|
8964
|
+
// Re-throw with network error code at top level (e.g. ECONNREFUSED)
|
|
8965
|
+
const networkError = new ServerError(((_a = err.cause) === null || _a === void 0 ? void 0 : _a.code) || err.code, err.message);
|
|
8966
|
+
networkError.cause = err.cause;
|
|
8967
|
+
throw networkError;
|
|
8968
|
+
}
|
|
8955
8969
|
const contentType = response.headers.get("content-type");
|
|
8956
8970
|
let data;
|
|
8957
8971
|
let error = null;
|