feat(macos): configuration window + curl-backed macOS updater (#71)

This commit is contained in:
sudacode authored and GitHub committed 2026-05-17 02:23:44 -07:00
1 parent 6ca5cede3e
commit e84674e3b5
100 files changed
+13890 -235

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
import type { ConfigSettingsField, ConfigSettingsPatch } from '../../types/settings';
export function isConfigSettingsPatch(
value: unknown,
fields: readonly ConfigSettingsField[],
): value is ConfigSettingsPatch {
if (!value || typeof value !== 'object') {
return false;
}
const operations = (value as { operations?: unknown }).operations;
return (
Array.isArray(operations) &&
operations.every((operation) => {
if (!operation || typeof operation !== 'object') {
return false;
}
const candidate = operation as { op?: unknown; path?: unknown; value?: unknown };
const knownPath =
typeof candidate.path === 'string' &&
fields.some((field) => field.configPath === candidate.path);
if (!knownPath) {
return false;
}
if (candidate.op === 'set') {
return 'value' in candidate;
}
return candidate.op === 'reset';
})
);
}