mezon-js 2.7.1 → 2.7.3

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -3,17 +3,17 @@ Mezon JavaScript client
3
3
 
4
4
  > JavaScript client for Mezon server written in TypeScript. For browser and React Native projects.
5
5
 
6
- [Mezon](https://github.com/heroiclabs/mezon) is an open-source server designed to power modern games and apps. Features include user accounts, chat, social, matchmaker, realtime multiplayer, and much [more](https://heroiclabs.com).
6
+ [Mezon](https://github.com/heroiclabs/mezon) is an open-source server designed to power modern games and apps. Features include user accounts, chat, social, matchmaker, realtime multiplayer, and much [more](https://mezon.vn).
7
7
 
8
8
  This client implements the full API and socket options with the server. It's written in TypeScript with minimal dependencies to be compatible with all modern browsers and React Native.
9
9
 
10
- Full documentation is online - https://heroiclabs.com/docs/javascript-client-guide
10
+ Full documentation is online - https://mezon.vn/docs/javascript-client-guide
11
11
 
12
12
  ## Getting Started
13
13
 
14
14
  You'll need to setup the server and database before you can connect with the client. The simplest way is to use Docker but have a look at the [server documentation](https://github.com/heroiclabs/mezon#getting-started) for other options.
15
15
 
16
- 1. Install and run the servers. Follow these [instructions](https://heroiclabs.com/docs/install-docker-quickstart).
16
+ 1. Install and run the servers. Follow these [instructions](https://mezon.vn/docs/install-docker-quickstart).
17
17
 
18
18
  2. Import the client into your project. It's [available on NPM](https://www.npmjs.com/package/@mezon/mezon-js) and can be also be added to a project with Bower or other package managers.
19
19
 
@@ -44,7 +44,7 @@ The client object has many methods to execute various features in the server or
44
44
 
45
45
  ### Authenticate
46
46
 
47
- There's a variety of ways to [authenticate](https://heroiclabs.com/docs/authentication) with the server. Authentication can create a user if they don't already exist with those credentials. It's also easy to authenticate with a social profile from Google Play Games, Facebook, Game Center, etc.
47
+ There's a variety of ways to [authenticate](https://mezon.vn/docs/authentication) with the server. Authentication can create a user if they don't already exist with those credentials. It's also easy to authenticate with a social profile from Google Play Games, Facebook, Game Center, etc.
48
48
 
49
49
  ```js
50
50
  var email = "super@heroes.com";
@@ -171,7 +171,7 @@ try {
171
171
 
172
172
  ## Contribute
173
173
 
174
- The development roadmap is managed as GitHub issues and pull requests are welcome. If you're interested in enhancing the code please open an issue to discuss the changes or drop in and discuss it in the [community forum](https://forum.heroiclabs.com).
174
+ The development roadmap is managed as GitHub issues and pull requests are welcome. If you're interested in enhancing the code please open an issue to discuss the changes or drop in and discuss it in the [community forum](https://forum.mezon.vn).
175
175
 
176
176
  ### Source Builds
177
177
 
@@ -189,7 +189,7 @@ npm run build --workspace=@mezon/mezon-js
189
189
 
190
190
  ### Run Tests
191
191
 
192
- To run tests you will need to run the server and database. Most tests are written as integration tests which execute against the server. A quick approach we use with our test workflow is to use the Docker compose file described in the [documentation](https://heroiclabs.com/docs/install-docker-quickstart).
192
+ To run tests you will need to run the server and database. Most tests are written as integration tests which execute against the server. A quick approach we use with our test workflow is to use the Docker compose file described in the [documentation](https://mezon.vn/docs/install-docker-quickstart).
193
193
 
194
194
  Tests are run against each workspace bundle; if you have made source code changes, you should `npm run build --workspace=<workspace>` prior to running tests.
195
195
 
@@ -241,4 +241,4 @@ npm install && npm run docs
241
241
 
242
242
  ### License
243
243
 
244
- This project is licensed under the [Apache-2 License](https://github.com/heroiclabs/mezon-js/blob/master/LICENSE).
244
+ This project is licensed under the [Apache-2 License](https://github.com/nccasia/mezon-js/blob/master/LICENSE).
package/client.ts CHANGED
@@ -1567,11 +1567,11 @@ export class Client {
1567
1567
  }
1568
1568
 
1569
1569
  if (session.created && session.expires_at! - session.created_at < 70) {
1570
- console.warn("Session lifetime too short, please set '--session.token_expiry_sec' option. See the documentation for more info: https://heroiclabs.com/docs/mezon/getting-started/configuration/#session");
1570
+ console.warn("Session lifetime too short, please set '--session.token_expiry_sec' option. See the documentation for more info: https://mezon.vn/docs/mezon/getting-started/configuration/#session");
1571
1571
  }
1572
1572
 
1573
1573
  if (session.created && session.refresh_expires_at! - session.created_at < 3700) {
1574
- console.warn("Session refresh lifetime too short, please set '--session.refresh_token_expiry_sec' option. See the documentation for more info: https://heroiclabs.com/docs/mezon/getting-started/configuration/#session");
1574
+ console.warn("Session refresh lifetime too short, please set '--session.refresh_token_expiry_sec' option. See the documentation for more info: https://mezon.vn/docs/mezon/getting-started/configuration/#session");
1575
1575
  }
1576
1576
 
1577
1577
  const apiSession = await this.apiClient.sessionRefresh(this.serverkey, "", {token: session.refresh_token, vars: vars});
@@ -4952,10 +4952,10 @@ var Client = class {
4952
4952
  return session;
4953
4953
  }
4954
4954
  if (session.created && session.expires_at - session.created_at < 70) {
4955
- console.warn("Session lifetime too short, please set '--session.token_expiry_sec' option. See the documentation for more info: https://heroiclabs.com/docs/mezon/getting-started/configuration/#session");
4955
+ console.warn("Session lifetime too short, please set '--session.token_expiry_sec' option. See the documentation for more info: https://mezon.vn/docs/mezon/getting-started/configuration/#session");
4956
4956
  }
4957
4957
  if (session.created && session.refresh_expires_at - session.created_at < 3700) {
4958
- console.warn("Session refresh lifetime too short, please set '--session.refresh_token_expiry_sec' option. See the documentation for more info: https://heroiclabs.com/docs/mezon/getting-started/configuration/#session");
4958
+ console.warn("Session refresh lifetime too short, please set '--session.refresh_token_expiry_sec' option. See the documentation for more info: https://mezon.vn/docs/mezon/getting-started/configuration/#session");
4959
4959
  }
4960
4960
  const apiSession = yield this.apiClient.sessionRefresh(this.serverkey, "", { token: session.refresh_token, vars });
4961
4961
  session.update(apiSession.token, apiSession.refresh_token);
@@ -4924,10 +4924,10 @@ var Client = class {
4924
4924
  return session;
4925
4925
  }
4926
4926
  if (session.created && session.expires_at - session.created_at < 70) {
4927
- console.warn("Session lifetime too short, please set '--session.token_expiry_sec' option. See the documentation for more info: https://heroiclabs.com/docs/mezon/getting-started/configuration/#session");
4927
+ console.warn("Session lifetime too short, please set '--session.token_expiry_sec' option. See the documentation for more info: https://mezon.vn/docs/mezon/getting-started/configuration/#session");
4928
4928
  }
4929
4929
  if (session.created && session.refresh_expires_at - session.created_at < 3700) {
4930
- console.warn("Session refresh lifetime too short, please set '--session.refresh_token_expiry_sec' option. See the documentation for more info: https://heroiclabs.com/docs/mezon/getting-started/configuration/#session");
4930
+ console.warn("Session refresh lifetime too short, please set '--session.refresh_token_expiry_sec' option. See the documentation for more info: https://mezon.vn/docs/mezon/getting-started/configuration/#session");
4931
4931
  }
4932
4932
  const apiSession = yield this.apiClient.sessionRefresh(this.serverkey, "", { token: session.refresh_token, vars });
4933
4933
  session.update(apiSession.token, apiSession.refresh_token);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js",
3
- "version": "2.7.1",
3
+ "version": "2.7.3",
4
4
  "scripts": {
5
5
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
6
6
  },
@@ -26,17 +26,12 @@
26
26
  ],
27
27
  "repository": {
28
28
  "type": "git",
29
- "url": "git+https://github.com/heroiclabs/mezon-js.git"
29
+ "url": "git+https://github.com/nccasia/mezon-js.git"
30
30
  },
31
- "homepage": "https://heroiclabs.com",
31
+ "homepage": "https://mezon.vn",
32
32
  "bugs": {
33
- "url": "https://github.com/heroiclabs/mezon-js/issues"
33
+ "url": "https://github.com/nccasia/mezon-js/issues"
34
34
  },
35
- "author": "Chris Molozian <chris@heroiclabs.com>",
36
- "contributors": [
37
- "Andrei Mihu <andrei@heroiclabs.com>",
38
- "Mo Firouz <mo@heroiclabs.com>"
39
- ],
40
35
  "license": "Apache-2.0",
41
36
  "dependencies": {
42
37
  "@scarf/scarf": "^1.1.1",