plugins: refactory to use default export for new backend system
Co-authored-by: Fredrik Adelöw <freben@gmail.com> Co-authored-by: Camila Belo <camilaibs@gmail.com> Co-authored-by: Johan Haals <johan.haals@gmail.com> Co-authored-by: Philipp Hugenroth <philipph@spotify.com> Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -6,7 +6,8 @@
|
||||
import { BackendFeature } from '@backstage/backend-plugin-api';
|
||||
|
||||
// @alpha
|
||||
export const searchPlugin: () => BackendFeature;
|
||||
const _default: () => BackendFeature;
|
||||
export default _default;
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
```
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
import { startTestBackend } from '@backstage/backend-test-utils';
|
||||
import request from 'supertest';
|
||||
import { searchPlugin } from './alpha';
|
||||
import searchPlugin from './alpha';
|
||||
|
||||
describe('searchPlugin', () => {
|
||||
it('should serve search results on query endpoint', async () => {
|
||||
|
||||
@@ -75,7 +75,7 @@ class SearchEngineRegistry implements SearchEngineRegistryExtensionPoint {
|
||||
* The Search plugin is responsible for starting search indexing processes and return search results.
|
||||
* @alpha
|
||||
*/
|
||||
export const searchPlugin = createBackendPlugin({
|
||||
export default createBackendPlugin({
|
||||
pluginId: 'search',
|
||||
register(env) {
|
||||
const searchIndexRegistry = new SearchIndexRegistry();
|
||||
|
||||
Reference in New Issue
Block a user