adevtool/src/config/device.ts
2021-11-09 21:49:24 -08:00

22 lines
461 B
TypeScript

import * as YAML from 'yaml'
import { PropFilters } from '../blobs/props'
export interface DeviceInfo {
name: string
vendor: string
}
export interface DeviceConfig {
device: DeviceInfo
namespaces?: Array<string>
sepolicy_dirs: Array<string>
prop_filters?: PropFilters
includes: Array<string>
file_filters: { [name: string]: Array<string> }
}
export function parseDeviceConfig(config: string) {
return YAML.parse(config) as DeviceConfig
}