Version Packages
This commit is contained in:
@@ -1,5 +1,79 @@
|
||||
# @backstage/plugin-techdocs-backend
|
||||
|
||||
## 0.8.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- e0bfd3d44: Migrate the plugin to use the `ContainerRunner` interface instead of `runDockerContainer(…)`.
|
||||
It also provides the `ContainerRunner` to the generators instead of to the `createRouter` function.
|
||||
|
||||
To apply this change to an existing backend application, add the following to `src/plugins/techdocs.ts`:
|
||||
|
||||
```diff
|
||||
+ import { DockerContainerRunner } from '@backstage/backend-common';
|
||||
|
||||
// ...
|
||||
|
||||
export default async function createPlugin({
|
||||
logger,
|
||||
config,
|
||||
discovery,
|
||||
reader,
|
||||
}: PluginEnvironment): Promise<Router> {
|
||||
// Preparers are responsible for fetching source files for documentation.
|
||||
const preparers = await Preparers.fromConfig(config, {
|
||||
logger,
|
||||
reader,
|
||||
});
|
||||
|
||||
+ // Docker client (conditionally) used by the generators, based on techdocs.generators config.
|
||||
+ const dockerClient = new Docker();
|
||||
+ const containerRunner = new DockerContainerRunner({ dockerClient });
|
||||
|
||||
// Generators are used for generating documentation sites.
|
||||
const generators = await Generators.fromConfig(config, {
|
||||
logger,
|
||||
+ containerRunner,
|
||||
});
|
||||
|
||||
// Publisher is used for
|
||||
// 1. Publishing generated files to storage
|
||||
// 2. Fetching files from storage and passing them to TechDocs frontend.
|
||||
const publisher = await Publisher.fromConfig(config, {
|
||||
logger,
|
||||
discovery,
|
||||
});
|
||||
|
||||
// checks if the publisher is working and logs the result
|
||||
await publisher.getReadiness();
|
||||
|
||||
- // Docker client (conditionally) used by the generators, based on techdocs.generators config.
|
||||
- const dockerClient = new Docker();
|
||||
|
||||
return await createRouter({
|
||||
preparers,
|
||||
generators,
|
||||
publisher,
|
||||
- dockerClient,
|
||||
logger,
|
||||
config,
|
||||
discovery,
|
||||
});
|
||||
}
|
||||
```
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [e0bfd3d44]
|
||||
- Updated dependencies [38ca05168]
|
||||
- Updated dependencies [e0bfd3d44]
|
||||
- Updated dependencies [d8b81fd28]
|
||||
- Updated dependencies [e9e56b01a]
|
||||
- @backstage/backend-common@0.7.0
|
||||
- @backstage/techdocs-common@0.6.0
|
||||
- @backstage/catalog-model@0.7.8
|
||||
- @backstage/config@0.1.5
|
||||
|
||||
## 0.7.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@backstage/plugin-techdocs-backend",
|
||||
"version": "0.7.1",
|
||||
"version": "0.8.0",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
@@ -30,11 +30,11 @@
|
||||
"clean": "backstage-cli clean"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/backend-common": "^0.6.0",
|
||||
"@backstage/catalog-model": "^0.7.7",
|
||||
"@backstage/config": "^0.1.4",
|
||||
"@backstage/backend-common": "^0.7.0",
|
||||
"@backstage/catalog-model": "^0.7.8",
|
||||
"@backstage/config": "^0.1.5",
|
||||
"@backstage/errors": "^0.1.1",
|
||||
"@backstage/techdocs-common": "^0.5.0",
|
||||
"@backstage/techdocs-common": "^0.6.0",
|
||||
"@types/express": "^4.17.6",
|
||||
"cross-fetch": "^3.0.6",
|
||||
"dockerode": "^3.2.1",
|
||||
@@ -45,7 +45,7 @@
|
||||
"winston": "^3.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.6.8",
|
||||
"@backstage/cli": "^0.6.10",
|
||||
"@types/dockerode": "^3.2.1",
|
||||
"supertest": "^6.1.3"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user