haxball.js 4.0.0 → 4.0.2
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/README.md +13 -11
- package/package.json +15 -9
package/README.md
CHANGED
|
@@ -27,10 +27,22 @@
|
|
|
27
27
|
npm install haxball.js
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
+
#### CommonJS Module Usage Example
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
const HaxballJS = require('haxball.js').default;
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
#### ESM Module Usage Example
|
|
37
|
+
|
|
38
|
+
```js
|
|
39
|
+
import HaxballJS from 'haxball.js';
|
|
40
|
+
```
|
|
41
|
+
|
|
30
42
|
#### Module Usage Example
|
|
31
43
|
|
|
32
44
|
```js
|
|
33
|
-
|
|
45
|
+
import HaxballJS from 'haxball.js';
|
|
34
46
|
|
|
35
47
|
HaxballJS().then((HBInit) => {
|
|
36
48
|
// Same as in Haxball Headless Host Documentation
|
|
@@ -93,16 +105,6 @@ HaxballJS({ proxy: "http://1.1.1.1:80", }).then((HBInit) => {...});
|
|
|
93
105
|
|
|
94
106
|
```
|
|
95
107
|
|
|
96
|
-
### 💻 TypeScript
|
|
97
|
-
|
|
98
|
-
#### TypeScript Example
|
|
99
|
-
|
|
100
|
-
```js
|
|
101
|
-
import HaxballJS from 'haxball.js';
|
|
102
|
-
|
|
103
|
-
HaxballJS().then((HBInit) => {...});
|
|
104
|
-
```
|
|
105
|
-
|
|
106
108
|
#### 💻 Bun
|
|
107
109
|
|
|
108
110
|
It's highly experimental and risky to use it in a production environment, but `haxball.js` is compatible with [Bun.JS](https://bun.sh/).
|
package/package.json
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "haxball.js",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"author": "mertushka",
|
|
5
5
|
"description": "A powerful library for interacting with the Haxball Headless API",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"haxball",
|
|
8
|
+
"headless",
|
|
9
|
+
"bot",
|
|
10
|
+
"room"
|
|
11
|
+
],
|
|
6
12
|
"homepage": "https://github.com/mertushka/haxball.js#readme",
|
|
7
13
|
"bugs": {
|
|
8
14
|
"url": "https://github.com/mertushka/haxball.js/issues"
|
|
@@ -18,7 +24,7 @@
|
|
|
18
24
|
"scripts": {
|
|
19
25
|
"build": "bunup --format esm,cjs --minify --silent",
|
|
20
26
|
"dev": "bunup --watch",
|
|
21
|
-
"
|
|
27
|
+
"prepare": "bun simple-git-hooks",
|
|
22
28
|
"lint": "biome check .",
|
|
23
29
|
"lint:fix": "biome check --write .",
|
|
24
30
|
"release": "bumpp --commit --push --tag",
|
|
@@ -46,26 +52,26 @@
|
|
|
46
52
|
}
|
|
47
53
|
},
|
|
48
54
|
"type": "module",
|
|
55
|
+
"main": "./dist/index.cjs",
|
|
56
|
+
"module": "./dist/index.js",
|
|
57
|
+
"types": "./dist/index.d.ts",
|
|
49
58
|
"exports": {
|
|
50
59
|
".": {
|
|
51
|
-
"import":
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
60
|
+
"import": "./dist/index.js",
|
|
61
|
+
"require": "./dist/index.cjs",
|
|
62
|
+
"types": "./dist/index.d.ts"
|
|
55
63
|
},
|
|
56
64
|
"./package.json": "./package.json"
|
|
57
65
|
},
|
|
58
|
-
"module": "./dist/index.js",
|
|
59
66
|
"simple-git-hooks": {
|
|
60
67
|
"pre-commit": "bun run lint && bun run type-check"
|
|
61
68
|
},
|
|
62
|
-
"types": "./dist/index.d.ts",
|
|
63
69
|
"dependencies": {
|
|
64
70
|
"@peculiar/webcrypto": "^1.5.0",
|
|
65
71
|
"@types/haxball-headless-browser": "^0.5.0",
|
|
66
72
|
"https-proxy-agent": "^7.0.6",
|
|
67
73
|
"json5": "^2.2.3",
|
|
68
|
-
"node-datachannel": "^0.
|
|
74
|
+
"node-datachannel": "^0.32.0",
|
|
69
75
|
"pako": "^2.1.0",
|
|
70
76
|
"ws": "^8.18.3",
|
|
71
77
|
"xhr2": "^0.2.1"
|