@backstage/plugin-techdocs-node 1.8.2 → 1.9.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +40 -4
- package/dist/index.cjs.js +22 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +16 -6
- package/package.json +10 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,18 +1,54 @@
|
|
|
1
1
|
# @backstage/plugin-techdocs-node
|
|
2
2
|
|
|
3
|
-
## 1.
|
|
3
|
+
## 1.9.0-next.2
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 344cfbcfbc: Allow prepared directory clean up for custom preparers
|
|
8
|
+
|
|
9
|
+
When using custom preparer for TechDocs, the `preparedDir` might
|
|
10
|
+
end up taking disk space. This requires all custom preparers to
|
|
11
|
+
implement a new method `shouldCleanPreparedDirectory` which indicates
|
|
12
|
+
whether the prepared directory should be cleaned after generation.
|
|
13
|
+
|
|
14
|
+
- d06b30b050: Add possibility to use a mkdocs config file with a different name than `mkdocs.<yaml|yml> with the serve command using the `--mkdocs-config-file-name` argument
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
- @backstage/backend-common@0.19.8-next.2
|
|
20
|
+
- @backstage/catalog-model@1.4.3-next.0
|
|
21
|
+
- @backstage/integration@1.7.1-next.1
|
|
22
|
+
- @backstage/errors@1.2.3-next.0
|
|
23
|
+
- @backstage/config@1.1.1-next.0
|
|
24
|
+
- @backstage/integration-aws-node@0.1.7-next.0
|
|
25
|
+
- @backstage/plugin-search-common@1.2.7-next.0
|
|
26
|
+
|
|
27
|
+
## 1.8.2-next.1
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
|
6
30
|
|
|
7
31
|
- Updated dependencies
|
|
8
|
-
- @backstage/backend-common@0.19.7
|
|
32
|
+
- @backstage/backend-common@0.19.7-next.1
|
|
33
|
+
- @backstage/config@1.1.0
|
|
34
|
+
- @backstage/integration-aws-node@0.1.6
|
|
35
|
+
- @backstage/catalog-model@1.4.2
|
|
36
|
+
- @backstage/errors@1.2.2
|
|
37
|
+
- @backstage/integration@1.7.1-next.0
|
|
38
|
+
- @backstage/plugin-search-common@1.2.6
|
|
9
39
|
|
|
10
|
-
## 1.8.
|
|
40
|
+
## 1.8.2-next.0
|
|
11
41
|
|
|
12
42
|
### Patch Changes
|
|
13
43
|
|
|
14
44
|
- Updated dependencies
|
|
15
|
-
- @backstage/
|
|
45
|
+
- @backstage/integration@1.7.1-next.0
|
|
46
|
+
- @backstage/backend-common@0.19.7-next.0
|
|
47
|
+
- @backstage/config@1.1.0
|
|
48
|
+
- @backstage/integration-aws-node@0.1.6
|
|
49
|
+
- @backstage/catalog-model@1.4.2
|
|
50
|
+
- @backstage/errors@1.2.2
|
|
51
|
+
- @backstage/plugin-search-common@1.2.6
|
|
16
52
|
|
|
17
53
|
## 1.8.0
|
|
18
54
|
|
package/dist/index.cjs.js
CHANGED
|
@@ -226,10 +226,22 @@ const generateMkdocsYml = async (inputDir, siteOptions) => {
|
|
|
226
226
|
throw new errors.ForwardedError("Could not generate mkdocs.yml file", error);
|
|
227
227
|
}
|
|
228
228
|
};
|
|
229
|
-
const getMkdocsYml = async (inputDir,
|
|
229
|
+
const getMkdocsYml = async (inputDir, options) => {
|
|
230
230
|
let mkdocsYmlPath;
|
|
231
231
|
let mkdocsYmlFileString;
|
|
232
232
|
try {
|
|
233
|
+
if (options == null ? void 0 : options.mkdocsConfigFileName) {
|
|
234
|
+
mkdocsYmlPath = path__default["default"].join(inputDir, options.mkdocsConfigFileName);
|
|
235
|
+
if (!await fs__default["default"].pathExists(mkdocsYmlPath)) {
|
|
236
|
+
throw new Error(`The specified file ${mkdocsYmlPath} does not exist`);
|
|
237
|
+
}
|
|
238
|
+
mkdocsYmlFileString = await fs__default["default"].readFile(mkdocsYmlPath, "utf8");
|
|
239
|
+
return {
|
|
240
|
+
path: mkdocsYmlPath,
|
|
241
|
+
content: mkdocsYmlFileString,
|
|
242
|
+
configIsTemporary: false
|
|
243
|
+
};
|
|
244
|
+
}
|
|
233
245
|
mkdocsYmlPath = path__default["default"].join(inputDir, "mkdocs.yaml");
|
|
234
246
|
if (await fs__default["default"].pathExists(mkdocsYmlPath)) {
|
|
235
247
|
mkdocsYmlFileString = await fs__default["default"].readFile(mkdocsYmlPath, "utf8");
|
|
@@ -248,7 +260,7 @@ const getMkdocsYml = async (inputDir, siteOptions) => {
|
|
|
248
260
|
configIsTemporary: false
|
|
249
261
|
};
|
|
250
262
|
}
|
|
251
|
-
await generateMkdocsYml(inputDir,
|
|
263
|
+
await generateMkdocsYml(inputDir, options);
|
|
252
264
|
mkdocsYmlFileString = await fs__default["default"].readFile(mkdocsYmlPath, "utf8");
|
|
253
265
|
} catch (error) {
|
|
254
266
|
throw new errors.ForwardedError(
|
|
@@ -726,6 +738,10 @@ class DirectoryPreparer {
|
|
|
726
738
|
static fromConfig(config, options) {
|
|
727
739
|
return new DirectoryPreparer(config, options.logger, options.reader);
|
|
728
740
|
}
|
|
741
|
+
/** {@inheritDoc PreparerBase.shouldCleanPreparedDirectory} */
|
|
742
|
+
shouldCleanPreparedDirectory() {
|
|
743
|
+
return false;
|
|
744
|
+
}
|
|
729
745
|
/** {@inheritDoc PreparerBase.prepare} */
|
|
730
746
|
async prepare(entity, options) {
|
|
731
747
|
var _a, _b;
|
|
@@ -785,6 +801,10 @@ class UrlPreparer {
|
|
|
785
801
|
static fromConfig(options) {
|
|
786
802
|
return new UrlPreparer(options.reader, options.logger);
|
|
787
803
|
}
|
|
804
|
+
/** {@inheritDoc PreparerBase.shouldCleanPreparedDirectory} */
|
|
805
|
+
shouldCleanPreparedDirectory() {
|
|
806
|
+
return true;
|
|
807
|
+
}
|
|
788
808
|
/** {@inheritDoc PreparerBase.prepare} */
|
|
789
809
|
async prepare(entity, options) {
|
|
790
810
|
try {
|