diff --git a/.changeset/lemon-ways-lay.md b/.changeset/lemon-ways-lay.md new file mode 100644 index 0000000000..725e57c141 --- /dev/null +++ b/.changeset/lemon-ways-lay.md @@ -0,0 +1,5 @@ +--- +'@backstage/frontend-app-api': patch +--- + +Renaming the `getNodesByRoutePath` parameter from `sourcePath` to `routePath` diff --git a/packages/frontend-app-api/src/wiring/createSpecializedApp.tsx b/packages/frontend-app-api/src/wiring/createSpecializedApp.tsx index 575aa76c50..e5c565f117 100644 --- a/packages/frontend-app-api/src/wiring/createSpecializedApp.tsx +++ b/packages/frontend-app-api/src/wiring/createSpecializedApp.tsx @@ -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); } diff --git a/packages/frontend-plugin-api/report.api.md b/packages/frontend-plugin-api/report.api.md index d0bb500319..9c56943589 100644 --- a/packages/frontend-plugin-api/report.api.md +++ b/packages/frontend-plugin-api/report.api.md @@ -332,7 +332,7 @@ export interface AppTree { // @public export interface AppTreeApi { - getNodesByRoutePath(sourcePath: string): { + getNodesByRoutePath(routePath: string): { nodes: AppNode[]; }; getTree(): { diff --git a/packages/frontend-plugin-api/src/apis/definitions/AppTreeApi.ts b/packages/frontend-plugin-api/src/apis/definitions/AppTreeApi.ts index c205790aae..3ce55e1525 100644 --- a/packages/frontend-plugin-api/src/apis/definitions/AppTreeApi.ts +++ b/packages/frontend-plugin-api/src/apis/definitions/AppTreeApi.ts @@ -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[] }; } /**