From 5cb15b7370927cf081c0bbacf0c869f00e19679d Mon Sep 17 00:00:00 2001 From: Lucas De Souza Date: Mon, 28 Nov 2022 12:19:21 -0600 Subject: [PATCH] prettier Co-authored-by: Zeky Abubaker Signed-off-by: Lucas De Souza --- .../src/ingestion/CatalogRules.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/plugins/catalog-backend/src/ingestion/CatalogRules.ts b/plugins/catalog-backend/src/ingestion/CatalogRules.ts index d4eda1db7e..3428eeaabc 100644 --- a/plugins/catalog-backend/src/ingestion/CatalogRules.ts +++ b/plugins/catalog-backend/src/ingestion/CatalogRules.ts @@ -97,13 +97,15 @@ export class DefaultCatalogRulesEnforcer implements CatalogRulesEnforcer { const globalRules = config .getConfigArray('catalog.rules') .map(ruleConf => ({ - allow: ruleConf.getStringArray('allow').map(kind => ({ kind })), - locations: ruleConf.getOptionalConfigArray('locations')?.map(locationConfig => ({ + allow: ruleConf.getStringArray('allow').map(kind => ({ kind })), + locations: ruleConf + .getOptionalConfigArray('locations') + ?.map(locationConfig => ({ match: locationConfig.getOptionalString('match'), type: locationConfig.getString('type'), - target: locationConfig.getOptionalString('target') - })) - })); + target: locationConfig.getOptionalString('target'), + })), + })); rules.push(...globalRules); } else { rules.push(...DefaultCatalogRulesEnforcer.defaultRules); @@ -166,7 +168,10 @@ export class DefaultCatalogRulesEnforcer implements CatalogRulesEnforcer { if (matcher.target && matcher.target !== location?.target) { continue; } - if (matcher.match && !minimatch(location?.target, matcher.match, { nocase: true })) { + if ( + matcher.match && + !minimatch(location?.target, matcher.match, { nocase: true }) + ) { continue; } return true;