@backstage/plugin-techdocs 1.17.7 → 1.17.8-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
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @backstage/plugin-techdocs
|
|
2
2
|
|
|
3
|
+
## 1.17.8-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 65c7f98: Fixed duplicate React key warnings when documentation entities share a name across different namespaces or kinds.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/plugin-catalog-react@3.2.0-next.0
|
|
10
|
+
- @backstage/ui@0.17.0-next.0
|
|
11
|
+
- @backstage/frontend-plugin-api@0.17.3-next.0
|
|
12
|
+
- @backstage/plugin-search-react@1.11.6-next.0
|
|
13
|
+
- @backstage/catalog-client@1.16.1-next.0
|
|
14
|
+
- @backstage/core-components@0.18.12-next.0
|
|
15
|
+
- @backstage/core-plugin-api@1.12.8-next.0
|
|
16
|
+
- @backstage/integration-react@1.2.20-next.0
|
|
17
|
+
- @backstage/plugin-auth-react@0.1.29-next.0
|
|
18
|
+
- @backstage/plugin-techdocs-react@1.3.13-next.0
|
|
19
|
+
|
|
3
20
|
## 1.17.7
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -0,0 +1,57 @@
|
|
|
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
|
+
"legacyUseCaseSensitiveTripletPaths": {
|
|
18
|
+
"type": "boolean",
|
|
19
|
+
"description": "Allows fallback to case-sensitive triplets in case of migration issues.",
|
|
20
|
+
"visibility": "frontend"
|
|
21
|
+
},
|
|
22
|
+
"sanitizer": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"properties": {
|
|
25
|
+
"allowedIframeHosts": {
|
|
26
|
+
"type": "array",
|
|
27
|
+
"items": {
|
|
28
|
+
"type": "string"
|
|
29
|
+
},
|
|
30
|
+
"description": "Allows iframe tag only for listed hosts Example: allowedIframeHosts: [\"example.com\"] this will allow all iframes with the host `example.com` in the src attribute",
|
|
31
|
+
"visibility": "frontend"
|
|
32
|
+
},
|
|
33
|
+
"allowedCustomElementTagNameRegExp": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"description": "Allows listed custom element tag name regex Example: allowedCustomElementTagNameRegExp: '^backstage-' this will allow all custom elements with tag name matching `^backstage-` like <backstage-custom-element /> etc.",
|
|
36
|
+
"visibility": "frontend"
|
|
37
|
+
},
|
|
38
|
+
"allowedCustomElementAttributeNameRegExp": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"description": "Allows listed custom element attribute name regex Example: allowedCustomElementAttributeNameRegExp: 'attribute1|attribute2' this will allow all custom element attributes matching `attribute1` or `attribute2` like <backstage-custom-element attribute1=\"yes\" attribute2/>",
|
|
41
|
+
"visibility": "frontend"
|
|
42
|
+
},
|
|
43
|
+
"additionalAllowedURIProtocols": {
|
|
44
|
+
"type": "array",
|
|
45
|
+
"items": {
|
|
46
|
+
"type": "string"
|
|
47
|
+
},
|
|
48
|
+
"description": "Allows listed protocols in attributes with URI values Example: additionalAllowedURIProtocols: ['vscode'] this will allow all attributes with URI values to have `vscode` protocol like `vscode://some/path` in addition to the default protocols matched by DOMPurify's IS_ALLOWED_URI RegExp:",
|
|
49
|
+
"visibility": "frontend"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"description": "Configuration options for the techdocs plugin"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InfoCardGrid.esm.js","sources":["../../../../src/home/components/Grids/InfoCardGrid.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport useAsync from 'react-use/esm/useAsync';\nimport { Entity, stringifyEntityRef } from '@backstage/catalog-model';\nimport { useApi, useRouteRef, configApiRef } from '@backstage/core-plugin-api';\nimport {\n ItemCardGrid,\n InfoCard,\n Link,\n Progress,\n} from '@backstage/core-components';\nimport {\n EntityRefPresentationSnapshot,\n entityPresentationApiRef,\n} from '@backstage/plugin-catalog-react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { rootDocsRouteRef } from '../../../routes';\nimport { toLowerMaybe } from '../../../helpers';\n\n/** @public */\nexport type InfoCardGridClassKey = 'linkSpacer' | 'readMoreLink';\n\nconst useStyles = makeStyles(\n theme => ({\n linkSpacer: {\n paddingTop: theme.spacing(0.2),\n },\n readMoreLink: {\n paddingTop: theme.spacing(0.2),\n },\n }),\n { name: 'BackstageInfoCardGrid' },\n);\n\n/**\n * Props for {@link InfoCardGrid}\n *\n * @public\n */\nexport type InfoCardGridProps = {\n entities: Entity[] | undefined;\n linkContent?: string | JSX.Element;\n linkDestination?: (entity: Entity) => string | undefined;\n};\n\n/**\n * Component which accepts a list of entities and renders a info card for each entity\n *\n * @public\n */\nexport const InfoCardGrid = (props: InfoCardGridProps) => {\n const { entities, linkContent, linkDestination } = props;\n const classes = useStyles();\n const getRouteToReaderPageFor = useRouteRef(rootDocsRouteRef);\n const config = useApi(configApiRef);\n const linkRoute = (entity: Entity) => {\n if (linkDestination) {\n const destination = linkDestination(entity);\n if (destination) {\n return destination;\n }\n }\n return getRouteToReaderPageFor({\n namespace: toLowerMaybe(entity.metadata.namespace ?? 'default', config),\n kind: toLowerMaybe(entity.kind, config),\n name: toLowerMaybe(entity.metadata.name, config),\n });\n };\n const entityPresentationApi = useApi(entityPresentationApiRef);\n const { value: entityRefToPresentation, loading } = useAsync(async () => {\n return new Map<string, EntityRefPresentationSnapshot>(\n await Promise.all(\n entities?.map(async entity => {\n const presentation = await entityPresentationApi.forEntity(entity)\n .promise;\n return [stringifyEntityRef(entity), presentation] as [\n string,\n EntityRefPresentationSnapshot,\n ];\n }) || [],\n ),\n );\n });\n if (loading) return <Progress />;\n if (!entities || !entities?.length) return null;\n return (\n <ItemCardGrid data-testid=\"info-card-container\">\n {entities.map(entity => (\n <InfoCard\n key={entity
|
|
1
|
+
{"version":3,"file":"InfoCardGrid.esm.js","sources":["../../../../src/home/components/Grids/InfoCardGrid.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport useAsync from 'react-use/esm/useAsync';\nimport { Entity, stringifyEntityRef } from '@backstage/catalog-model';\nimport { useApi, useRouteRef, configApiRef } from '@backstage/core-plugin-api';\nimport {\n ItemCardGrid,\n InfoCard,\n Link,\n Progress,\n} from '@backstage/core-components';\nimport {\n EntityRefPresentationSnapshot,\n entityPresentationApiRef,\n} from '@backstage/plugin-catalog-react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { rootDocsRouteRef } from '../../../routes';\nimport { toLowerMaybe } from '../../../helpers';\n\n/** @public */\nexport type InfoCardGridClassKey = 'linkSpacer' | 'readMoreLink';\n\nconst useStyles = makeStyles(\n theme => ({\n linkSpacer: {\n paddingTop: theme.spacing(0.2),\n },\n readMoreLink: {\n paddingTop: theme.spacing(0.2),\n },\n }),\n { name: 'BackstageInfoCardGrid' },\n);\n\n/**\n * Props for {@link InfoCardGrid}\n *\n * @public\n */\nexport type InfoCardGridProps = {\n entities: Entity[] | undefined;\n linkContent?: string | JSX.Element;\n linkDestination?: (entity: Entity) => string | undefined;\n};\n\n/**\n * Component which accepts a list of entities and renders a info card for each entity\n *\n * @public\n */\nexport const InfoCardGrid = (props: InfoCardGridProps) => {\n const { entities, linkContent, linkDestination } = props;\n const classes = useStyles();\n const getRouteToReaderPageFor = useRouteRef(rootDocsRouteRef);\n const config = useApi(configApiRef);\n const linkRoute = (entity: Entity) => {\n if (linkDestination) {\n const destination = linkDestination(entity);\n if (destination) {\n return destination;\n }\n }\n return getRouteToReaderPageFor({\n namespace: toLowerMaybe(entity.metadata.namespace ?? 'default', config),\n kind: toLowerMaybe(entity.kind, config),\n name: toLowerMaybe(entity.metadata.name, config),\n });\n };\n const entityPresentationApi = useApi(entityPresentationApiRef);\n const { value: entityRefToPresentation, loading } = useAsync(async () => {\n return new Map<string, EntityRefPresentationSnapshot>(\n await Promise.all(\n entities?.map(async entity => {\n const presentation = await entityPresentationApi.forEntity(entity)\n .promise;\n return [stringifyEntityRef(entity), presentation] as [\n string,\n EntityRefPresentationSnapshot,\n ];\n }) || [],\n ),\n );\n });\n if (loading) return <Progress />;\n if (!entities || !entities?.length) return null;\n return (\n <ItemCardGrid data-testid=\"info-card-container\">\n {entities.map(entity => (\n <InfoCard\n key={stringifyEntityRef(entity)}\n data-testid={entity?.metadata?.title}\n title={\n entityRefToPresentation?.get(stringifyEntityRef(entity))\n ?.primaryTitle\n }\n >\n <div>{entity?.metadata?.description}</div>\n <div className={classes.linkSpacer} />\n <Link\n to={linkRoute(entity)}\n className={classes.readMoreLink}\n data-testid=\"read-docs-link\"\n >\n {linkContent || 'Read Docs'}\n </Link>\n </InfoCard>\n ))}\n </ItemCardGrid>\n );\n};\n"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-techdocs",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.8-next.0",
|
|
4
4
|
"description": "The Backstage plugin that renders technical documentation for your components",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "frontend-plugin",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
},
|
|
60
60
|
"files": [
|
|
61
61
|
"dist",
|
|
62
|
-
"config.
|
|
62
|
+
"config.schema.json"
|
|
63
63
|
],
|
|
64
64
|
"scripts": {
|
|
65
65
|
"build": "backstage-cli package build",
|
|
@@ -71,23 +71,23 @@
|
|
|
71
71
|
"test": "backstage-cli package test"
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@backstage/catalog-client": "
|
|
75
|
-
"@backstage/catalog-model": "
|
|
76
|
-
"@backstage/config": "
|
|
77
|
-
"@backstage/core-components": "
|
|
78
|
-
"@backstage/core-plugin-api": "
|
|
79
|
-
"@backstage/errors": "
|
|
80
|
-
"@backstage/frontend-plugin-api": "
|
|
81
|
-
"@backstage/integration": "
|
|
82
|
-
"@backstage/integration-react": "
|
|
83
|
-
"@backstage/plugin-auth-react": "
|
|
84
|
-
"@backstage/plugin-catalog-react": "
|
|
85
|
-
"@backstage/plugin-search-common": "
|
|
86
|
-
"@backstage/plugin-search-react": "
|
|
87
|
-
"@backstage/plugin-techdocs-common": "
|
|
88
|
-
"@backstage/plugin-techdocs-react": "
|
|
89
|
-
"@backstage/theme": "
|
|
90
|
-
"@backstage/ui": "
|
|
74
|
+
"@backstage/catalog-client": "1.16.1-next.0",
|
|
75
|
+
"@backstage/catalog-model": "1.9.0",
|
|
76
|
+
"@backstage/config": "1.3.8",
|
|
77
|
+
"@backstage/core-components": "0.18.12-next.0",
|
|
78
|
+
"@backstage/core-plugin-api": "1.12.8-next.0",
|
|
79
|
+
"@backstage/errors": "1.3.1",
|
|
80
|
+
"@backstage/frontend-plugin-api": "0.17.3-next.0",
|
|
81
|
+
"@backstage/integration": "2.0.3",
|
|
82
|
+
"@backstage/integration-react": "1.2.20-next.0",
|
|
83
|
+
"@backstage/plugin-auth-react": "0.1.29-next.0",
|
|
84
|
+
"@backstage/plugin-catalog-react": "3.2.0-next.0",
|
|
85
|
+
"@backstage/plugin-search-common": "1.2.24",
|
|
86
|
+
"@backstage/plugin-search-react": "1.11.6-next.0",
|
|
87
|
+
"@backstage/plugin-techdocs-common": "0.1.1",
|
|
88
|
+
"@backstage/plugin-techdocs-react": "1.3.13-next.0",
|
|
89
|
+
"@backstage/theme": "0.7.3",
|
|
90
|
+
"@backstage/ui": "0.17.0-next.0",
|
|
91
91
|
"@material-ui/core": "^4.12.2",
|
|
92
92
|
"@material-ui/icons": "^4.9.1",
|
|
93
93
|
"@material-ui/lab": "4.0.0-alpha.61",
|
|
@@ -102,12 +102,12 @@
|
|
|
102
102
|
"zod": "^4.0.0"
|
|
103
103
|
},
|
|
104
104
|
"devDependencies": {
|
|
105
|
-
"@backstage/cli": "
|
|
106
|
-
"@backstage/core-app-api": "
|
|
107
|
-
"@backstage/dev-utils": "
|
|
108
|
-
"@backstage/plugin-catalog": "
|
|
109
|
-
"@backstage/plugin-techdocs-module-addons-contrib": "
|
|
110
|
-
"@backstage/test-utils": "
|
|
105
|
+
"@backstage/cli": "0.36.4-next.0",
|
|
106
|
+
"@backstage/core-app-api": "1.20.3-next.0",
|
|
107
|
+
"@backstage/dev-utils": "1.1.25-next.0",
|
|
108
|
+
"@backstage/plugin-catalog": "2.0.7-next.0",
|
|
109
|
+
"@backstage/plugin-techdocs-module-addons-contrib": "1.1.38-next.0",
|
|
110
|
+
"@backstage/test-utils": "1.7.20-next.0",
|
|
111
111
|
"@testing-library/dom": "^10.0.0",
|
|
112
112
|
"@testing-library/jest-dom": "^6.0.0",
|
|
113
113
|
"@testing-library/react": "^16.0.0",
|
|
@@ -129,6 +129,6 @@
|
|
|
129
129
|
"optional": true
|
|
130
130
|
}
|
|
131
131
|
},
|
|
132
|
-
"configSchema": "config.
|
|
132
|
+
"configSchema": "config.schema.json",
|
|
133
133
|
"module": "./dist/index.esm.js"
|
|
134
134
|
}
|
package/config.d.ts
DELETED
|
@@ -1,73 +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
|
-
export interface Config {
|
|
18
|
-
/**
|
|
19
|
-
* Configuration options for the techdocs plugin
|
|
20
|
-
* @see http://backstage.io/docs/features/techdocs/configuration
|
|
21
|
-
*/
|
|
22
|
-
techdocs?: {
|
|
23
|
-
/**
|
|
24
|
-
* Documentation building process depends on the builder attr
|
|
25
|
-
* @visibility frontend
|
|
26
|
-
*/
|
|
27
|
-
builder?: 'local' | 'external';
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Allows fallback to case-sensitive triplets in case of migration issues.
|
|
31
|
-
* @visibility frontend
|
|
32
|
-
* @see https://backstage.io/docs/features/techdocs/how-to-guides#how-to-migrate-from-techdocs-alpha-to-beta
|
|
33
|
-
*/
|
|
34
|
-
legacyUseCaseSensitiveTripletPaths?: boolean;
|
|
35
|
-
|
|
36
|
-
sanitizer?: {
|
|
37
|
-
/**
|
|
38
|
-
* Allows iframe tag only for listed hosts
|
|
39
|
-
* Example:
|
|
40
|
-
* allowedIframeHosts: ["example.com"]
|
|
41
|
-
* this will allow all iframes with the host `example.com` in the src attribute
|
|
42
|
-
* @visibility frontend
|
|
43
|
-
*/
|
|
44
|
-
allowedIframeHosts?: string[];
|
|
45
|
-
/**
|
|
46
|
-
* Allows listed custom element tag name regex
|
|
47
|
-
* Example:
|
|
48
|
-
* allowedCustomElementTagNameRegExp: '^backstage-'
|
|
49
|
-
* this will allow all custom elements with tag name matching `^backstage-` like <backstage-custom-element /> etc.
|
|
50
|
-
* @visibility frontend
|
|
51
|
-
*/
|
|
52
|
-
allowedCustomElementTagNameRegExp?: string;
|
|
53
|
-
/**
|
|
54
|
-
* Allows listed custom element attribute name regex
|
|
55
|
-
* Example:
|
|
56
|
-
* allowedCustomElementAttributeNameRegExp: 'attribute1|attribute2'
|
|
57
|
-
* this will allow all custom element attributes matching `attribute1` or `attribute2` like <backstage-custom-element attribute1="yes" attribute2/>
|
|
58
|
-
* @visibility frontend
|
|
59
|
-
*/
|
|
60
|
-
allowedCustomElementAttributeNameRegExp?: string;
|
|
61
|
-
/**
|
|
62
|
-
* Allows listed protocols in attributes with URI values
|
|
63
|
-
* Example:
|
|
64
|
-
* additionalAllowedURIProtocols: ['vscode']
|
|
65
|
-
* this will allow all attributes with URI values to have `vscode` protocol like `vscode://some/path` in addition to the default protocols
|
|
66
|
-
* matched by DOMPurify's IS_ALLOWED_URI RegExp:
|
|
67
|
-
* @see: https://raw.githubusercontent.com/cure53/DOMPurify/master/src/regexp.ts
|
|
68
|
-
* @visibility frontend
|
|
69
|
-
*/
|
|
70
|
-
additionalAllowedURIProtocols?: string[];
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
}
|