Extract instance-owned civil-flight components

This commit is contained in:
Sameh Khamis committed 2026-09-13 09:50:14 -07:00
1 parent cf149ecfc0
commit 7c7e83c9e3
33 files changed
+6190 -5284

No files matched your search

+3 -2
View File
@@ -1,3 +1,4 @@
import { readLayerSource } from '../testSupport/readLayerSource.mjs';
import assert from 'node:assert/strict';
import fs from 'node:fs';
import test from 'node:test';
@@ -24,10 +25,10 @@ function sweepLayerParamKeys() {
const dataDir = new URL('../data/', import.meta.url);
for (const entry of fs.readdirSync(dataDir)) {
if (!entry.endsWith('.js')) continue;
const source = fs.readFileSync(new URL(entry, dataDir), 'utf8');
const source = readLayerSource(new URL(entry, dataDir));
// Every getParams() in this codebase is a plain object return; take the
// body up to its closing brace and read the keys it publishes.
const body = source.match(/\n {2}getParams\(\)\s*\{[\s\S]*?\n {2}\},/);
const body = source.match(/\n\s+getParams\(\)\s*\{[\s\S]*?\n\s+\},/);
if (!body) continue;
// A key always follows `{` or `,` — which matches both the multi-line
// returns and the single-line `return { passive: … }` form, while a