fleethub-core 0.7.3 → 0.8.0
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 +69 -0
- package/package.json +3 -8
- package/{node/fh_core.d.ts → pkg/fleethub_core.d.ts} +13 -13
- package/pkg/fleethub_core.js +2 -0
- package/pkg/{fh_core_bg.js → fleethub_core_bg.js} +262 -149
- package/pkg/fleethub_core_bg.wasm +0 -0
- package/pkg/{fh_core_bg.wasm.d.ts → fleethub_core_bg.wasm.d.ts} +132 -126
- package/node/fh_core.js +0 -3383
- package/node/fh_core_bg.wasm +0 -0
- package/node/fh_core_bg.wasm.d.ts +0 -338
- package/pkg/fh_core.d.ts +0 -1120
- package/pkg/fh_core.js +0 -2
- package/pkg/fh_core_bg.wasm +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<h1><code>wasm-pack-template</code></h1>
|
|
4
|
+
|
|
5
|
+
<strong>A template for kick starting a Rust and WebAssembly project using <a href="https://github.com/rustwasm/wasm-pack">wasm-pack</a>.</strong>
|
|
6
|
+
|
|
7
|
+
<p>
|
|
8
|
+
<a href="https://travis-ci.org/rustwasm/wasm-pack-template"><img src="https://img.shields.io/travis/rustwasm/wasm-pack-template.svg?style=flat-square" alt="Build Status" /></a>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<h3>
|
|
12
|
+
<a href="https://rustwasm.github.io/docs/wasm-pack/tutorials/npm-browser-packages/index.html">Tutorial</a>
|
|
13
|
+
<span> | </span>
|
|
14
|
+
<a href="https://discordapp.com/channels/442252698964721669/443151097398296587">Chat</a>
|
|
15
|
+
</h3>
|
|
16
|
+
|
|
17
|
+
<sub>Built with 🦀🕸 by <a href="https://rustwasm.github.io/">The Rust and WebAssembly Working Group</a></sub>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
## About
|
|
21
|
+
|
|
22
|
+
[**📚 Read this template tutorial! 📚**][template-docs]
|
|
23
|
+
|
|
24
|
+
This template is designed for compiling Rust libraries into WebAssembly and
|
|
25
|
+
publishing the resulting package to NPM.
|
|
26
|
+
|
|
27
|
+
Be sure to check out [other `wasm-pack` tutorials online][tutorials] for other
|
|
28
|
+
templates and usages of `wasm-pack`.
|
|
29
|
+
|
|
30
|
+
[tutorials]: https://rustwasm.github.io/docs/wasm-pack/tutorials/index.html
|
|
31
|
+
[template-docs]: https://rustwasm.github.io/docs/wasm-pack/tutorials/npm-browser-packages/index.html
|
|
32
|
+
|
|
33
|
+
## 🚴 Usage
|
|
34
|
+
|
|
35
|
+
### 🐑 Use `cargo generate` to Clone this Template
|
|
36
|
+
|
|
37
|
+
[Learn more about `cargo generate` here.](https://github.com/ashleygwilliams/cargo-generate)
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
cargo generate --git https://github.com/rustwasm/wasm-pack-template.git --name my-project
|
|
41
|
+
cd my-project
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 🛠️ Build with `wasm-pack build`
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
wasm-pack build
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### 🔬 Test in Headless Browsers with `wasm-pack test`
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
wasm-pack test --headless --firefox
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### 🎁 Publish to NPM with `wasm-pack publish`
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
wasm-pack publish
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## 🔋 Batteries Included
|
|
63
|
+
|
|
64
|
+
* [`wasm-bindgen`](https://github.com/rustwasm/wasm-bindgen) for communicating
|
|
65
|
+
between WebAssembly and JavaScript.
|
|
66
|
+
* [`console_error_panic_hook`](https://github.com/rustwasm/console_error_panic_hook)
|
|
67
|
+
for logging panic messages to the developer console.
|
|
68
|
+
* [`wee_alloc`](https://github.com/rustwasm/wee_alloc), an allocator optimized
|
|
69
|
+
for small code size.
|
package/package.json
CHANGED
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fleethub-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"sideEffects": false,
|
|
6
|
-
"exports":
|
|
7
|
-
|
|
8
|
-
"node": "./node/fh_core.js"
|
|
9
|
-
},
|
|
10
|
-
"main": "./node/fh_core.js",
|
|
11
|
-
"types": "pkg/fh_core.d.ts",
|
|
6
|
+
"exports": "./pkg/fleethub_core.js",
|
|
7
|
+
"types": "pkg/fleethub_core.d.ts",
|
|
12
8
|
"files": [
|
|
13
9
|
"pkg",
|
|
14
|
-
"node",
|
|
15
10
|
"bindings.d.ts"
|
|
16
11
|
],
|
|
17
12
|
"collaborators": [
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
-
*/
|
|
5
|
-
export function set_panic_hook(): void;
|
|
6
|
-
/**
|
|
7
4
|
* @param {Gear} gear
|
|
8
5
|
* @returns {boolean}
|
|
9
6
|
*/
|
|
10
7
|
export function air_squadron_can_equip(gear: Gear): boolean;
|
|
11
8
|
/**
|
|
9
|
+
*/
|
|
10
|
+
export function set_panic_hook(): void;
|
|
11
|
+
/**
|
|
12
12
|
* @param {bindings.OrgType} org_type
|
|
13
13
|
* @returns {boolean}
|
|
14
14
|
*/
|
|
@@ -77,9 +77,8 @@ export class AirSquadron {
|
|
|
77
77
|
*/
|
|
78
78
|
mode: bindings.AirSquadronMode;
|
|
79
79
|
/**
|
|
80
|
-
* @returns {string}
|
|
81
80
|
*/
|
|
82
|
-
|
|
81
|
+
xxh3: BigInt;
|
|
83
82
|
}
|
|
84
83
|
/**
|
|
85
84
|
*/
|
|
@@ -370,9 +369,8 @@ export class Fleet {
|
|
|
370
369
|
*/
|
|
371
370
|
len: number;
|
|
372
371
|
/**
|
|
373
|
-
* @returns {string}
|
|
374
372
|
*/
|
|
375
|
-
|
|
373
|
+
xxh3: BigInt;
|
|
376
374
|
}
|
|
377
375
|
/**
|
|
378
376
|
*/
|
|
@@ -578,9 +576,8 @@ export class Gear {
|
|
|
578
576
|
*/
|
|
579
577
|
readonly types: any;
|
|
580
578
|
/**
|
|
581
|
-
* @returns {string}
|
|
582
579
|
*/
|
|
583
|
-
|
|
580
|
+
xxh3: BigInt;
|
|
584
581
|
}
|
|
585
582
|
/**
|
|
586
583
|
*/
|
|
@@ -765,9 +762,8 @@ export class Org {
|
|
|
765
762
|
*/
|
|
766
763
|
sortie: string;
|
|
767
764
|
/**
|
|
768
|
-
* @returns {string}
|
|
769
765
|
*/
|
|
770
|
-
|
|
766
|
+
xxh3: BigInt;
|
|
771
767
|
}
|
|
772
768
|
/**
|
|
773
769
|
*/
|
|
@@ -926,6 +922,11 @@ export class Ship {
|
|
|
926
922
|
*/
|
|
927
923
|
cruiser_fit_bonus(): number;
|
|
928
924
|
/**
|
|
925
|
+
* @param {boolean} is_night
|
|
926
|
+
* @returns {number}
|
|
927
|
+
*/
|
|
928
|
+
fit_gun_bonus(is_night: boolean): number;
|
|
929
|
+
/**
|
|
929
930
|
* @returns {number | undefined}
|
|
930
931
|
*/
|
|
931
932
|
basic_accuracy_term(): number | undefined;
|
|
@@ -1110,9 +1111,8 @@ export class Ship {
|
|
|
1110
1111
|
*/
|
|
1111
1112
|
readonly useful: boolean;
|
|
1112
1113
|
/**
|
|
1113
|
-
* @returns {string}
|
|
1114
1114
|
*/
|
|
1115
|
-
|
|
1115
|
+
xxh3: BigInt;
|
|
1116
1116
|
/**
|
|
1117
1117
|
* @returns {string}
|
|
1118
1118
|
*/
|