@backstage/plugin-techdocs-node 1.8.2 → 1.9.0

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/dist/index.d.ts CHANGED
@@ -64,6 +64,10 @@ type PreparerBase = {
64
64
  * @throws `NotModifiedError` when the prepared directory has not been changed since the last build.
65
65
  */
66
66
  prepare(entity: Entity, options?: PreparerOptions): Promise<PreparerResponse>;
67
+ /**
68
+ * Indicates whether the prepared directory should be cleaned after generation.
69
+ */
70
+ shouldCleanPreparedDirectory(): boolean;
67
71
  };
68
72
  /**
69
73
  * Definition for a TechDocs preparer builder
@@ -246,16 +250,17 @@ declare class Generators implements GeneratorBuilder {
246
250
  }
247
251
 
248
252
  /**
249
- * Finds and loads the contents of either an mkdocs.yml or mkdocs.yaml file,
250
- * depending on which is present (MkDocs supports both as of v1.2.2).
253
+ * Finds and loads the contents of an mkdocs.yml, mkdocs.yaml file, a file
254
+ * with a specified name or an ad-hoc created file with minimal config.
251
255
  * @public
252
256
  *
253
257
  * @param inputDir - base dir to be searched for either an mkdocs.yml or mkdocs.yaml file.
254
- * @param siteOptions - options for the site: `name` property will be used in mkdocs.yml for the
255
- * required `site_name` property, default value is "Documentation Site"
258
+ * @param options - name: default mkdocs site_name to be used with a ad hoc file default value is "Documentation Site"
259
+ * mkdocsConfigFileName (optional): a non-default file name to be used as the config
256
260
  */
257
- declare const getMkdocsYml: (inputDir: string, siteOptions?: {
261
+ declare const getMkdocsYml: (inputDir: string, options?: {
258
262
  name?: string;
263
+ mkdocsConfigFileName?: string;
259
264
  }) => Promise<{
260
265
  path: string;
261
266
  content: string;
@@ -267,8 +272,9 @@ declare const getMkdocsYml: (inputDir: string, siteOptions?: {
267
272
  * @deprecated
268
273
  * Deprecated in favor of getMkdocsYml (lowercase 'd')
269
274
  */
270
- declare const getMkDocsYml: (inputDir: string, siteOptions?: {
275
+ declare const getMkDocsYml: (inputDir: string, options?: {
271
276
  name?: string | undefined;
277
+ mkdocsConfigFileName?: string | undefined;
272
278
  } | undefined) => Promise<{
273
279
  path: string;
274
280
  content: string;
@@ -289,6 +295,8 @@ declare class DirectoryPreparer implements PreparerBase {
289
295
  */
290
296
  static fromConfig(config: Config, options: PreparerConfig): DirectoryPreparer;
291
297
  private constructor();
298
+ /** {@inheritDoc PreparerBase.shouldCleanPreparedDirectory} */
299
+ shouldCleanPreparedDirectory(): boolean;
292
300
  /** {@inheritDoc PreparerBase.prepare} */
293
301
  prepare(entity: Entity, options?: PreparerOptions): Promise<PreparerResponse>;
294
302
  }
@@ -306,6 +314,8 @@ declare class UrlPreparer implements PreparerBase {
306
314
  */
307
315
  static fromConfig(options: PreparerConfig): UrlPreparer;
308
316
  private constructor();
317
+ /** {@inheritDoc PreparerBase.shouldCleanPreparedDirectory} */
318
+ shouldCleanPreparedDirectory(): boolean;
309
319
  /** {@inheritDoc PreparerBase.prepare} */
310
320
  prepare(entity: Entity, options?: PreparerOptions): Promise<PreparerResponse>;
311
321
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@backstage/plugin-techdocs-node",
3
3
  "description": "Common node.js functionalities for TechDocs, to be shared between techdocs-backend plugin and techdocs-cli",
4
- "version": "1.8.2",
4
+ "version": "1.9.0",
5
5
  "main": "dist/index.cjs.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "publishConfig": {
@@ -46,13 +46,13 @@
46
46
  "@aws-sdk/types": "^3.347.0",
47
47
  "@azure/identity": "^3.2.1",
48
48
  "@azure/storage-blob": "^12.5.0",
49
- "@backstage/backend-common": "^0.19.7",
50
- "@backstage/catalog-model": "^1.4.2",
51
- "@backstage/config": "^1.1.0",
52
- "@backstage/errors": "^1.2.2",
53
- "@backstage/integration": "^1.7.0",
54
- "@backstage/integration-aws-node": "^0.1.6",
55
- "@backstage/plugin-search-common": "^1.2.6",
49
+ "@backstage/backend-common": "^0.19.8",
50
+ "@backstage/catalog-model": "^1.4.3",
51
+ "@backstage/config": "^1.1.1",
52
+ "@backstage/errors": "^1.2.3",
53
+ "@backstage/integration": "^1.7.1",
54
+ "@backstage/integration-aws-node": "^0.1.7",
55
+ "@backstage/plugin-search-common": "^1.2.7",
56
56
  "@google-cloud/storage": "^6.0.0",
57
57
  "@trendyol-js/openstack-swift-sdk": "^0.0.6",
58
58
  "@types/express": "^4.17.6",
@@ -63,17 +63,16 @@
63
63
  "js-yaml": "^4.0.0",
64
64
  "json5": "^2.1.3",
65
65
  "mime-types": "^2.1.27",
66
- "mock-fs": "^5.1.0",
67
66
  "p-limit": "^3.1.0",
68
67
  "recursive-readdir": "^2.2.2",
69
68
  "winston": "^3.2.1"
70
69
  },
71
70
  "devDependencies": {
72
- "@backstage/cli": "^0.22.13",
71
+ "@backstage/backend-test-utils": "^0.2.7",
72
+ "@backstage/cli": "^0.23.0",
73
73
  "@types/fs-extra": "^9.0.5",
74
74
  "@types/js-yaml": "^4.0.0",
75
75
  "@types/mime-types": "^2.1.0",
76
- "@types/mock-fs": "^4.13.0",
77
76
  "@types/recursive-readdir": "^2.2.0",
78
77
  "@types/supertest": "^2.0.8",
79
78
  "aws-sdk-client-mock": "^2.0.0",