exposes the techdocs plugin as an alpha plugin

Signed-off-by: Oleg S <97077423+RobotSail@users.noreply.github.com>
This commit is contained in:
Oleg S
2023-03-08 15:30:37 -05:00
parent 92b495328b
commit c041efd53d
8 changed files with 47 additions and 10 deletions
+1 -2
View File
@@ -1,6 +1,5 @@
---
'@backstage/plugin-techdocs-backend': minor
'example-backend-next': minor
---
Expose the techdocs-backend plugin using the new plugin system
Added alpha export of the `techdocsPlugin` using the new backend system
+1 -1
View File
@@ -19,7 +19,7 @@ import { catalogModuleTemplateKind } from '@backstage/plugin-scaffolder-backend/
import { createBackend } from '@backstage/backend-defaults';
import { appPlugin } from '@backstage/plugin-app-backend/alpha';
import { todoPlugin } from '@backstage/plugin-todo-backend';
import { techdocsPlugin } from '@backstage/plugin-techdocs-backend';
import { techdocsPlugin } from '@backstage/plugin-techdocs-backend/alpha';
const backend = createBackend();
@@ -0,0 +1,12 @@
## API Report File for "@backstage/plugin-techdocs-backend"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
import { BackendFeature } from '@backstage/backend-plugin-api';
// @alpha
export const techdocsPlugin: () => BackendFeature;
// (No @packageDocumentation comment for this package)
```
-4
View File
@@ -5,7 +5,6 @@
```ts
/// <reference types="node" />
import { BackendFeature } from '@backstage/backend-plugin-api';
import { CatalogApi } from '@backstage/catalog-client';
import { CatalogClient } from '@backstage/catalog-client';
import { Config } from '@backstage/config';
@@ -130,8 +129,5 @@ export type TechDocsCollatorOptions = {
export { TechDocsDocument };
// @public
export const techdocsPlugin: () => BackendFeature;
export * from '@backstage/plugin-techdocs-node';
```
+15
View File
@@ -10,6 +10,21 @@
"main": "dist/index.cjs.js",
"types": "dist/index.d.ts"
},
"exports": {
".": "./src/index.ts",
"./alpha": "./src/alpha.ts",
"./package.json": "./package.json"
},
"typesVersions": {
"*": {
"alpha": [
"src/alpha.ts"
],
"package.json": [
"package.json"
]
}
},
"backstage": {
"role": "backend-plugin"
},
+16
View File
@@ -0,0 +1,16 @@
/*
* Copyright 2023 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { techdocsPlugin } from './plugin';
-1
View File
@@ -37,7 +37,6 @@ export type {
TechDocsCollatorFactoryOptions,
TechDocsCollatorOptions,
} from './search';
export { techdocsPlugin } from './plugin';
/**
* @deprecated Use directly from @backstage/plugin-techdocs-node
+2 -2
View File
@@ -30,11 +30,11 @@ import {
Publisher,
} from '@backstage/plugin-techdocs-node';
import Docker from 'dockerode';
import { createRouter } from './service';
import { createRouter } from '@backstage/plugin-techdocs-backend';
/**
* The TechDocs plugin is responsible for serving and building documentation for any entity.
* @public
* @alpha
*/
export const techdocsPlugin = createBackendPlugin({
pluginId: 'techdocs-backend',