@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/core-app-api': patch
|
||||
---
|
||||
|
||||
Handle URLs as the first argument to `fetchApi`, when using the `plugin:` protocol
|
||||
+8
-1
@@ -55,7 +55,14 @@ export class PluginProtocolResolverFetchMiddleware implements FetchMiddleware {
|
||||
}
|
||||
|
||||
const target = `${join(base, pathname)}${search}${hash}`;
|
||||
return next(target, typeof input === 'string' ? init : input);
|
||||
return next(
|
||||
target,
|
||||
typeof input === 'string' || isUrl(input) ? init : input,
|
||||
);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function isUrl(a: unknown): a is URL {
|
||||
return typeof a === 'object' && a?.constructor === URL;
|
||||
}
|
||||
|
||||
@@ -73,12 +73,10 @@ export class Generators implements GeneratorBuilder {
|
||||
export const getDocFilesFromRepository: (
|
||||
reader: UrlReader,
|
||||
entity: Entity,
|
||||
opts?:
|
||||
| {
|
||||
etag?: string | undefined;
|
||||
logger?: Logger | undefined;
|
||||
}
|
||||
| undefined,
|
||||
opts?: {
|
||||
etag?: string;
|
||||
logger?: Logger;
|
||||
},
|
||||
) => Promise<PreparerResponse>;
|
||||
|
||||
// @public
|
||||
|
||||
Reference in New Issue
Block a user