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

This commit is contained in:
2026-05-17 02:23:44 -07:00
committed by GitHub
parent 6ca5cede3e
commit e84674e3b5
100 changed files with 13890 additions and 235 deletions
@@ -0,0 +1,66 @@
import test from 'node:test';
import assert from 'node:assert/strict';
import { isConfigSettingsPatch } from './config-settings-ipc';
import type { ConfigSettingsField } from '../../types/settings';
const fields: ConfigSettingsField[] = [
{
id: 'mpv.launchMode',
label: 'Launch mode',
description: 'Launch mode setting.',
configPath: 'mpv.launchMode',
category: 'playback-sources',
section: 'mpv launcher',
control: 'select',
defaultValue: 'windowed',
restartBehavior: 'restart',
},
];
test('isConfigSettingsPatch rejects set operations without a value property', () => {
assert.equal(
isConfigSettingsPatch(
{
operations: [{ op: 'set', path: 'mpv.launchMode' }],
},
fields,
),
false,
);
});
test('isConfigSettingsPatch accepts set operations with an explicit value', () => {
assert.equal(
isConfigSettingsPatch(
{
operations: [{ op: 'set', path: 'mpv.launchMode', value: 'fullscreen' }],
},
fields,
),
true,
);
});
test('isConfigSettingsPatch accepts reset operations without a value', () => {
assert.equal(
isConfigSettingsPatch(
{
operations: [{ op: 'reset', path: 'mpv.launchMode' }],
},
fields,
),
true,
);
});
test('isConfigSettingsPatch rejects unknown config paths', () => {
assert.equal(
isConfigSettingsPatch(
{
operations: [{ op: 'reset', path: 'unknown.path' }],
},
fields,
),
false,
);
});