fix(natives): validate macOS appearance native exports

This commit is contained in:
can1357
2026-02-28 12:17:10 +01:00
parent c34a2c01e4
commit c8f4c0d1cf
+3
View File
@@ -11,6 +11,7 @@ import { $env, getNativesDir, logger } from "@oh-my-pi/pi-utils";
import packageJson from "../package.json";
import type { NativeBindings } from "./bindings";
import { embeddedAddon } from "./embedded-addon";
import "./appearance/types";
import "./ast/types";
import "./clipboard/types";
import "./glob/types";
@@ -270,6 +271,8 @@ function validateNative(bindings: NativeBindings, source: string): void {
checkFn("invalidateFsScanCache");
checkFn("astFind");
checkFn("astReplace");
checkFn("detectMacOSAppearance");
checkFn("MacAppearanceObserver");
if (missing.length) {
throw new Error(
`Native addon missing exports (${source}). Missing: ${missing.join(", ")}. ` +