thrustcurve-db 3.0.5 → 4.0.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 +5 -5
- package/package.json +6 -5
- package/thrustcurve-db.d.ts +8 -5
- package/thrustcurve-db.json +1074 -1074
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
This module is a rebundling of the model rocket motor data available on John Coker's excellent [thrustcurve.org](https://thrustcurve.org) website ("TC") as a stand-alone JSON file. The data is an array of motor items consistent with TC's [`SearchResponse#results` schema](https://app.swaggerhub.com/apis/JCSW7/thrust-curve_org_api/1.0.3#/SearchResponse).
|
|
4
4
|
|
|
5
|
-
See also, the included [TypeScript definitions](https://github.com/broofa/thrustcurve-db/blob/main/thrustcurve.d.ts).
|
|
5
|
+
See also, the included [TypeScript definitions](https://github.com/broofa/thrustcurve-db/blob/main/thrustcurve-db.d.ts).
|
|
6
6
|
|
|
7
7
|
### Alterations
|
|
8
8
|
|
|
@@ -12,7 +12,7 @@ In addition to the `SearchResponse` data, the following alterations have been ma
|
|
|
12
12
|
- Most (but not all) motors include a `samples` array containing the thrust data found in the TC `/api/vi/download` endpoint.
|
|
13
13
|
- `samples` data is normalized to insure the first data point is always `[0, 0]`
|
|
14
14
|
|
|
15
|
-
For full details of how this data set is compiled, please refer to the [`build/build.
|
|
15
|
+
For full details of how this data set is compiled, please refer to the [`build/build.ts`](https://github.com/broofa/thrustcurve-db/blob/main/build/build.ts) script in this repository.
|
|
16
16
|
|
|
17
17
|
## Installation
|
|
18
18
|
|
|
@@ -41,15 +41,15 @@ Note: Users running `node` may need to supply the [`--experimental-json-modules`
|
|
|
41
41
|
|
|
42
42
|
```js
|
|
43
43
|
const MOTORS = await fetch(
|
|
44
|
-
'https://cdn.jsdelivr.net/npm/thrustcurve-db@latest/thrustcurve-db.json'
|
|
45
|
-
).then(res => res.json());
|
|
44
|
+
'https://cdn.jsdelivr.net/npm/thrustcurve-db@latest/thrustcurve-db.json',
|
|
45
|
+
).then((res) => res.json());
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
## Example
|
|
49
49
|
|
|
50
50
|
```js
|
|
51
51
|
// Find all J motors currently in production
|
|
52
|
-
MOTORS.filter(m => m.availability === 'regular' && m.impulseClass === 'J');
|
|
52
|
+
MOTORS.filter((m) => m.availability === 'regular' && m.impulseClass === 'J');
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
## Issues & Contributions
|
package/package.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "thrustcurve-db",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "ThrustCurve.org model rocket motor and thrust curve data as a single JSON file",
|
|
6
6
|
"exports": {
|
|
7
7
|
"import": "./index.js",
|
|
8
|
-
"
|
|
8
|
+
"types": "./thrustcurve-db.d.ts"
|
|
9
9
|
},
|
|
10
|
-
"types": "thrustcurve-db.d.ts",
|
|
10
|
+
"types": "./thrustcurve-db.d.ts",
|
|
11
11
|
"files": [
|
|
12
12
|
"index.js",
|
|
13
|
-
"util.js",
|
|
14
13
|
"thrustcurve-db.json",
|
|
15
14
|
"thrustcurve-db.d.ts"
|
|
16
15
|
],
|
|
17
16
|
"scripts": {
|
|
18
|
-
"
|
|
17
|
+
"build": "build/build.ts > thrustcurve-db.json",
|
|
18
|
+
"prepublishOnly": "npm run build",
|
|
19
19
|
"test": "echo \"no tests\" && exit 1"
|
|
20
20
|
},
|
|
21
21
|
"repository": {
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"homepage": "https://github.com/broofa/thrustcurve-db#readme",
|
|
41
41
|
"devDependencies": {
|
|
42
|
+
"@types/node": "24.10.1",
|
|
42
43
|
"ansi": "0.3.1",
|
|
43
44
|
"axios": "1.16.1",
|
|
44
45
|
"cheerio": "1.2.0",
|
package/thrustcurve-db.d.ts
CHANGED
|
@@ -7,9 +7,11 @@ export declare type TCMotor = {
|
|
|
7
7
|
availability: 'regular' | 'OOP';
|
|
8
8
|
avgThrustN: number;
|
|
9
9
|
burnTimeS: number;
|
|
10
|
+
caseInfo?: string;
|
|
10
11
|
certOrg: string;
|
|
11
12
|
commonName: string;
|
|
12
13
|
dataFiles: number;
|
|
14
|
+
delayAdjustable?: boolean;
|
|
13
15
|
delays: string;
|
|
14
16
|
designation: string;
|
|
15
17
|
diameter: number;
|
|
@@ -29,18 +31,19 @@ export declare type TCMotor = {
|
|
|
29
31
|
| 'M'
|
|
30
32
|
| 'N'
|
|
31
33
|
| 'O';
|
|
32
|
-
infoUrl
|
|
34
|
+
infoUrl?: string;
|
|
33
35
|
length: number;
|
|
34
36
|
manufacturer: string;
|
|
35
37
|
manufacturerAbbrev: string;
|
|
36
|
-
maxThrustN
|
|
38
|
+
maxThrustN?: number;
|
|
37
39
|
motorId: string;
|
|
38
|
-
propInfo
|
|
39
|
-
propWeightG
|
|
40
|
+
propInfo?: string;
|
|
41
|
+
propWeightG?: number;
|
|
40
42
|
samples?: TCSample[];
|
|
43
|
+
source_url: string;
|
|
41
44
|
sparky?: boolean;
|
|
42
45
|
totImpulseNs: number;
|
|
43
|
-
totalWeightG
|
|
46
|
+
totalWeightG?: number;
|
|
44
47
|
type: 'SU' | 'hybrid' | 'reload';
|
|
45
48
|
updatedOn: string;
|
|
46
49
|
};
|