fossekall-interface 0.1.1 → 0.1.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 +91 -0
- package/package.json +3 -2
package/README.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# fossekall-interface
|
|
2
|
+
|
|
3
|
+
`fossekall-interface` provides generated TypeScript interfaces/schemas for
|
|
4
|
+
Fossekall data objects.
|
|
5
|
+
|
|
6
|
+
Current package exports are telemetry schemas and types from `ecu/telemetry`.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install fossekall-interface
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
Import from the package root:
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
import {
|
|
20
|
+
STATE_NAME,
|
|
21
|
+
BLDCTelemetry,
|
|
22
|
+
type BLDCTelemetry as BLDCTelemetryType,
|
|
23
|
+
FsmTelemetry,
|
|
24
|
+
type FsmTelemetry as FsmTelemetryType,
|
|
25
|
+
SawWaveTelemetry,
|
|
26
|
+
type SawWaveTelemetry as SawWaveTelemetryType,
|
|
27
|
+
} from "fossekall-interface";
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
`index.ts` currently re-exports:
|
|
31
|
+
|
|
32
|
+
- `./ecu/telemetry`
|
|
33
|
+
|
|
34
|
+
### Current Generated API
|
|
35
|
+
|
|
36
|
+
- `STATE_NAME`
|
|
37
|
+
- `type STATE_NAME`
|
|
38
|
+
- `BLDCTelemetry`
|
|
39
|
+
- `type BLDCTelemetry`
|
|
40
|
+
- `FsmTelemetry`
|
|
41
|
+
- `type FsmTelemetry`
|
|
42
|
+
- `SawWaveTelemetry`
|
|
43
|
+
- `type SawWaveTelemetry`
|
|
44
|
+
|
|
45
|
+
## What Gets Published
|
|
46
|
+
|
|
47
|
+
Only the compiled output in `dist/` is published to npm.
|
|
48
|
+
|
|
49
|
+
This package ships:
|
|
50
|
+
|
|
51
|
+
- JavaScript (`dist/**/*.js`)
|
|
52
|
+
- Type declarations (`dist/**/*.d.ts`)
|
|
53
|
+
|
|
54
|
+
## Source Layout
|
|
55
|
+
|
|
56
|
+
- `index.ts`: package root exports
|
|
57
|
+
- `ecu/telemetry.ts`: generated telemetry schemas/types
|
|
58
|
+
- `dist/`: compiled output used by npm consumers
|
|
59
|
+
|
|
60
|
+
## Development
|
|
61
|
+
|
|
62
|
+
Run from this directory (`generated/`):
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npm install
|
|
66
|
+
npm run build
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
The build uses `tsc` and outputs to `dist/`.
|
|
70
|
+
|
|
71
|
+
## Publishing
|
|
72
|
+
|
|
73
|
+
1. Update version:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
npm version patch
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
2. Publish:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
npm publish --access public
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
If you publish using a token, configure `.npmrc` with:
|
|
86
|
+
|
|
87
|
+
```ini
|
|
88
|
+
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
and export `NPM_TOKEN` in your shell before publishing.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fossekall-interface",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "API contracts between client and server (rocket and GUI)",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "Propulse",
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
"scripts": {
|
|
14
14
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
15
15
|
"build": "tsc -p tsconfig.json",
|
|
16
|
-
"prepack": "npm run build"
|
|
16
|
+
"prepack": "npm run build",
|
|
17
|
+
"publish": "npm publish --access private"
|
|
17
18
|
},
|
|
18
19
|
"devDependencies": {
|
|
19
20
|
"typescript": "^5.9.3"
|