async function pathsArrayFromCollectionName(
  name,
  collectionType = 'search-target',
  eCfg = undefined,
  cwd = process.cwd(),
) {
  let collection;
  if (collectionType === 'search-target') {
    collection = eCfg?.searchTargetCollections;
  } else if (collectionType === 'reference') {
    collection = eCfg?.referenceCollections;
  }
  if (collection?.[name]) {
    return pathsArrayFromCs(collection[name].join(','), cwd);
  }
  return undefined;
}
@param {string} name collection name found in eCfg
@param {'search-target'|'reference'} collectionType collection type
@param {{searchTargetCollections: {[repo:string]:string[]}; referenceCollections:{[repo:string]:string[]}}} [eCfg] external configuration. Usually providence.conf.js
@param {string} [cwd]
@returns {Promise<string[]|undefined>}