Remove deprecated UrlReaders and update usages
Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
@@ -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(),
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user