refactor all the things to use coreServices
Co-authored-by: Johan Haals <johan.haals@gmail.com> Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
import mockFs from 'mock-fs';
|
||||
import { resolve as resolvePath } from 'path';
|
||||
import fetch from 'node-fetch';
|
||||
import { configServiceRef } from '@backstage/backend-plugin-api';
|
||||
import { coreServices } from '@backstage/backend-plugin-api';
|
||||
import { startTestBackend } from '@backstage/backend-test-utils';
|
||||
import { appPlugin } from './appPlugin';
|
||||
import {
|
||||
@@ -51,7 +51,7 @@ describe('appPlugin', () => {
|
||||
await startTestBackend({
|
||||
services: [
|
||||
[
|
||||
configServiceRef,
|
||||
coreServices.config,
|
||||
new ConfigReader({
|
||||
backend: {
|
||||
listen: { port },
|
||||
|
||||
@@ -16,12 +16,9 @@
|
||||
|
||||
import express from 'express';
|
||||
import {
|
||||
configServiceRef,
|
||||
coreServices,
|
||||
createBackendPlugin,
|
||||
databaseServiceRef,
|
||||
loggerServiceRef,
|
||||
loggerToWinstonLogger,
|
||||
httpRouterServiceRef,
|
||||
} from '@backstage/backend-plugin-api';
|
||||
import { createRouter } from './router';
|
||||
|
||||
@@ -78,10 +75,10 @@ export const appPlugin = createBackendPlugin({
|
||||
register(env, options: AppPluginOptions) {
|
||||
env.registerInit({
|
||||
deps: {
|
||||
logger: loggerServiceRef,
|
||||
config: configServiceRef,
|
||||
database: databaseServiceRef,
|
||||
httpRouter: httpRouterServiceRef,
|
||||
logger: coreServices.logger,
|
||||
config: coreServices.config,
|
||||
database: coreServices.database,
|
||||
httpRouter: coreServices.httpRouter,
|
||||
},
|
||||
async init({ logger, config, database, httpRouter }) {
|
||||
const {
|
||||
|
||||
Reference in New Issue
Block a user