rename sourcePath to routePath
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/frontend-app-api': patch
|
||||
---
|
||||
|
||||
Renaming the `getNodesByRoutePath` parameter from `sourcePath` to `routePath`
|
||||
@@ -128,10 +128,10 @@ class AppTreeApiProxy implements AppTreeApi {
|
||||
return { tree: this.tree };
|
||||
}
|
||||
|
||||
getNodesByRoutePath(sourcePath: string): { nodes: AppNode[] } {
|
||||
getNodesByRoutePath(routePath: string): { nodes: AppNode[] } {
|
||||
this.checkIfInitialized();
|
||||
|
||||
let path = sourcePath;
|
||||
let path = routePath;
|
||||
if (path.startsWith(this.appBasePath)) {
|
||||
path = path.slice(this.appBasePath.length);
|
||||
}
|
||||
|
||||
@@ -332,7 +332,7 @@ export interface AppTree {
|
||||
|
||||
// @public
|
||||
export interface AppTreeApi {
|
||||
getNodesByRoutePath(sourcePath: string): {
|
||||
getNodesByRoutePath(routePath: string): {
|
||||
nodes: AppNode[];
|
||||
};
|
||||
getTree(): {
|
||||
|
||||
@@ -113,7 +113,7 @@ export interface AppTreeApi {
|
||||
/**
|
||||
* Get all nodes in the app that are mounted at a given route path.
|
||||
*/
|
||||
getNodesByRoutePath(sourcePath: string): { nodes: AppNode[] };
|
||||
getNodesByRoutePath(routePath: string): { nodes: AppNode[] };
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user