# fossekall-interface

`fossekall-interface` provides TypeScript interfaces and generated `typed-binary` schemas for avionics commands and telemetry.

## Install

```bash
npm install fossekall-interface
```

## Project Structure

```text
fossekall-interface/
	scripts/
		generate-index.ts
	src/
		index.ts
		constants.ts
		types.ts
		generated/
			index.ts
			fc/
				index.ts
				commands.ts
				telemetry.ts
			ecu/
				index.ts
				commands.ts
				telemetry.ts
```

## Exports

The package root exports three namespaces:

- mcu: Generated `typed-binary` schemas from the avionics codebase
- constants: Manually added constants (e.g. IP addresses, port numbers, etc...)
- types: Utility types

## Build Pipeline

Running the build executes two steps:

1. prebuild: scripts/generate-index.ts regenerates index.ts files under
	 src/generated
2. build: TypeScript compiles src to dist

Build commands:

```bash
npm install
npm run build
```

## Package Output

Published artifacts are emitted to `.dist/`:

- JavaScript modules
- Type declarations

## Publishing

```bash
npm version patch
npm publish --access private
```

The package runs build automatically during prepack.
