Remove deprecated UrlReaders and update usages

Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
Johan Haals
2024-08-14 15:59:16 +02:00
parent 4648c300aa
commit 38f3827e5a
48 changed files with 122 additions and 331 deletions
@@ -18,7 +18,7 @@ jest.mock('fs-extra');
import fs from 'fs-extra';
import { resolve as resolvePath } from 'path';
import { UrlReader } from '@backstage/backend-common';
import { UrlReaderService } from '@backstage/backend-plugin-api';
import { ConfigReader } from '@backstage/config';
import { ScmIntegrations } from '@backstage/integration';
import { fetchContents, fetchFile } from './fetch';
@@ -39,7 +39,7 @@ describe('fetchContents helper', () => {
const readUrl = jest.fn();
const readTree = jest.fn();
const reader: UrlReader = {
const reader: UrlReaderService = {
readUrl,
readTree,
search: jest.fn(),
+3 -3
View File
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { UrlReader } from '@backstage/backend-common';
import { UrlReaderService } from '@backstage/backend-plugin-api';
import { resolveSafeChildPath } from '@backstage/backend-plugin-api';
import { InputError } from '@backstage/errors';
import { ScmIntegrations } from '@backstage/integration';
@@ -28,7 +28,7 @@ import path from 'path';
* @public
*/
export async function fetchContents(options: {
reader: UrlReader;
reader: UrlReaderService;
integrations: ScmIntegrations;
baseUrl?: string;
fetchUrl?: string;
@@ -67,7 +67,7 @@ export async function fetchContents(options: {
* @public
*/
export async function fetchFile(options: {
reader: UrlReader;
reader: UrlReaderService;
integrations: ScmIntegrations;
baseUrl?: string;
fetchUrl?: string;