From 64e9b71c6305fb949480a52747ca6c427c74bf31 Mon Sep 17 00:00:00 2001 From: Benjamin Janssens Date: Thu, 6 Jun 2024 14:34:59 +0200 Subject: [PATCH] fix: update getCredentials in CatalogImportClient; update API reports Signed-off-by: Benjamin Janssens --- packages/integration-react/api-report.md | 4 ++-- plugins/catalog-import/src/api/CatalogImportClient.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/integration-react/api-report.md b/packages/integration-react/api-report.md index c1a2e34907..9e30875e79 100644 --- a/packages/integration-react/api-report.md +++ b/packages/integration-react/api-report.md @@ -70,7 +70,7 @@ export class ScmAuth implements ScmAuthApi { }, ): ScmAuth; getCredentials(options: ScmAuthTokenOptions): Promise; - isUrlSupported(url: URL): boolean; + isHostSupported(host: string): boolean; static merge(...providers: ScmAuth[]): ScmAuthApi; } @@ -93,7 +93,7 @@ export interface ScmAuthTokenOptions extends AuthRequestOptions { gitlab?: string[]; }; }; - url: string; + host: string; } // @public diff --git a/plugins/catalog-import/src/api/CatalogImportClient.ts b/plugins/catalog-import/src/api/CatalogImportClient.ts index cecb85f9a3..32bea5d7b4 100644 --- a/plugins/catalog-import/src/api/CatalogImportClient.ts +++ b/plugins/catalog-import/src/api/CatalogImportClient.ts @@ -260,7 +260,7 @@ the component will become available.\n\nFor more information, read an \ } = options; const { token } = await this.scmAuthApi.getCredentials({ - url: repositoryUrl, + host: new URL(repositoryUrl).host, additionalScope: { repoWrite: true, },