Refactor to not need core-app-api

Signed-off-by: Karan Shah <karan.shah@simplybusiness.co.uk>
This commit is contained in:
Karan Shah
2022-02-21 15:38:07 +00:00
parent f62ce97a15
commit 96e8c9fd59
2 changed files with 6 additions and 6 deletions
-1
View File
@@ -25,7 +25,6 @@
"dependencies": {
"@backstage/catalog-model": "^0.10.0",
"@backstage/core-components": "^0.8.9",
"@backstage/core-app-api": "^0.5.3",
"@backstage/core-plugin-api": "^0.6.1",
"@backstage/dev-utils": "^0.2.22",
"@backstage/plugin-catalog-react": "^0.6.15",
@@ -13,9 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { DiscoveryApi } from '@backstage/core-plugin-api';
import { UrlPatternDiscovery } from '@backstage/core-app-api';
export const localDiscoveryApi = UrlPatternDiscovery.compile(
'http://localhost:7007/api/{{ pluginId }}',
);
export const localDiscoveryApi: DiscoveryApi = {
async getBaseUrl(pluginId: string): Promise<string> {
return `http://localhost:7007/api/${pluginId}`;
},
};