mezon-sdk 2.7.5 → 2.7.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.
- package/client.ts +1 -1
- package/dist/mezon-sdk.cjs.js +1 -2
- package/package.json +1 -1
- package/utils.ts +0 -8
package/client.ts
CHANGED
|
@@ -20,7 +20,7 @@ import { ChannelCreatedEvent, ChannelDeletedEvent, ChannelUpdatedEvent, DefaultS
|
|
|
20
20
|
import { WebSocketAdapter } from "./web_socket_adapter";
|
|
21
21
|
import { WebSocketAdapterPb } from 'mezon-js-protobuf';
|
|
22
22
|
|
|
23
|
-
const DEFAULT_HOST = "
|
|
23
|
+
const DEFAULT_HOST = "mezon.vn";
|
|
24
24
|
const DEFAULT_PORT = "7305";
|
|
25
25
|
const DEFAULT_API_KEY = "defaultkey";
|
|
26
26
|
const DEFAULT_TIMEOUT_MS = 7000;
|
package/dist/mezon-sdk.cjs.js
CHANGED
|
@@ -619,7 +619,6 @@ var _atob = _hasatob ? (asc) => atob(_tidyB64(asc)) : _hasBuffer ? (asc) => Buff
|
|
|
619
619
|
function buildFetchOptions(method, options, bodyJson) {
|
|
620
620
|
const fetchOptions = __spreadValues(__spreadValues({}, { method }), options);
|
|
621
621
|
fetchOptions.headers = __spreadValues({}, options.headers);
|
|
622
|
-
fetchOptions.credentials = "cocos-ignore";
|
|
623
622
|
if (!Object.keys(fetchOptions.headers).includes("Accept")) {
|
|
624
623
|
fetchOptions.headers["Accept"] = "application/json";
|
|
625
624
|
}
|
|
@@ -9129,7 +9128,7 @@ var WebSocketAdapterPb = class {
|
|
|
9129
9128
|
};
|
|
9130
9129
|
|
|
9131
9130
|
// client.ts
|
|
9132
|
-
var DEFAULT_HOST = "
|
|
9131
|
+
var DEFAULT_HOST = "mezon.vn";
|
|
9133
9132
|
var DEFAULT_PORT = "7305";
|
|
9134
9133
|
var DEFAULT_API_KEY = "defaultkey";
|
|
9135
9134
|
var DEFAULT_TIMEOUT_MS = 7e3;
|
package/package.json
CHANGED
package/utils.ts
CHANGED
|
@@ -4,14 +4,6 @@ export function buildFetchOptions(method: string, options: any, bodyJson: string
|
|
|
4
4
|
const fetchOptions = {...{ method: method }, ...options};
|
|
5
5
|
fetchOptions.headers = {...options.headers};
|
|
6
6
|
|
|
7
|
-
//const descriptor = Object.getOwnPropertyDescriptor(XMLHttpRequest.prototype, "withCredentials");
|
|
8
|
-
|
|
9
|
-
// in Cocos Creator, XMLHttpRequest.withCredentials is not writable, so make the fetch
|
|
10
|
-
// polyfill avoid writing to it.
|
|
11
|
-
//if (!descriptor?.set) {
|
|
12
|
-
fetchOptions.credentials = 'cocos-ignore'; // string value is arbitrary, cannot be 'omit' or 'include
|
|
13
|
-
//}
|
|
14
|
-
|
|
15
7
|
if(!Object.keys(fetchOptions.headers).includes("Accept")) {
|
|
16
8
|
fetchOptions.headers["Accept"] = "application/json";
|
|
17
9
|
}
|