Commit Graph

2 Commits

Author SHA1 Message Date
znetsixe
f21e2aa8bb P11.3 + P11.4: BaseNodeAdapter query.units + wikiGen Unit column
P11.3 BaseNodeAdapter auto-wires query.units:
  Implicit query.units topic registered if subclass commands don't
  already declare one. Returns {node, units: {topic → {measure,
  default, accepted: [...]}}} via convert.possibilities. Subclass
  query.units overrides. 17/17 tests; BaseNodeAdapter.js 211 lines.

P11.4 wikiGen Unit column:
  Auto-generated topic-contract table grows a Unit column showing
  `<measure> (default <unit>)` for topics with units, '—' otherwise.
  Effect column now uses descriptor.description when present (P11.2
  field), falls back to generic per-prefix sentence. wikiGen.js 303
  → 315 lines. WIKI_TEMPLATE.md §5 sample updated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 17:33:26 +02:00
znetsixe
62f389a51f Phase 1 wave 3 + barrel: BaseNodeAdapter + index.js exports
- src/nodered/BaseNodeAdapter.js — base class for every nodeClass.js
  Lifecycle: config build → domain instantiate → child.register on
  Port 2 → tick (opt-in) or 'output-changed' subscription (default
  event-driven) → status updater → input dispatch via commandRegistry →
  close handler with clean teardown.
- index.js — additive exports of all Phase 1 modules:
  UnitPolicy, ChildRouter, LatestWinsGate, HealthStatus, BaseDomain,
  statusBadge, StatusUpdater, createRegistry, CommandRegistry,
  BaseNodeAdapter, stats. Existing exports unchanged.

113 unit tests pass under node:test.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-10 18:59:50 +02:00