diff --git a/.changeset/violet-eggs-repeat.md b/.changeset/violet-eggs-repeat.md new file mode 100644 index 0000000000..a52345d5ec --- /dev/null +++ b/.changeset/violet-eggs-repeat.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-tech-insights-backend': patch +'@backstage/plugin-tech-insights-backend-module-jsonfc': patch +--- + +Minor fixes in Readme to make the examples more directly usable. diff --git a/plugins/tech-insights-backend-module-jsonfc/README.md b/plugins/tech-insights-backend-module-jsonfc/README.md index c0f992ffc7..108b1c8564 100644 --- a/plugins/tech-insights-backend-module-jsonfc/README.md +++ b/plugins/tech-insights-backend-module-jsonfc/README.md @@ -51,8 +51,10 @@ By default this implementation comes with an in-memory storage to store checks. Checks for this FactChecker are constructed as [`json-rules-engine` compatible JSON rules](https://github.com/CacheControl/json-rules-engine/blob/master/docs/rules.md#conditions). A check could look like the following for example: ```ts -import { TechInsightJsonRuleCheck } from '../types'; -import { JSON_RULE_ENGINE_CHECK_TYPE } from '../constants'; +import { + JSON_RULE_ENGINE_CHECK_TYPE, + TechInsightJsonRuleCheck, +} from '@backstage/plugin-tech-insights-backend-module-jsonfc'; export const exampleCheck: TechInsightJsonRuleCheck = { id: 'demodatacheck', // Unique identifier of this check diff --git a/plugins/tech-insights-backend/README.md b/plugins/tech-insights-backend/README.md index 764ad860b8..31f5e402b0 100644 --- a/plugins/tech-insights-backend/README.md +++ b/plugins/tech-insights-backend/README.md @@ -42,7 +42,7 @@ export default async function createPlugin({ }); return await createRouter({ - ...(await builder.build()), + ...(await builder), logger, config, }); @@ -74,10 +74,10 @@ With the `techInsights.ts` router setup in place, add the router to At this point the Tech Insights backend is installed in your backend package, but you will not have any fact retrievers present in your application. To have the implemented FactRetrieverEngine within this package to be able to retrieve and store fact data into the database, you need to add these. -To create factRetrieverRegistration you need to implement `FactRetriever` interface defined in `@backstage/plugin-tech-insights-common` package. After you have implemented this interface you can wrap that into a registration object like follows: +To create factRetrieverRegistration you need to implement `FactRetriever` interface defined in `@backstage/plugin-tech-insights-node` package (see [Creating fact retrievers](#creating-fact-retrievers) for details). After you have implemented this interface you can wrap that into a registration object like follows: ```ts -import { createFactRetrieverRegistration } from './createFactRetriever'; +import { createFactRetrieverRegistration } from '@backstage/plugin-tech-insights-backend'; const myFactRetriever = { /** @@ -134,6 +134,8 @@ A Fact Retriever consist of four required and one optional parts: An example implementation of a FactRetriever could for example be as follows: ```ts +import { FactRetriever } from '@backstage/plugin-tech-insights-node'; + const myFactRetriever: FactRetriever = { id: 'documentation-number-factretriever', // unique identifier of the fact retriever version: '0.1.1', // SemVer version number of this fact retriever schema. This should be incremented if the implementation changes