fix(natives): validate macOS appearance native exports
This commit is contained in:
@@ -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(", ")}. ` +
|
||||
|
||||
Reference in New Issue
Block a user