backend-plugin-api: fix feature loader description

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2024-08-05 09:53:54 +02:00
parent 8f70547ea5
commit dc0d284419
2 changed files with 22 additions and 1 deletions
@@ -16,6 +16,7 @@
import { ServiceRef } from '../services';
import { BackendFeature } from '../types';
import { describeParentCallSite } from './describeParentCallSite';
import { InternalBackendFeatureLoader } from './types';
/**
@@ -47,7 +48,7 @@ export function createBackendFeatureLoader<
$$type: '@backstage/BackendFeature',
version: 'v1',
featureType: 'loader',
description: `created at '${new Date().toISOString()}'`,
description: `created at '${describeParentCallSite()}'`,
deps: options.deps,
async loader(deps: TDeps) {
const it = await options.loader(deps);
@@ -0,0 +1,20 @@
/*
* Copyright 2023 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Single re-export to avoid doing this import in multiple places, but still
// avoid duplicate declarations because this one is a bit tricky.
// eslint-disable-next-line @backstage/no-relative-monorepo-imports
export { describeParentCallSite } from '../../../frontend-plugin-api/src/routing/describeParentCallSite';