diff --git a/.changeset/old-rules-give.md b/.changeset/old-rules-give.md new file mode 100644 index 0000000000..e28e2778ed --- /dev/null +++ b/.changeset/old-rules-give.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-catalog-backend-module-unprocessed': patch +'@backstage/plugin-catalog-unprocessed-entities': patch +--- + +Fix and improve documentation for the unprocessed entities modules. diff --git a/plugins/catalog-backend-module-unprocessed/README.md b/plugins/catalog-backend-module-unprocessed/README.md index dc5e830fa4..92d9e59445 100644 --- a/plugins/catalog-backend-module-unprocessed/README.md +++ b/plugins/catalog-backend-module-unprocessed/README.md @@ -1,4 +1,4 @@ -# @backstage/plugin-catalog-backend-module-unprocessed-node +# @backstage/plugin-catalog-backend-module-unprocessed This catalog-backend module adds support for viewing unprocessed entities. An unprocessed entity is one that doesn't show up in the catalog. @@ -10,11 +10,15 @@ A `pending` entity has not been processed yet. ## Installation +```shell +yarn add --cwd packages/backend @backstage/plugin-catalog-backend-module-unprocessed +``` + ### backend In `packages/backend/src/plugins/catalog.ts` import the module and initialize it after invoking `CatalogBuilder.build()`: -```ts +```ts title="packages/backend/src/plugins/catalog.ts" import { UnprocessedEntitesModule } from '@backstage/plugin-catalog-backend-module-unprocessed'; //... @@ -22,7 +26,6 @@ import { UnprocessedEntitesModule } from '@backstage/plugin-catalog-backend-modu const unprocessed = new UnprocessedEntitesModule( await env.database.getClient(), router, - env.logger, ); unprocessed.registerRoutes(); ``` @@ -31,7 +34,7 @@ unprocessed.registerRoutes(); In `packages/backend-next/src/index.ts` add the module: -```ts +```ts title="packages/backend-next/src/index.ts" backend.add(catalogModuleUnprocessedEntities()); ``` diff --git a/plugins/catalog-unprocessed-entities/README.md b/plugins/catalog-unprocessed-entities/README.md index fd824bec94..c386ace174 100644 --- a/plugins/catalog-unprocessed-entities/README.md +++ b/plugins/catalog-unprocessed-entities/README.md @@ -8,9 +8,13 @@ Requires the `@backstage/plugin-catalog-backend-module-unprocessed` module to be ## Installation -Import into your App.tsx and include into the `` component: +```shell +yarn add --cwd packages/backend @backstage/plugin-catalog-backend-module-unprocessed +``` -```tsx +Import into your `App.tsx` and include into the `` component: + +```tsx title="packages/app/src/App.tsx" import { CatalogUnprocessedEntitiesPage } from '@backstage/plugin-catalog-unprocessed-entities'; //... @@ -22,7 +26,9 @@ import { CatalogUnprocessedEntitiesPage } from '@backstage/plugin-catalog-unproc ## Getting started -Your plugin has been added to the example app in this repository, meaning you'll be able to access it by running `yarn start` in the root directory, and then navigating to [/catalog-unprocessed-entities](http://localhost:3000/catalog-unprocessed-entities). +Your plugin has been added to the example app in this repository, +meaning you'll be able to access it by running `yarn start` in the root directory, +and then navigating to [/catalog-unprocessed-entities](http://localhost:3000/catalog-unprocessed-entities). You can also serve the plugin in isolation by running `yarn start` in the plugin directory. This method of serving the plugin provides quicker iteration speed and a faster startup and hot reloads.