Skip to content

feat(aircraft): replace TS configs with JSON, publish separately - #15

Merged
nabeelio merged 3 commits into
mainfrom
ci/bunny-v8-path
Aug 11, 2026
Merged

feat(aircraft): replace TS configs with JSON, publish separately#15
nabeelio merged 3 commits into
mainfrom
ci/bunny-v8-path

Conversation

@nabeelio

Copy link
Copy Markdown
Member

The 36 per-aircraft TypeScript classes become JSON feature documents, and they stop travelling inside the scripts zip. Pairs with nabeelio/acars#240 and phpvms/acars-plugin#19.

  • Coverage was verified 1:1 before deleting anything: every class had a JSON equivalent and every JSON had a class, no orphans either way. src/interface/aircraft.ts goes with them since only those files imported it. defs.ts and types/ stay, because src/rules/ imports them independently.
  • buildAircraftConfigsTask bundles the documents into artifacts/aircraft.json, kept outside dist/ so buildZipTask doesn't sweep it into the zip.
  • distribute.yml publishes that to configs/aircraft-<version>.json plus a -latest alias. Version is the tag without the v, or the last five of the sha. The client fetches it from the acars.aircraft_config_url Replane key, so the aircraft library updates without rebuilding or redownloading everything else.
  • The bundle is a flat map of filename to contents, i.e. the directory serialized. The client writes each entry straight back out, so neither side needs a schema, and _default_flaps rides along despite being a bare array rather than a config document.
  • README's aircraft section is rewritten for the JSON format. The old one documented the AircraftConfig class that no longer exists.
  • Includes the earlier unpushed ci(release): publish under scripts/v8/ commit, since the workflow change here builds directly on it.

npm run build from clean produces the bundle with all 36 documents, and dist/ carries no aircraft JSON.

@nabeelio
nabeelio marked this pull request as ready for review August 11, 2026 18:39
The 36 per-aircraft TypeScript classes become JSON feature documents,
evaluated by the features engine instead of compiled. Coverage was
verified 1:1 before deleting: every class had a JSON equivalent and vice
versa. src/interface/aircraft.ts goes with them since nothing else
imported it; defs.ts and types/ stay because src/rules/ uses them.

The documents no longer travel in the scripts zip. buildAircraftConfigsTask
bundles them into artifacts/aircraft.json, kept outside dist/ so the zip
task does not sweep it in, and distribute.yml publishes it to
configs/aircraft-<version>.json plus a -latest alias. Version is the tag
without the v, or the last five of the sha. The client fetches it from
the acars.aircraft_config_url Replane key, so the aircraft library can be
updated without rebuilding or redownloading everything else.

The bundle is a flat map of filename to contents, i.e. the directory
serialized, so the client writes each entry straight back out and neither
side needs a richer schema. That also carries _default_flaps, which is a
bare array rather than a config document, with no special case.

README's aircraft section is rewritten for the JSON format.
# Conflicts:
#	.github/workflows/distribute.yml
@nabeelio
nabeelio merged commit 20a8152 into main Aug 11, 2026
3 checks passed
@nabeelio
nabeelio deleted the ci/bunny-v8-path branch August 11, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant