diff --git a/src/config/device.ts b/src/config/device.ts new file mode 100644 index 0000000..eb2370b --- /dev/null +++ b/src/config/device.ts @@ -0,0 +1,18 @@ +import * as YAML from 'yaml' + +export interface DeviceInfo { + name: string + vendor: string +} + +export interface DeviceConfig { + device: DeviceInfo + namespaces?: Array + sepolicy_dirs: Array + includes: Array + filters: { [name: string]: Array } +} + +export function parseDeviceConfig(config: string) { + return YAML.parse(config) as DeviceConfig +}