thrustcurve-db 3.0.4 → 3.0.6

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 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.js`](https://github.com/broofa/thrustcurve-db/blob/main/build/build.js) script in this repository.
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,6 +1,6 @@
1
1
  {
2
2
  "name": "thrustcurve-db",
3
- "version": "3.0.4",
3
+ "version": "3.0.6",
4
4
  "type": "module",
5
5
  "description": "ThrustCurve.org model rocket motor and thrust curve data as a single JSON file",
6
6
  "exports": {
@@ -15,7 +15,8 @@
15
15
  "thrustcurve-db.d.ts"
16
16
  ],
17
17
  "scripts": {
18
- "prepare": "build/build.js > thrustcurve-db.json",
18
+ "build": "build/build.ts > thrustcurve-db.json",
19
+ "prepublishOnly": "npm run build",
19
20
  "test": "echo \"no tests\" && exit 1"
20
21
  },
21
22
  "repository": {
@@ -39,9 +40,10 @@
39
40
  },
40
41
  "homepage": "https://github.com/broofa/thrustcurve-db#readme",
41
42
  "devDependencies": {
43
+ "@types/node": "24.10.1",
42
44
  "ansi": "0.3.1",
43
- "axios": "0.21.1",
44
- "cheerio": "1.0.0-rc.10",
45
- "cli-spinners": "2.6.0"
45
+ "axios": "1.16.1",
46
+ "cheerio": "1.2.0",
47
+ "cli-spinners": "3.4.0"
46
48
  }
47
49
  }
@@ -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: string;
34
+ infoUrl?: string;
33
35
  length: number;
34
36
  manufacturer: string;
35
37
  manufacturerAbbrev: string;
36
- maxThrustN: number;
38
+ maxThrustN?: number;
37
39
  motorId: string;
38
- propInfo: string;
39
- propWeightG: number;
40
+ propInfo?: string;
41
+ propWeightG?: number;
40
42
  samples?: TCSample[];
43
+ source_url: string;
41
44
  sparky?: boolean;
42
45
  totImpulseNs: number;
43
- totalWeightG: number;
46
+ totalWeightG?: number;
44
47
  type: 'SU' | 'hybrid' | 'reload';
45
48
  updatedOn: string;
46
49
  };