fix: added eventsServiceFactory to defaultServiceFactories
Signed-off-by: Marley <55280588+marleypowell@users.noreply.github.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"name": "@backstage/backend-defaults",
|
||||
"version": "0.2.17",
|
||||
"description": "Backend defaults used by Backstage backend apps",
|
||||
"version": "0.2.18-next.0",
|
||||
"main": "src/index.ts",
|
||||
@@ -9,38 +10,38 @@
|
||||
"main": "dist/index.cjs.js",
|
||||
"types": "dist/index.d.ts"
|
||||
},
|
||||
"backstage": {
|
||||
"role": "node-library"
|
||||
},
|
||||
"keywords": [
|
||||
"backstage"
|
||||
],
|
||||
"homepage": "https://backstage.io",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/backstage/backstage",
|
||||
"directory": "packages/backend-defaults"
|
||||
},
|
||||
"keywords": [
|
||||
"backstage"
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "backstage-cli package build",
|
||||
"clean": "backstage-cli package clean",
|
||||
"lint": "backstage-cli package lint",
|
||||
"test": "backstage-cli package test",
|
||||
"prepack": "backstage-cli package prepack",
|
||||
"postpack": "backstage-cli package postpack",
|
||||
"clean": "backstage-cli package clean",
|
||||
"start": "backstage-cli package start"
|
||||
"start": "backstage-cli package start",
|
||||
"test": "backstage-cli package test"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/backend-app-api": "workspace:^",
|
||||
"@backstage/backend-common": "workspace:^"
|
||||
"@backstage/backend-common": "workspace:^",
|
||||
"@backstage/plugin-events-node": "workspace:^"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/backend-plugin-api": "workspace:^",
|
||||
"@backstage/backend-test-utils": "workspace:^",
|
||||
"@backstage/cli": "workspace:^"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ import {
|
||||
httpAuthServiceFactory,
|
||||
userInfoServiceFactory,
|
||||
} from '@backstage/backend-app-api';
|
||||
import { eventsServiceFactory } from '@backstage/plugin-events-node';
|
||||
|
||||
export const defaultServiceFactories = [
|
||||
authServiceFactory(),
|
||||
@@ -56,6 +57,7 @@ export const defaultServiceFactories = [
|
||||
tokenManagerServiceFactory(),
|
||||
userInfoServiceFactory(),
|
||||
urlReaderServiceFactory(),
|
||||
eventsServiceFactory(),
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
"@backstage/config": "workspace:^",
|
||||
"@backstage/errors": "workspace:^",
|
||||
"@backstage/plugin-auth-node": "workspace:^",
|
||||
"@backstage/plugin-events-node": "workspace:^",
|
||||
"@backstage/types": "workspace:^",
|
||||
"better-sqlite3": "^9.0.0",
|
||||
"cookie": "^0.6.0",
|
||||
|
||||
@@ -52,6 +52,10 @@ import { MockAuthService } from './MockAuthService';
|
||||
import { MockHttpAuthService } from './MockHttpAuthService';
|
||||
import { mockCredentials } from './mockCredentials';
|
||||
import { MockUserInfoService } from './MockUserInfoService';
|
||||
import {
|
||||
eventsServiceFactory,
|
||||
eventsServiceRef,
|
||||
} from '@backstage/plugin-events-node';
|
||||
|
||||
/** @internal */
|
||||
function simpleFactory<
|
||||
@@ -397,4 +401,12 @@ export namespace mockServices {
|
||||
search: jest.fn(),
|
||||
}));
|
||||
}
|
||||
|
||||
export namespace events {
|
||||
export const factory = eventsServiceFactory;
|
||||
export const mock = simpleMock(eventsServiceRef, () => ({
|
||||
publish: jest.fn(),
|
||||
subscribe: jest.fn(),
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,6 +83,7 @@ export const defaultServiceFactories = [
|
||||
mockServices.tokenManager.factory(),
|
||||
mockServices.userInfo.factory(),
|
||||
mockServices.urlReader.factory(),
|
||||
mockServices.events.factory(),
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user