mezon-js 2.7.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +244 -0
- package/api.gen.ts +4351 -0
- package/build.mjs +45 -0
- package/client.ts +1848 -0
- package/dist/api.gen.d.ts +735 -0
- package/dist/client.d.ts +527 -0
- package/dist/index.d.ts +24 -0
- package/dist/mezon-js.cjs.js +5204 -0
- package/dist/mezon-js.esm.mjs +5184 -0
- package/dist/session.d.ts +58 -0
- package/dist/socket.d.ts +673 -0
- package/dist/utils.d.ts +3 -0
- package/dist/web_socket_adapter.d.ts +83 -0
- package/index.ts +27 -0
- package/package.json +54 -0
- package/rollup.config.js +40 -0
- package/session.ts +114 -0
- package/socket.ts +1303 -0
- package/tsconfig.json +10 -0
- package/utils.ts +49 -0
- package/web_socket_adapter.ts +159 -0
package/build.mjs
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
// Copyright 2020 The Mezon Authors
|
2
|
+
//
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
// you may not use this file except in compliance with the License.
|
5
|
+
// You may obtain a copy of the License at
|
6
|
+
//
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
//
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
// See the License for the specific language governing permissions and
|
13
|
+
// limitations under the License.
|
14
|
+
|
15
|
+
import esbuild from 'esbuild';
|
16
|
+
|
17
|
+
// Shared esbuild config
|
18
|
+
const config = {
|
19
|
+
logLevel: 'info',
|
20
|
+
entryPoints: ['index.ts'],
|
21
|
+
bundle: true,
|
22
|
+
target: 'es6',
|
23
|
+
globalName: 'mezonjs'
|
24
|
+
};
|
25
|
+
|
26
|
+
// Build CommonJS
|
27
|
+
await esbuild.build({
|
28
|
+
...config,
|
29
|
+
format: 'cjs',
|
30
|
+
outfile: 'dist/mezon-js.cjs.js'
|
31
|
+
});
|
32
|
+
|
33
|
+
// Build ESM
|
34
|
+
await esbuild.build({
|
35
|
+
...config,
|
36
|
+
format: 'esm',
|
37
|
+
outfile: 'dist/mezon-js.esm.mjs'
|
38
|
+
});
|
39
|
+
|
40
|
+
// Build IIFE
|
41
|
+
await esbuild.build({
|
42
|
+
...config,
|
43
|
+
format: 'iife',
|
44
|
+
outfile: 'dist/mezon-js.iife.js'
|
45
|
+
});
|