Fix type error for BitbucketRepositoryParser
Signed-off-by: AaronvDiepen <aaronvdiepen@gmail.com>
This commit is contained in:
@@ -34,16 +34,17 @@ export type BitbucketRepositoryParser = (options: {
|
||||
logger: Logger;
|
||||
}) => AsyncIterable<CatalogProcessorResult>;
|
||||
|
||||
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',
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user