@backstage/plugin-techdocs-backend 2.2.1-next.0 → 2.2.2-next.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/CHANGELOG.md +21 -0
- package/config.schema.json +414 -0
- package/package.json +11 -11
- package/config.d.ts +0 -329
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @backstage/plugin-techdocs-backend
|
|
2
2
|
|
|
3
|
+
## 2.2.2-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/backend-plugin-api@1.9.3-next.0
|
|
9
|
+
- @backstage/plugin-catalog-node@2.2.3-next.0
|
|
10
|
+
- @backstage/plugin-techdocs-node@1.15.2-next.0
|
|
11
|
+
- @backstage/catalog-client@1.16.1-next.0
|
|
12
|
+
|
|
13
|
+
## 2.2.1
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
- @backstage/catalog-client@1.16.0
|
|
19
|
+
- @backstage/integration@2.0.3
|
|
20
|
+
- @backstage/backend-plugin-api@1.9.2
|
|
21
|
+
- @backstage/plugin-catalog-node@2.2.2
|
|
22
|
+
- @backstage/plugin-techdocs-node@1.15.1
|
|
23
|
+
|
|
3
24
|
## 2.2.1-next.0
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -0,0 +1,414 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"techdocs": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"builder": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"enum": [
|
|
11
|
+
"local",
|
|
12
|
+
"external"
|
|
13
|
+
],
|
|
14
|
+
"description": "Documentation building process depends on the builder attr",
|
|
15
|
+
"visibility": "frontend"
|
|
16
|
+
},
|
|
17
|
+
"generator": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"properties": {
|
|
20
|
+
"runIn": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"enum": [
|
|
23
|
+
"local",
|
|
24
|
+
"docker"
|
|
25
|
+
],
|
|
26
|
+
"description": "Where to run the techdocs (mkdocs) generator"
|
|
27
|
+
},
|
|
28
|
+
"dockerImage": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"description": "Override the default techdocs docker image"
|
|
31
|
+
},
|
|
32
|
+
"pullImage": {
|
|
33
|
+
"type": "boolean",
|
|
34
|
+
"description": "Pull the latest docker image"
|
|
35
|
+
},
|
|
36
|
+
"mkdocs": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"properties": {
|
|
39
|
+
"legacyCopyReadmeMdToIndexMd": {
|
|
40
|
+
"type": "boolean",
|
|
41
|
+
"description": "(Optional and not recommended) Configures the techdocs generator to attempt to ensure an index.md exists falling back to using <docs-dir>/README.md or README.md in case a default <docs-dir>/index.md is not provided. Note that https://www.mkdocs.org/user-guide/configuration/#edit_uri behavior will be broken in these scenarios."
|
|
42
|
+
},
|
|
43
|
+
"defaultPlugins": {
|
|
44
|
+
"type": "array",
|
|
45
|
+
"items": {
|
|
46
|
+
"type": "string"
|
|
47
|
+
},
|
|
48
|
+
"description": "List of mkdocs plugins which should be added as default to all mkdocs.yml files."
|
|
49
|
+
},
|
|
50
|
+
"dangerouslyAllowAdditionalKeys": {
|
|
51
|
+
"type": "array",
|
|
52
|
+
"items": {
|
|
53
|
+
"type": "string"
|
|
54
|
+
},
|
|
55
|
+
"description": "List of additional MkDocs configuration keys to allow beyond the default safe allowlist. This can introduce security vulnerabilities.\n\nWARNING: Some MkDocs configuration keys can execute arbitrary code. For example, the 'hooks' key allows running arbitrary Python code during documentation generation. Only use this in trusted environments where all mkdocs.yml files are audited."
|
|
56
|
+
},
|
|
57
|
+
"disableExternalFonts": {
|
|
58
|
+
"type": "boolean",
|
|
59
|
+
"description": "Disable external fonts for all TechDocs sites. If not set, the default value is false. If set to true, the external font will be disabled for all TechDocs sites. If set to false, the external font will be enabled for all TechDocs sites."
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"description": "Override behavior specific to mkdocs."
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"required": [
|
|
66
|
+
"runIn"
|
|
67
|
+
],
|
|
68
|
+
"description": "Techdocs generator information"
|
|
69
|
+
},
|
|
70
|
+
"publisher": {
|
|
71
|
+
"anyOf": [
|
|
72
|
+
{
|
|
73
|
+
"type": "object",
|
|
74
|
+
"properties": {
|
|
75
|
+
"type": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"const": "local"
|
|
78
|
+
},
|
|
79
|
+
"local": {
|
|
80
|
+
"type": "object",
|
|
81
|
+
"properties": {
|
|
82
|
+
"publishDirectory": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"description": "(Optional) Directory to store generated static files."
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"description": "Optional when 'type' is set to local"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"required": [
|
|
91
|
+
"type"
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"type": "object",
|
|
96
|
+
"properties": {
|
|
97
|
+
"type": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"const": "awsS3"
|
|
100
|
+
},
|
|
101
|
+
"awsS3": {
|
|
102
|
+
"type": "object",
|
|
103
|
+
"properties": {
|
|
104
|
+
"accountId": {
|
|
105
|
+
"type": "string",
|
|
106
|
+
"description": "(Optional) The AWS account ID where the storage bucket is located. Credentials for the account ID will be sourced from the 'aws' app config section. See the [integration-aws-node package](https://github.com/backstage/backstage/blob/master/packages/integration-aws-node/README.md) for details on how to configure the credentials in the app config. If account ID is not set and no credentials are set, environment variables or aws config file will be used to authenticate."
|
|
107
|
+
},
|
|
108
|
+
"credentials": {
|
|
109
|
+
"type": "object",
|
|
110
|
+
"properties": {
|
|
111
|
+
"accessKeyId": {
|
|
112
|
+
"type": "string",
|
|
113
|
+
"description": "User access key id",
|
|
114
|
+
"visibility": "secret"
|
|
115
|
+
},
|
|
116
|
+
"secretAccessKey": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"description": "User secret access key",
|
|
119
|
+
"visibility": "secret"
|
|
120
|
+
},
|
|
121
|
+
"roleArn": {
|
|
122
|
+
"type": "string",
|
|
123
|
+
"description": "ARN of role to be assumed"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"description": "(Optional) Credentials used to access a storage bucket. This section is now deprecated. Configuring the account ID is now preferred, with credentials in the 'aws' app config section. If not set and no account ID is set, environment variables or aws config file will be used to authenticate.",
|
|
127
|
+
"visibility": "secret"
|
|
128
|
+
},
|
|
129
|
+
"bucketName": {
|
|
130
|
+
"type": "string",
|
|
131
|
+
"description": "(Required) Cloud Storage Bucket Name"
|
|
132
|
+
},
|
|
133
|
+
"bucketRootPath": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"description": "(Optional) Location in storage bucket to save files If not set, the default location will be the root of the storage bucket"
|
|
136
|
+
},
|
|
137
|
+
"region": {
|
|
138
|
+
"type": "string",
|
|
139
|
+
"description": "(Optional) AWS Region. If not set, AWS_REGION environment variable or aws config file will be used."
|
|
140
|
+
},
|
|
141
|
+
"endpoint": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"description": "(Optional) AWS Endpoint. The endpoint URI to send requests to. The default endpoint is built from the configured region."
|
|
144
|
+
},
|
|
145
|
+
"s3ForcePathStyle": {
|
|
146
|
+
"type": "boolean",
|
|
147
|
+
"description": "(Optional) Whether to use path style URLs when communicating with S3. Defaults to false. This allows providers like LocalStack, Minio and Wasabi (and possibly others) to be used to host tech docs."
|
|
148
|
+
},
|
|
149
|
+
"sse": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"enum": [
|
|
152
|
+
"aws:kms",
|
|
153
|
+
"AES256"
|
|
154
|
+
],
|
|
155
|
+
"description": "(Optional) AWS Server Side Encryption Defaults to undefined. If not set, encrypted buckets will fail to publish. https://docs.aws.amazon.com/AmazonS3/latest/userguide/specifying-s3-encryption.html"
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"required": [
|
|
159
|
+
"bucketName"
|
|
160
|
+
],
|
|
161
|
+
"description": "Required when 'type' is set to awsS3"
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"required": [
|
|
165
|
+
"type"
|
|
166
|
+
]
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"type": "object",
|
|
170
|
+
"properties": {
|
|
171
|
+
"type": {
|
|
172
|
+
"type": "string",
|
|
173
|
+
"const": "openStackSwift"
|
|
174
|
+
},
|
|
175
|
+
"openStackSwift": {
|
|
176
|
+
"type": "object",
|
|
177
|
+
"properties": {
|
|
178
|
+
"credentials": {
|
|
179
|
+
"type": "object",
|
|
180
|
+
"properties": {
|
|
181
|
+
"id": {
|
|
182
|
+
"type": "string",
|
|
183
|
+
"description": "(Required) Application Credential ID",
|
|
184
|
+
"visibility": "secret"
|
|
185
|
+
},
|
|
186
|
+
"secret": {
|
|
187
|
+
"type": "string",
|
|
188
|
+
"description": "(Required) Application Credential Secret",
|
|
189
|
+
"visibility": "secret"
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"required": [
|
|
193
|
+
"id",
|
|
194
|
+
"secret"
|
|
195
|
+
],
|
|
196
|
+
"description": "(Required) Credentials used to access a storage bucket.",
|
|
197
|
+
"visibility": "secret"
|
|
198
|
+
},
|
|
199
|
+
"containerName": {
|
|
200
|
+
"type": "string",
|
|
201
|
+
"description": "(Required) Cloud Storage Container Name"
|
|
202
|
+
},
|
|
203
|
+
"authUrl": {
|
|
204
|
+
"type": "string",
|
|
205
|
+
"description": "(Required) Auth url sometimes OpenStack uses different port check your OpenStack apis."
|
|
206
|
+
},
|
|
207
|
+
"swiftUrl": {
|
|
208
|
+
"type": "string",
|
|
209
|
+
"description": "(Required) Swift URL"
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
"required": [
|
|
213
|
+
"credentials",
|
|
214
|
+
"containerName",
|
|
215
|
+
"authUrl",
|
|
216
|
+
"swiftUrl"
|
|
217
|
+
],
|
|
218
|
+
"description": "Required when 'type' is set to openStackSwift"
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
"required": [
|
|
222
|
+
"type"
|
|
223
|
+
]
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"type": "object",
|
|
227
|
+
"properties": {
|
|
228
|
+
"type": {
|
|
229
|
+
"type": "string",
|
|
230
|
+
"const": "azureBlobStorage"
|
|
231
|
+
},
|
|
232
|
+
"azureBlobStorage": {
|
|
233
|
+
"type": "object",
|
|
234
|
+
"properties": {
|
|
235
|
+
"connectionString": {
|
|
236
|
+
"type": "string",
|
|
237
|
+
"description": "(Optional) Connection string of the storage container.",
|
|
238
|
+
"visibility": "secret"
|
|
239
|
+
},
|
|
240
|
+
"credentials": {
|
|
241
|
+
"type": "object",
|
|
242
|
+
"properties": {
|
|
243
|
+
"accountName": {
|
|
244
|
+
"type": "string",
|
|
245
|
+
"description": "Account access name",
|
|
246
|
+
"visibility": "secret"
|
|
247
|
+
},
|
|
248
|
+
"accountKey": {
|
|
249
|
+
"type": "string",
|
|
250
|
+
"description": "(Optional) Account secret primary key If not set, environment variables will be used to authenticate.",
|
|
251
|
+
"visibility": "secret"
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"required": [
|
|
255
|
+
"accountName"
|
|
256
|
+
],
|
|
257
|
+
"description": "(Optional) Credentials used to access a storage container.",
|
|
258
|
+
"visibility": "secret"
|
|
259
|
+
},
|
|
260
|
+
"containerName": {
|
|
261
|
+
"type": "string",
|
|
262
|
+
"description": "(Required) Cloud Storage Container Name"
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
"required": [
|
|
266
|
+
"containerName"
|
|
267
|
+
],
|
|
268
|
+
"description": "Required when 'type' is set to azureBlobStorage"
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
"required": [
|
|
272
|
+
"type"
|
|
273
|
+
]
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"type": "object",
|
|
277
|
+
"properties": {
|
|
278
|
+
"type": {
|
|
279
|
+
"type": "string",
|
|
280
|
+
"const": "googleGcs"
|
|
281
|
+
},
|
|
282
|
+
"googleGcs": {
|
|
283
|
+
"type": "object",
|
|
284
|
+
"properties": {
|
|
285
|
+
"bucketName": {
|
|
286
|
+
"type": "string",
|
|
287
|
+
"description": "(Required) Cloud Storage Bucket Name"
|
|
288
|
+
},
|
|
289
|
+
"credentials": {
|
|
290
|
+
"type": "string",
|
|
291
|
+
"description": "(Optional) API key used to write to a storage bucket. If not set, environment variables will be used to authenticate.",
|
|
292
|
+
"visibility": "secret"
|
|
293
|
+
},
|
|
294
|
+
"projectId": {
|
|
295
|
+
"type": "string",
|
|
296
|
+
"description": "(Optional) GCP project ID that contains the bucket. Should be set if credentials is not set, or if the service account in the credentials belongs to a different project to the bucket."
|
|
297
|
+
},
|
|
298
|
+
"bucketRootPath": {
|
|
299
|
+
"type": "string",
|
|
300
|
+
"description": "(Optional) Location in storage bucket to save files If not set, the default location will be the root of the storage bucket"
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
"required": [
|
|
304
|
+
"bucketName"
|
|
305
|
+
],
|
|
306
|
+
"description": "Required when 'type' is set to googleGcs"
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
"required": [
|
|
310
|
+
"type"
|
|
311
|
+
]
|
|
312
|
+
}
|
|
313
|
+
],
|
|
314
|
+
"description": "Techdocs publisher information"
|
|
315
|
+
},
|
|
316
|
+
"cache": {
|
|
317
|
+
"type": "object",
|
|
318
|
+
"properties": {
|
|
319
|
+
"ttl": {
|
|
320
|
+
"anyOf": [
|
|
321
|
+
{
|
|
322
|
+
"type": "number"
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"type": "object",
|
|
326
|
+
"properties": {
|
|
327
|
+
"years": {
|
|
328
|
+
"type": "number"
|
|
329
|
+
},
|
|
330
|
+
"months": {
|
|
331
|
+
"type": "number"
|
|
332
|
+
},
|
|
333
|
+
"weeks": {
|
|
334
|
+
"type": "number"
|
|
335
|
+
},
|
|
336
|
+
"days": {
|
|
337
|
+
"type": "number"
|
|
338
|
+
},
|
|
339
|
+
"hours": {
|
|
340
|
+
"type": "number"
|
|
341
|
+
},
|
|
342
|
+
"minutes": {
|
|
343
|
+
"type": "number"
|
|
344
|
+
},
|
|
345
|
+
"seconds": {
|
|
346
|
+
"type": "number"
|
|
347
|
+
},
|
|
348
|
+
"milliseconds": {
|
|
349
|
+
"type": "number"
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
"description": "Human friendly durations object."
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"type": "string"
|
|
356
|
+
}
|
|
357
|
+
],
|
|
358
|
+
"description": "The cache time-to-live for TechDocs sites, in milliseconds for a number or a human duration. Set this to a non-zero value to cache TechDocs sites and assets as they are read from storage.\n\nNote: you must also configure `backend.cache` appropriately as well, and to pass a PluginCacheManager instance to TechDocs Backend's createRouter method in your backend."
|
|
359
|
+
},
|
|
360
|
+
"readTimeout": {
|
|
361
|
+
"anyOf": [
|
|
362
|
+
{
|
|
363
|
+
"type": "number"
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"type": "object",
|
|
367
|
+
"properties": {
|
|
368
|
+
"years": {
|
|
369
|
+
"type": "number"
|
|
370
|
+
},
|
|
371
|
+
"months": {
|
|
372
|
+
"type": "number"
|
|
373
|
+
},
|
|
374
|
+
"weeks": {
|
|
375
|
+
"type": "number"
|
|
376
|
+
},
|
|
377
|
+
"days": {
|
|
378
|
+
"type": "number"
|
|
379
|
+
},
|
|
380
|
+
"hours": {
|
|
381
|
+
"type": "number"
|
|
382
|
+
},
|
|
383
|
+
"minutes": {
|
|
384
|
+
"type": "number"
|
|
385
|
+
},
|
|
386
|
+
"seconds": {
|
|
387
|
+
"type": "number"
|
|
388
|
+
},
|
|
389
|
+
"milliseconds": {
|
|
390
|
+
"type": "number"
|
|
391
|
+
}
|
|
392
|
+
},
|
|
393
|
+
"description": "Human friendly durations object."
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
"type": "string"
|
|
397
|
+
}
|
|
398
|
+
],
|
|
399
|
+
"description": "The time (in milliseconds for a number or a human duration) that the TechDocs backend will wait for a cache service to respond before continuing on as though the cached object was not found (e.g. when the cache sercice is unavailable).\n\nDefaults to 1000 milliseconds."
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
"required": [
|
|
403
|
+
"ttl"
|
|
404
|
+
]
|
|
405
|
+
},
|
|
406
|
+
"legacyUseCaseSensitiveTripletPaths": {
|
|
407
|
+
"type": "boolean",
|
|
408
|
+
"description": "(Optional and not recommended) Prior to version [0.x.y] of TechDocs, docs sites could only be accessed over paths with case-sensitive entity triplets e.g. (namespace/Kind/name). If you are upgrading from an older version of TechDocs and are unable to perform the necessary migration of files in your external storage, you can set this value to `true` to temporarily revert to the old, case-sensitive entity triplet behavior."
|
|
409
|
+
}
|
|
410
|
+
},
|
|
411
|
+
"description": "Configuration options for the techdocs-backend plugin"
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-techdocs-backend",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2-next.0",
|
|
4
4
|
"description": "The Backstage backend plugin that renders technical documentation for your components",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "backend-plugin",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
},
|
|
64
64
|
"files": [
|
|
65
65
|
"dist",
|
|
66
|
-
"config.
|
|
66
|
+
"config.schema.json"
|
|
67
67
|
],
|
|
68
68
|
"scripts": {
|
|
69
69
|
"build": "backstage-cli package build",
|
|
@@ -75,14 +75,14 @@
|
|
|
75
75
|
"test": "backstage-cli package test"
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@backstage/backend-plugin-api": "1.9.
|
|
79
|
-
"@backstage/catalog-client": "1.16.
|
|
78
|
+
"@backstage/backend-plugin-api": "1.9.3-next.0",
|
|
79
|
+
"@backstage/catalog-client": "1.16.1-next.0",
|
|
80
80
|
"@backstage/catalog-model": "1.9.0",
|
|
81
81
|
"@backstage/config": "1.3.8",
|
|
82
82
|
"@backstage/errors": "1.3.1",
|
|
83
|
-
"@backstage/integration": "2.0.3
|
|
84
|
-
"@backstage/plugin-catalog-node": "2.2.
|
|
85
|
-
"@backstage/plugin-techdocs-node": "1.15.
|
|
83
|
+
"@backstage/integration": "2.0.3",
|
|
84
|
+
"@backstage/plugin-catalog-node": "2.2.3-next.0",
|
|
85
|
+
"@backstage/plugin-techdocs-node": "1.15.2-next.0",
|
|
86
86
|
"@backstage/types": "1.2.2",
|
|
87
87
|
"express": "^4.22.0",
|
|
88
88
|
"express-promise-router": "^4.1.0",
|
|
@@ -92,12 +92,12 @@
|
|
|
92
92
|
"winston": "^3.2.1"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
|
-
"@backstage/backend-defaults": "0.17.
|
|
96
|
-
"@backstage/backend-test-utils": "1.11.
|
|
97
|
-
"@backstage/cli": "0.36.
|
|
95
|
+
"@backstage/backend-defaults": "0.17.4-next.0",
|
|
96
|
+
"@backstage/backend-test-utils": "1.11.5-next.0",
|
|
97
|
+
"@backstage/cli": "0.36.4-next.0",
|
|
98
98
|
"@types/express": "^4.17.6",
|
|
99
99
|
"msw": "^2.0.0",
|
|
100
100
|
"supertest": "^7.0.0"
|
|
101
101
|
},
|
|
102
|
-
"configSchema": "config.
|
|
102
|
+
"configSchema": "config.schema.json"
|
|
103
103
|
}
|
package/config.d.ts
DELETED
|
@@ -1,329 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2020 The Backstage Authors
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
import { HumanDuration } from '@backstage/types';
|
|
18
|
-
|
|
19
|
-
export interface Config {
|
|
20
|
-
/**
|
|
21
|
-
* Configuration options for the techdocs-backend plugin
|
|
22
|
-
* @see http://backstage.io/docs/features/techdocs/configuration
|
|
23
|
-
*/
|
|
24
|
-
techdocs?: {
|
|
25
|
-
/**
|
|
26
|
-
* Documentation building process depends on the builder attr
|
|
27
|
-
* @visibility frontend
|
|
28
|
-
*/
|
|
29
|
-
builder?: 'local' | 'external';
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Techdocs generator information
|
|
33
|
-
*/
|
|
34
|
-
generator?: {
|
|
35
|
-
/**
|
|
36
|
-
* Where to run the techdocs (mkdocs) generator
|
|
37
|
-
*/
|
|
38
|
-
runIn: 'local' | 'docker';
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Override the default techdocs docker image
|
|
42
|
-
*/
|
|
43
|
-
dockerImage?: string;
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Pull the latest docker image
|
|
47
|
-
*/
|
|
48
|
-
pullImage?: boolean;
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Override behavior specific to mkdocs.
|
|
52
|
-
*/
|
|
53
|
-
mkdocs?: {
|
|
54
|
-
/**
|
|
55
|
-
* (Optional and not recommended) Configures the techdocs generator to
|
|
56
|
-
* attempt to ensure an index.md exists falling back to using <docs-dir>/README.md
|
|
57
|
-
* or README.md in case a default <docs-dir>/index.md is not provided.
|
|
58
|
-
* Note that https://www.mkdocs.org/user-guide/configuration/#edit_uri behavior
|
|
59
|
-
* will be broken in these scenarios.
|
|
60
|
-
*/
|
|
61
|
-
legacyCopyReadmeMdToIndexMd?: boolean;
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* List of mkdocs plugins which should be added as default to all mkdocs.yml files.
|
|
65
|
-
*/
|
|
66
|
-
defaultPlugins?: string[];
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* List of additional MkDocs configuration keys to allow beyond
|
|
70
|
-
* the default safe allowlist. This can introduce security vulnerabilities.
|
|
71
|
-
*
|
|
72
|
-
* WARNING: Some MkDocs configuration keys can execute arbitrary code. For example, the
|
|
73
|
-
* 'hooks' key allows running arbitrary Python code during documentation generation.
|
|
74
|
-
* Only use this in trusted environments where all mkdocs.yml files are audited.
|
|
75
|
-
*
|
|
76
|
-
* @see https://www.mkdocs.org/user-guide/configuration/#hooks
|
|
77
|
-
*/
|
|
78
|
-
dangerouslyAllowAdditionalKeys?: string[];
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Disable external fonts for all TechDocs sites.
|
|
82
|
-
* If not set, the default value is false.
|
|
83
|
-
* If set to true, the external font will be disabled for all TechDocs sites.
|
|
84
|
-
* If set to false, the external font will be enabled for all TechDocs sites.
|
|
85
|
-
*/
|
|
86
|
-
disableExternalFonts?: boolean;
|
|
87
|
-
};
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Techdocs publisher information
|
|
92
|
-
*/
|
|
93
|
-
publisher?:
|
|
94
|
-
| {
|
|
95
|
-
type: 'local';
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Optional when 'type' is set to local
|
|
99
|
-
*/
|
|
100
|
-
local?: {
|
|
101
|
-
/**
|
|
102
|
-
* (Optional) Directory to store generated static files.
|
|
103
|
-
*/
|
|
104
|
-
publishDirectory?: string;
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
| {
|
|
108
|
-
type: 'awsS3';
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Required when 'type' is set to awsS3
|
|
112
|
-
*/
|
|
113
|
-
awsS3?: {
|
|
114
|
-
/**
|
|
115
|
-
* (Optional) The AWS account ID where the storage bucket is located.
|
|
116
|
-
* Credentials for the account ID will be sourced from the 'aws' app config section.
|
|
117
|
-
* See the
|
|
118
|
-
* [integration-aws-node package](https://github.com/backstage/backstage/blob/master/packages/integration-aws-node/README.md)
|
|
119
|
-
* for details on how to configure the credentials in the app config.
|
|
120
|
-
* If account ID is not set and no credentials are set, environment variables or aws config file will be used to authenticate.
|
|
121
|
-
* @see https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/loading-node-credentials-environment.html
|
|
122
|
-
* @see https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/loading-node-credentials-shared.html
|
|
123
|
-
*/
|
|
124
|
-
accountId?: string;
|
|
125
|
-
/**
|
|
126
|
-
* (Optional) Credentials used to access a storage bucket.
|
|
127
|
-
* This section is now deprecated. Configuring the account ID is now preferred, with credentials in the 'aws'
|
|
128
|
-
* app config section.
|
|
129
|
-
* If not set and no account ID is set, environment variables or aws config file will be used to authenticate.
|
|
130
|
-
* @see https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/loading-node-credentials-environment.html
|
|
131
|
-
* @see https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/loading-node-credentials-shared.html
|
|
132
|
-
* @visibility secret
|
|
133
|
-
*/
|
|
134
|
-
credentials?: {
|
|
135
|
-
/**
|
|
136
|
-
* User access key id
|
|
137
|
-
* @visibility secret
|
|
138
|
-
*/
|
|
139
|
-
accessKeyId?: string;
|
|
140
|
-
/**
|
|
141
|
-
* User secret access key
|
|
142
|
-
* @visibility secret
|
|
143
|
-
*/
|
|
144
|
-
secretAccessKey?: string;
|
|
145
|
-
/**
|
|
146
|
-
* ARN of role to be assumed
|
|
147
|
-
*/
|
|
148
|
-
roleArn?: string;
|
|
149
|
-
};
|
|
150
|
-
/**
|
|
151
|
-
* (Required) Cloud Storage Bucket Name
|
|
152
|
-
*/
|
|
153
|
-
bucketName: string;
|
|
154
|
-
/**
|
|
155
|
-
* (Optional) Location in storage bucket to save files
|
|
156
|
-
* If not set, the default location will be the root of the storage bucket
|
|
157
|
-
*/
|
|
158
|
-
bucketRootPath?: string;
|
|
159
|
-
/**
|
|
160
|
-
* (Optional) AWS Region.
|
|
161
|
-
* If not set, AWS_REGION environment variable or aws config file will be used.
|
|
162
|
-
* @see https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/setting-region.html
|
|
163
|
-
*/
|
|
164
|
-
region?: string;
|
|
165
|
-
/**
|
|
166
|
-
* (Optional) AWS Endpoint.
|
|
167
|
-
* The endpoint URI to send requests to. The default endpoint is built from the configured region.
|
|
168
|
-
* @see https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#constructor-property
|
|
169
|
-
*/
|
|
170
|
-
endpoint?: string;
|
|
171
|
-
/**
|
|
172
|
-
* (Optional) Whether to use path style URLs when communicating with S3.
|
|
173
|
-
* Defaults to false.
|
|
174
|
-
* This allows providers like LocalStack, Minio and Wasabi (and possibly others) to be used to host tech docs.
|
|
175
|
-
*/
|
|
176
|
-
s3ForcePathStyle?: boolean;
|
|
177
|
-
|
|
178
|
-
/**
|
|
179
|
-
* (Optional) AWS Server Side Encryption
|
|
180
|
-
* Defaults to undefined.
|
|
181
|
-
* If not set, encrypted buckets will fail to publish.
|
|
182
|
-
* https://docs.aws.amazon.com/AmazonS3/latest/userguide/specifying-s3-encryption.html
|
|
183
|
-
*/
|
|
184
|
-
sse?: 'aws:kms' | 'AES256';
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
|
-
| {
|
|
188
|
-
type: 'openStackSwift';
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
* Required when 'type' is set to openStackSwift
|
|
192
|
-
*/
|
|
193
|
-
openStackSwift?: {
|
|
194
|
-
/**
|
|
195
|
-
* (Required) Credentials used to access a storage bucket.
|
|
196
|
-
* @see https://docs.openstack.org/api-ref/identity/v3/?expanded=password-authentication-with-unscoped-authorization-detail#password-authentication-with-unscoped-authorization
|
|
197
|
-
* @visibility secret
|
|
198
|
-
*/
|
|
199
|
-
credentials: {
|
|
200
|
-
/**
|
|
201
|
-
* (Required) Application Credential ID
|
|
202
|
-
* @visibility secret
|
|
203
|
-
*/
|
|
204
|
-
id: string;
|
|
205
|
-
/**
|
|
206
|
-
* (Required) Application Credential Secret
|
|
207
|
-
* @visibility secret
|
|
208
|
-
*/
|
|
209
|
-
secret: string; // required
|
|
210
|
-
};
|
|
211
|
-
/**
|
|
212
|
-
* (Required) Cloud Storage Container Name
|
|
213
|
-
*/
|
|
214
|
-
containerName: string;
|
|
215
|
-
/**
|
|
216
|
-
* (Required) Auth url sometimes OpenStack uses different port check your OpenStack apis.
|
|
217
|
-
*/
|
|
218
|
-
authUrl: string;
|
|
219
|
-
/**
|
|
220
|
-
* (Required) Swift URL
|
|
221
|
-
*/
|
|
222
|
-
swiftUrl: string;
|
|
223
|
-
};
|
|
224
|
-
}
|
|
225
|
-
| {
|
|
226
|
-
type: 'azureBlobStorage';
|
|
227
|
-
|
|
228
|
-
/**
|
|
229
|
-
* Required when 'type' is set to azureBlobStorage
|
|
230
|
-
*/
|
|
231
|
-
azureBlobStorage?: {
|
|
232
|
-
/**
|
|
233
|
-
* (Optional) Connection string of the storage container.
|
|
234
|
-
* @visibility secret
|
|
235
|
-
*/
|
|
236
|
-
connectionString?: string;
|
|
237
|
-
/**
|
|
238
|
-
* (Optional) Credentials used to access a storage container.
|
|
239
|
-
* @visibility secret
|
|
240
|
-
*/
|
|
241
|
-
credentials?: {
|
|
242
|
-
/**
|
|
243
|
-
* Account access name
|
|
244
|
-
* @visibility secret
|
|
245
|
-
*/
|
|
246
|
-
accountName: string;
|
|
247
|
-
/**
|
|
248
|
-
* (Optional) Account secret primary key
|
|
249
|
-
* If not set, environment variables will be used to authenticate.
|
|
250
|
-
* @see https://docs.microsoft.com/en-us/azure/storage/common/storage-auth?toc=/azure/storage/blobs/toc.json
|
|
251
|
-
* @visibility secret
|
|
252
|
-
*/
|
|
253
|
-
accountKey?: string;
|
|
254
|
-
};
|
|
255
|
-
/**
|
|
256
|
-
* (Required) Cloud Storage Container Name
|
|
257
|
-
*/
|
|
258
|
-
containerName: string;
|
|
259
|
-
};
|
|
260
|
-
}
|
|
261
|
-
| {
|
|
262
|
-
type: 'googleGcs';
|
|
263
|
-
|
|
264
|
-
/**
|
|
265
|
-
* Required when 'type' is set to googleGcs
|
|
266
|
-
*/
|
|
267
|
-
googleGcs?: {
|
|
268
|
-
/**
|
|
269
|
-
* (Required) Cloud Storage Bucket Name
|
|
270
|
-
*/
|
|
271
|
-
bucketName: string;
|
|
272
|
-
/**
|
|
273
|
-
* (Optional) API key used to write to a storage bucket.
|
|
274
|
-
* If not set, environment variables will be used to authenticate.
|
|
275
|
-
* @see https://cloud.google.com/docs/authentication/production
|
|
276
|
-
* @visibility secret
|
|
277
|
-
*/
|
|
278
|
-
credentials?: string;
|
|
279
|
-
/**
|
|
280
|
-
* (Optional) GCP project ID that contains the bucket. Should be
|
|
281
|
-
* set if credentials is not set, or if the service account in
|
|
282
|
-
* the credentials belongs to a different project to the bucket.
|
|
283
|
-
*/
|
|
284
|
-
projectId?: string;
|
|
285
|
-
/**
|
|
286
|
-
* (Optional) Location in storage bucket to save files
|
|
287
|
-
* If not set, the default location will be the root of the storage bucket
|
|
288
|
-
*/
|
|
289
|
-
bucketRootPath?: string;
|
|
290
|
-
};
|
|
291
|
-
};
|
|
292
|
-
|
|
293
|
-
/**
|
|
294
|
-
* @example http://localhost:7007/api/techdocs
|
|
295
|
-
* Techdocs cache information
|
|
296
|
-
*/
|
|
297
|
-
cache?: {
|
|
298
|
-
/**
|
|
299
|
-
* The cache time-to-live for TechDocs sites, in milliseconds for a number or a human duration. Set this
|
|
300
|
-
* to a non-zero value to cache TechDocs sites and assets as they are
|
|
301
|
-
* read from storage.
|
|
302
|
-
*
|
|
303
|
-
* Note: you must also configure `backend.cache` appropriately as well,
|
|
304
|
-
* and to pass a PluginCacheManager instance to TechDocs Backend's
|
|
305
|
-
* createRouter method in your backend.
|
|
306
|
-
*/
|
|
307
|
-
ttl: number | HumanDuration | string;
|
|
308
|
-
|
|
309
|
-
/**
|
|
310
|
-
* The time (in milliseconds for a number or a human duration) that the TechDocs backend will wait for
|
|
311
|
-
* a cache service to respond before continuing on as though the cached
|
|
312
|
-
* object was not found (e.g. when the cache sercice is unavailable).
|
|
313
|
-
*
|
|
314
|
-
* Defaults to 1000 milliseconds.
|
|
315
|
-
*/
|
|
316
|
-
readTimeout?: number | HumanDuration | string;
|
|
317
|
-
};
|
|
318
|
-
|
|
319
|
-
/**
|
|
320
|
-
* (Optional and not recommended) Prior to version [0.x.y] of TechDocs, docs
|
|
321
|
-
* sites could only be accessed over paths with case-sensitive entity triplets
|
|
322
|
-
* e.g. (namespace/Kind/name). If you are upgrading from an older version of
|
|
323
|
-
* TechDocs and are unable to perform the necessary migration of files in your
|
|
324
|
-
* external storage, you can set this value to `true` to temporarily revert to
|
|
325
|
-
* the old, case-sensitive entity triplet behavior.
|
|
326
|
-
*/
|
|
327
|
-
legacyUseCaseSensitiveTripletPaths?: boolean;
|
|
328
|
-
};
|
|
329
|
-
}
|