chore: wiring up the catalog 📕
Co-authored-by: Fredrik Adelöw <freben@gmail.com> Co-authored-by: Johan Haals <johan.haals@gmail.com> Co-authored-by: Patrik Oldsberg <poldsberg@gmail.com> Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
@@ -37,10 +37,12 @@
|
||||
"@backstage/config": "^1.0.1",
|
||||
"@backstage/backend-common": "^0.14.0",
|
||||
"@backstage/plugin-permission-common": "^0.6.2",
|
||||
"@backstage/backend-tasks": "^0.3.2"
|
||||
"@backstage/backend-tasks": "^0.3.2",
|
||||
"express": "^4.17.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.17.2-next.0"
|
||||
"@backstage/cli": "^0.17.2-next.0",
|
||||
"@types/express": "^4.17.6"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
|
||||
@@ -15,11 +15,30 @@
|
||||
*/
|
||||
|
||||
import { createServiceRef } from '../system/types';
|
||||
import { Handler } from 'express';
|
||||
|
||||
export interface HttpRouterApi {
|
||||
get(path: string): void;
|
||||
// const apiRouter = Router();
|
||||
// apiRouter.use('/catalog', await catalog(catalogEnv));
|
||||
// const service = createServiceBuilder(module)
|
||||
// .loadConfig(config)
|
||||
// .addRouter('', await healthcheck(healthcheckEnv))
|
||||
// .addRouter('', metricsHandler())
|
||||
// .addRouter('/api', apiRouter)
|
||||
// .addRouter('', await app(appEnv));
|
||||
|
||||
// interface BackstageRequest extends Request {
|
||||
// identity?: BackstageIdentity;
|
||||
// context?: Context;
|
||||
// }
|
||||
|
||||
// interface RequestIdentityService {
|
||||
// getRequestIdentity(req: Request): BackstageIdentity | undefined;
|
||||
// }
|
||||
|
||||
export interface HttpRouterService {
|
||||
use(handler: Handler): void;
|
||||
}
|
||||
|
||||
export const httpRouterServiceRef = createServiceRef<HttpRouterApi>({
|
||||
export const httpRouterServiceRef = createServiceRef<HttpRouterService>({
|
||||
id: 'core.httpRouter',
|
||||
});
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
export { configServiceRef } from './configServiceRef';
|
||||
export { httpRouterServiceRef } from './httpRouterServiceRef';
|
||||
export type { HttpRouterApi } from './httpRouterServiceRef';
|
||||
export type { HttpRouterService } from './httpRouterServiceRef';
|
||||
export { loggerServiceRef } from './loggerServiceRef';
|
||||
export type { Logger } from './loggerServiceRef';
|
||||
export { urlReaderServiceRef } from './urlReaderServiceRef';
|
||||
|
||||
Reference in New Issue
Block a user