config: device: Add filters for explicit dependency files

This commit is contained in:
Danny Lin 2021-12-13 19:29:00 -08:00
parent 9f149d2136
commit 5725430c9a

View file

@ -47,6 +47,7 @@ export interface DeviceConfig {
partitions: Filters
presigned: Filters
sepolicy_dirs: Filters
dep_files: Filters
files: Filters
}
}
@ -59,6 +60,11 @@ const EMPTY_FILTERS = {
suffix: [],
regex: [],
} as SerializedFilters
// Same, but defaults to inclusion list
const EMPTY_INCLUDE_FILTERS = {
...structuredClone(EMPTY_FILTERS),
mode: FilterMode.Include,
} as SerializedFilters
const DEFAULT_CONFIG_BASE = {
platform: {
@ -83,11 +89,9 @@ const DEFAULT_CONFIG_BASE = {
overlays: structuredClone(EMPTY_FILTERS),
overlay_files: structuredClone(EMPTY_FILTERS),
partitions: structuredClone(EMPTY_FILTERS),
presigned: {
...structuredClone(EMPTY_FILTERS),
mode: FilterMode.Include,
},
presigned: structuredClone(EMPTY_INCLUDE_FILTERS),
sepolicy_dirs: structuredClone(EMPTY_FILTERS),
dep_files: structuredClone(EMPTY_INCLUDE_FILTERS),
files: structuredClone(EMPTY_FILTERS),
},
}