mezon-sdk 2.7.10 → 2.7.11
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/dist/cjs/index.js +33 -0
- package/package.json +11 -18
- package/src/api.ts +0 -1
- package/src/client.ts +1 -1
- package/src/index.ts +0 -2
- package/tsconfig.esm.json +11 -0
- package/tsconfig.json +42 -10
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2020 The Nakama Authors
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
29
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
30
|
+
};
|
|
31
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
__exportStar(require("./client"), exports);
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,24 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mezon-sdk",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.11",
|
|
4
4
|
"description": "Mezon typescript SDK.",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"
|
|
5
|
+
"main": "dist/cjs/index.js",
|
|
6
|
+
"module": "dist/esm/index.js",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"build": "
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"prettier-format:default": "prettier --config .prettierrc 'src/**/*.ts' --write",
|
|
16
|
-
"prettier-watch": "run-script-os",
|
|
17
|
-
"prettier-watch:win32": "onchange \"src/**/*.ts\" -- prettier --write {{changed}}",
|
|
18
|
-
"prettier-watch:darwin:linux": "onchange 'src/**/*.ts' -- prettier --write {{changed}}",
|
|
19
|
-
"prettier-watch:default": "onchange 'src/**/*.ts' -- prettier --write {{changed}}",
|
|
20
|
-
"test": "jest",
|
|
21
|
-
"test:dev": "jest --watchAll"
|
|
8
|
+
"build": "npm-run-all -p build:*",
|
|
9
|
+
"build:cjs": "tsc -p tsconfig.json",
|
|
10
|
+
"build:esm": "tsc -p tsconfig.esm.json",
|
|
11
|
+
"format": "prettier 'src/**/*.ts' '*.js' --write",
|
|
12
|
+
"lint": "eslint src --ext .ts",
|
|
13
|
+
"lint:fix": "npm run lint -- --fix",
|
|
14
|
+
"test": "echo 'Error: no test specified' && exit 1"
|
|
22
15
|
},
|
|
23
16
|
"husky": {
|
|
24
17
|
"hooks": {
|
|
@@ -39,7 +32,6 @@
|
|
|
39
32
|
"eslint-plugin-prettier": "^4.2.1",
|
|
40
33
|
"husky": "^8.0.1",
|
|
41
34
|
"jest": "^28.1.3",
|
|
42
|
-
"node-fetch": "^3.3.2",
|
|
43
35
|
"nodemon": "^2.0.19",
|
|
44
36
|
"onchange": "^7.1.0",
|
|
45
37
|
"prettier": "^2.7.1",
|
|
@@ -52,6 +44,7 @@
|
|
|
52
44
|
"dependencies": {
|
|
53
45
|
"@types/ws": "^8.5.12",
|
|
54
46
|
"jest-cucumber": "^3.0.1",
|
|
47
|
+
"npm-run-all": "^4.1.5",
|
|
55
48
|
"ws": "^8.18.0"
|
|
56
49
|
}
|
|
57
50
|
}
|
package/src/api.ts
CHANGED
package/src/client.ts
CHANGED
|
@@ -21,7 +21,7 @@ import { ChannelCreatedEvent, ChannelDeletedEvent, ChannelUpdatedEvent, DefaultS
|
|
|
21
21
|
import { WebSocketAdapter } from "./web_socket_adapter";
|
|
22
22
|
import { WebSocketAdapterPb } from './web_socket_adapter_pb';
|
|
23
23
|
|
|
24
|
-
const DEFAULT_HOST = "
|
|
24
|
+
const DEFAULT_HOST = "mezon.vn";
|
|
25
25
|
const DEFAULT_PORT = "7305";
|
|
26
26
|
const DEFAULT_API_KEY = "defaultkey";
|
|
27
27
|
const DEFAULT_TIMEOUT_MS = 7000;
|
package/src/index.ts
CHANGED
package/tsconfig.json
CHANGED
|
@@ -1,16 +1,48 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"allowJs": true,
|
|
7
|
-
"outDir": "dist",
|
|
3
|
+
"incremental": true,
|
|
4
|
+
"target": "es2017",
|
|
5
|
+
"outDir": "dist/cjs",
|
|
8
6
|
"rootDir": "src",
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
7
|
+
"moduleResolution": "node",
|
|
8
|
+
"module": "commonjs",
|
|
9
|
+
"declaration": true,
|
|
10
|
+
"sourceMap": true,
|
|
11
|
+
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
|
|
12
|
+
"resolveJsonModule": true /* Include modules imported with .json extension. */,
|
|
13
|
+
|
|
14
|
+
"strict": true /* Enable all strict type-checking options. */,
|
|
15
|
+
|
|
16
|
+
/* Strict Type-Checking Options */
|
|
17
|
+
// "noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */,
|
|
18
|
+
// "strictNullChecks": true /* Enable strict null checks. */,
|
|
19
|
+
// "strictFunctionTypes": true /* Enable strict checking of function types. */,
|
|
20
|
+
// "strictPropertyInitialization": true /* Enable strict checking of property initialization in classes. */,
|
|
21
|
+
// "noImplicitThis": true /* Raise error on 'this' expressions with an implied 'any' type. */,
|
|
22
|
+
// "alwaysStrict": true /* Parse in strict mode and emit "use strict" for each source file. */,
|
|
23
|
+
|
|
24
|
+
/* Additional Checks */
|
|
25
|
+
"noUnusedLocals": true /* Report errors on unused locals. */,
|
|
26
|
+
"noUnusedParameters": true /* Report errors on unused parameters. */,
|
|
27
|
+
"noImplicitReturns": true /* Report error when not all code paths in function return a value. */,
|
|
28
|
+
"noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */,
|
|
29
|
+
|
|
30
|
+
/* Debugging Options */
|
|
31
|
+
"traceResolution": false /* Report module resolution log messages. */,
|
|
32
|
+
"listEmittedFiles": false /* Print names of generated files part of the compilation. */,
|
|
33
|
+
"listFiles": false /* Print names of files part of the compilation. */,
|
|
34
|
+
"pretty": true /* Stylize errors and messages using color and context. */,
|
|
35
|
+
|
|
36
|
+
/* Experimental Options */
|
|
37
|
+
// "experimentalDecorators": true /* Enables experimental support for ES7 decorators. */,
|
|
38
|
+
// "emitDecoratorMetadata": true /* Enables experimental support for emitting type metadata for decorators. */,
|
|
39
|
+
|
|
40
|
+
"lib": ["es2017"],
|
|
41
|
+
"types": ["node"],
|
|
42
|
+
"typeRoots": ["node_modules/@types", "src/types"],
|
|
12
43
|
"skipLibCheck": true
|
|
13
44
|
},
|
|
14
|
-
"include": ["src
|
|
15
|
-
"exclude": ["
|
|
45
|
+
"include": ["src/**/*.ts"],
|
|
46
|
+
"exclude": ["node_modules/**"],
|
|
47
|
+
"compileOnSave": false
|
|
16
48
|
}
|