From 4521e67fe53f878da895a975c4baa9c31dda0e1a Mon Sep 17 00:00:00 2001 From: AaronvDiepen Date: Thu, 17 Mar 2022 17:07:45 +0100 Subject: [PATCH] Fix type error for BitbucketRepositoryParser Signed-off-by: AaronvDiepen --- .../src/lib/BitbucketRepositoryParser.ts | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/plugins/catalog-backend-module-bitbucket/src/lib/BitbucketRepositoryParser.ts b/plugins/catalog-backend-module-bitbucket/src/lib/BitbucketRepositoryParser.ts index 0afaf79db3..57a162e1e4 100644 --- a/plugins/catalog-backend-module-bitbucket/src/lib/BitbucketRepositoryParser.ts +++ b/plugins/catalog-backend-module-bitbucket/src/lib/BitbucketRepositoryParser.ts @@ -34,16 +34,17 @@ export type BitbucketRepositoryParser = (options: { logger: Logger; }) => AsyncIterable; -export function* defaultRepositoryParser(options: { - target: string; - presence?: 'optional' | 'required'; -}) { - yield processingResult.location({ - type: 'url', - target: options.target, - // Not all locations may actually exist, since the user defined them as a wildcard pattern. - // Thus, we emit them as optional and let the downstream processor find them while not outputting - // an error if it couldn't. - presence: options.presence ?? 'optional', - }); -} +export const defaultRepositoryParser = + async function* defaultRepositoryParser(options: { + target: string; + presence?: 'optional' | 'required'; + }) { + yield processingResult.location({ + type: 'url', + target: options.target, + // Not all locations may actually exist, since the user defined them as a wildcard pattern. + // Thus, we emit them as optional and let the downstream processor find them while not outputting + // an error if it couldn't. + presence: options.presence ?? 'optional', + }); + };