Skip to content

readConfigDirSource

readConfigDirSource(options): Promise<ConfigDirSource[]>

Defined in: cli/datapad/src/read-config-dir-source/read-config-dir-source.ts:13

readConfigSource for the area files of a config directory (.holocron/<area>.<ext>) that live somewhere other than the local disk: for each name in options.areas, probes the extensions in priority order through options.fetch and keeps the first file that exists. Areas with no file are left out, so a repo with no directory returns []. Write the result with writeConfigDir and read it back with loadConfigDir.

This reads only the named areas. A caller that lists the whole directory (and so also gets the files an area imports) passes that tree to writeConfigDir directly.

ReadConfigDirSourceOptions

Promise<ConfigDirSource[]>