@backstage/plugin-techdocs 1.11.1-next.3 → 1.11.1
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 +31 -0
- package/dist/alpha.esm.js +2 -2
- package/dist/client.esm.js +1 -1
- package/dist/plugin.esm.js +2 -2
- package/dist/reader/components/useReaderState.esm.js +20 -9
- package/dist/reader/components/useReaderState.esm.js.map +1 -1
- package/dist/reader/transformers/html/transformer.esm.js +1 -1
- package/dist/reader/transformers/styles/transformer.esm.js +1 -1
- package/package.json +22 -22
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @backstage/plugin-techdocs
|
|
2
2
|
|
|
3
|
+
## 1.11.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 37a7810: Fixed an issue where `<TechDocsReaderPageContent />` would re-render infinitely under certain conditions.
|
|
8
|
+
- e937ae7: Fix an issue with index page of documentation site being re-rendered.
|
|
9
|
+
- 90246a9: Fix techdocs config schema for custom elements sanitizer
|
|
10
|
+
- 605bdc0: Avoid page re-rendering when clicking on anchor links in the same documentation page.
|
|
11
|
+
- 4f0cb89: Added DomPurify sanitizer configuration for custom elements implementing RFC https://github.com/backstage/backstage/issues/26988.
|
|
12
|
+
See https://backstage.io/docs/features/techdocs/how-to-guides#how-to-enable-custom-elements-in-techdocs for how to enable it in the configuration.
|
|
13
|
+
- f246178: Removed `canvas` dev dependency.
|
|
14
|
+
- 4a2f73a: Fix an issue that caused the current documentation page to be re-rendered when navigating to
|
|
15
|
+
another one.
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
- @backstage/config@1.3.0
|
|
18
|
+
- @backstage/theme@0.6.1
|
|
19
|
+
- @backstage/plugin-catalog-react@1.14.1
|
|
20
|
+
- @backstage/core-components@0.16.0
|
|
21
|
+
- @backstage/plugin-techdocs-react@1.2.10
|
|
22
|
+
- @backstage/catalog-model@1.7.1
|
|
23
|
+
- @backstage/core-compat-api@0.3.2
|
|
24
|
+
- @backstage/core-plugin-api@1.10.1
|
|
25
|
+
- @backstage/errors@1.2.5
|
|
26
|
+
- @backstage/frontend-plugin-api@0.9.1
|
|
27
|
+
- @backstage/integration@1.15.2
|
|
28
|
+
- @backstage/integration-react@1.2.1
|
|
29
|
+
- @backstage/plugin-auth-react@0.1.8
|
|
30
|
+
- @backstage/plugin-search-common@1.2.15
|
|
31
|
+
- @backstage/plugin-search-react@1.8.2
|
|
32
|
+
- @backstage/plugin-techdocs-common@0.1.0
|
|
33
|
+
|
|
3
34
|
## 1.11.1-next.3
|
|
4
35
|
|
|
5
36
|
### Patch Changes
|
package/dist/alpha.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import LibraryBooks from '@material-ui/icons/LibraryBooks';
|
|
3
|
-
import { ApiBlueprint, PageBlueprint,
|
|
4
|
-
import { createApiFactory,
|
|
3
|
+
import { ApiBlueprint, PageBlueprint, coreExtensionData, createExtensionInput, createExtension, NavItemBlueprint, createFrontendPlugin } from '@backstage/frontend-plugin-api';
|
|
4
|
+
import { createApiFactory, fetchApiRef, discoveryApiRef, configApiRef } from '@backstage/core-plugin-api';
|
|
5
5
|
import { compatWrapper, convertLegacyRouteRef, convertLegacyRouteRefs } from '@backstage/core-compat-api';
|
|
6
6
|
import { EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha';
|
|
7
7
|
import { SearchResultListItemBlueprint } from '@backstage/plugin-search-react/alpha';
|
package/dist/client.esm.js
CHANGED
package/dist/plugin.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { techdocsStorageApiRef, techdocsApiRef } from '@backstage/plugin-techdocs-react';
|
|
2
2
|
import { TechDocsStorageClient, TechDocsClient } from './client.esm.js';
|
|
3
|
-
import {
|
|
4
|
-
import { createPlugin, createApiFactory,
|
|
3
|
+
import { rootCatalogDocsRouteRef, rootDocsRouteRef, rootRouteRef } from './routes.esm.js';
|
|
4
|
+
import { createPlugin, createApiFactory, fetchApiRef, discoveryApiRef, configApiRef, createRoutableExtension } from '@backstage/core-plugin-api';
|
|
5
5
|
import { createSearchResultListItemExtension } from '@backstage/plugin-search-react';
|
|
6
6
|
|
|
7
7
|
const techdocsPlugin = createPlugin({
|
|
@@ -147,15 +147,26 @@ function useReaderState(kind, namespace, name, path) {
|
|
|
147
147
|
}),
|
|
148
148
|
[state.activeSyncState, state.content, state.contentLoading]
|
|
149
149
|
);
|
|
150
|
-
return
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
150
|
+
return useMemo(
|
|
151
|
+
() => ({
|
|
152
|
+
state: displayState,
|
|
153
|
+
contentReload,
|
|
154
|
+
path: state.path,
|
|
155
|
+
content: state.content,
|
|
156
|
+
contentErrorMessage: state.contentError?.toString(),
|
|
157
|
+
syncErrorMessage: state.syncError?.toString(),
|
|
158
|
+
buildLog: state.buildLog
|
|
159
|
+
}),
|
|
160
|
+
[
|
|
161
|
+
displayState,
|
|
162
|
+
contentReload,
|
|
163
|
+
state.path,
|
|
164
|
+
state.content,
|
|
165
|
+
state.contentError,
|
|
166
|
+
state.syncError,
|
|
167
|
+
state.buildLog
|
|
168
|
+
]
|
|
169
|
+
);
|
|
159
170
|
}
|
|
160
171
|
|
|
161
172
|
export { calculateDisplayState, reducer, useReaderState };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useReaderState.esm.js","sources":["../../../src/reader/components/useReaderState.ts"],"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 { useApi } from '@backstage/core-plugin-api';\nimport { useMemo, useReducer, useRef } from 'react';\nimport useAsync from 'react-use/esm/useAsync';\nimport useAsyncRetry from 'react-use/esm/useAsyncRetry';\nimport { techdocsStorageApiRef } from '@backstage/plugin-techdocs-react';\n\n/**\n * @public\n * A state representation that is used to configure the UI of <Reader />\n */\nexport type ContentStateTypes =\n /** There is nothing to display but a loading indicator */\n | 'CHECKING'\n\n /** There is no content yet -> present a full screen loading page */\n | 'INITIAL_BUILD'\n\n /** There is content, but the backend is about to update it */\n | 'CONTENT_STALE_REFRESHING'\n\n /** There is content, but after a reload, the content will be different */\n | 'CONTENT_STALE_READY'\n\n /** There is content, the backend tried to update it, but failed */\n | 'CONTENT_STALE_ERROR'\n\n /** There is nothing to see but a \"not found\" page. Is also shown on page load errors */\n | 'CONTENT_NOT_FOUND'\n\n /** There is only the latest and greatest content */\n | 'CONTENT_FRESH';\n\n/**\n * Calculate the state that should be reported to the display component.\n */\nexport function calculateDisplayState({\n contentLoading,\n content,\n activeSyncState,\n}: Pick<\n ReducerState,\n 'contentLoading' | 'content' | 'activeSyncState'\n>): ContentStateTypes {\n // we have nothing to display yet\n if (contentLoading) {\n return 'CHECKING';\n }\n\n // the build is ready, but it triggered a content reload and the content variable is not trusted\n if (activeSyncState === 'BUILD_READY_RELOAD') {\n return 'CHECKING';\n }\n\n // there is no content, but the sync process is still evaluating\n if (!content && activeSyncState === 'CHECKING') {\n return 'CHECKING';\n }\n\n // there is no content yet so we assume that we are building it for the first time\n if (!content && activeSyncState === 'BUILDING') {\n return 'INITIAL_BUILD';\n }\n\n // if there is still no content after building, it might just not exist\n if (!content) {\n return 'CONTENT_NOT_FOUND';\n }\n\n // we are still building, but we already show stale content\n if (activeSyncState === 'BUILDING') {\n return 'CONTENT_STALE_REFRESHING';\n }\n\n // the build is ready, but the content is still stale\n if (activeSyncState === 'BUILD_READY') {\n return 'CONTENT_STALE_READY';\n }\n\n // the build failed, but the content is still stale\n if (activeSyncState === 'ERROR') {\n return 'CONTENT_STALE_ERROR';\n }\n\n // seems like the content is up-to-date (or we don't know yet and the sync process is still evaluating in the background)\n return 'CONTENT_FRESH';\n}\n\n/**\n * The state of the synchronization task. It checks whether the docs are\n * up-to-date. If they aren't, it triggers a build.\n */\ntype SyncStates =\n /** Checking if it should be synced */\n | 'CHECKING'\n\n /** Building the documentation */\n | 'BUILDING'\n\n /** Finished building the documentation */\n | 'BUILD_READY'\n\n /**\n * Finished building the documentation and triggered a content reload.\n * This state is left toward UP_TO_DATE when the content loading has finished.\n */\n | 'BUILD_READY_RELOAD'\n\n /** No need for a sync. The content was already up-to-date. */\n | 'UP_TO_DATE'\n\n /** An error occurred */\n | 'ERROR';\n\ntype ReducerActions =\n | {\n type: 'sync';\n state: SyncStates;\n syncError?: Error;\n }\n | { type: 'contentLoading' }\n | {\n type: 'content';\n path?: string;\n content?: string;\n contentError?: Error;\n }\n | { type: 'buildLog'; log: string };\n\ntype ReducerState = {\n /**\n * The path of the current page\n */\n path: string;\n\n /**\n * The current sync state\n */\n activeSyncState: SyncStates;\n\n /**\n * If true, the content is downloading from the storage.\n */\n contentLoading: boolean;\n /**\n * The content that has been downloaded and should be displayed.\n */\n content?: string;\n\n contentError?: Error;\n syncError?: Error;\n\n /**\n * A list of log messages that were emitted by the build process.\n */\n buildLog: string[];\n};\n\nexport function reducer(\n oldState: ReducerState,\n action: ReducerActions,\n): ReducerState {\n const newState = { ...oldState };\n\n switch (action.type) {\n case 'sync':\n // reset the build log when a new check starts\n if (action.state === 'CHECKING') {\n newState.buildLog = [];\n }\n\n newState.activeSyncState = action.state;\n newState.syncError = action.syncError;\n break;\n\n case 'contentLoading':\n newState.contentLoading = true;\n\n // only reset errors but keep the old content until it is replaced by the 'content' action\n newState.contentError = undefined;\n break;\n\n case 'content':\n // only override the path if it is part of the action\n if (typeof action.path === 'string') {\n newState.path = action.path;\n }\n\n newState.contentLoading = false;\n newState.content = action.content;\n newState.contentError = action.contentError;\n break;\n\n case 'buildLog':\n newState.buildLog = newState.buildLog.concat(action.log);\n break;\n\n default:\n throw new Error();\n }\n\n // a content update loads fresh content so the build is updated to being up-to-date\n if (\n ['BUILD_READY', 'BUILD_READY_RELOAD'].includes(newState.activeSyncState) &&\n ['contentLoading', 'content'].includes(action.type)\n ) {\n newState.activeSyncState = 'UP_TO_DATE';\n newState.buildLog = [];\n }\n\n return newState;\n}\n/**\n * @public shared reader state\n */\nexport type ReaderState = {\n state: ContentStateTypes;\n path: string;\n contentReload: () => void;\n content?: string;\n contentErrorMessage?: string;\n syncErrorMessage?: string;\n buildLog: string[];\n};\n\nexport function useReaderState(\n kind: string,\n namespace: string,\n name: string,\n path: string,\n): ReaderState {\n const [state, dispatch] = useReducer(reducer, {\n activeSyncState: 'CHECKING',\n path,\n contentLoading: true,\n buildLog: [],\n });\n\n const techdocsStorageApi = useApi(techdocsStorageApiRef);\n\n // try to load the content. the function will fire events and we don't care for the return values\n const { retry: contentReload } = useAsyncRetry(async () => {\n dispatch({ type: 'contentLoading' });\n\n try {\n const entityDocs = await techdocsStorageApi.getEntityDocs(\n { kind, namespace, name },\n path,\n );\n\n // update content and path at the same time\n dispatch({ type: 'content', content: entityDocs, path });\n\n return entityDocs;\n } catch (e) {\n dispatch({ type: 'content', contentError: e, path });\n }\n\n return undefined;\n }, [techdocsStorageApi, kind, namespace, name, path]);\n\n // create a ref that holds the latest content. This provides a useAsync hook\n // with the latest content without restarting the useAsync hook.\n const contentRef = useRef<{ content?: string; reload: () => void }>({\n content: undefined,\n reload: () => {},\n });\n contentRef.current = { content: state.content, reload: contentReload };\n\n // try to derive the state. the function will fire events and we don't care for the return values\n useAsync(async () => {\n dispatch({ type: 'sync', state: 'CHECKING' });\n\n // should only switch to BUILDING if the request takes more than 1 seconds\n const buildingTimeout = setTimeout(() => {\n dispatch({ type: 'sync', state: 'BUILDING' });\n }, 1000);\n\n try {\n const result = await techdocsStorageApi.syncEntityDocs(\n {\n kind,\n namespace,\n name,\n },\n log => {\n dispatch({ type: 'buildLog', log });\n },\n );\n\n switch (result) {\n case 'updated':\n // if there was no content prior to building, retry the loading\n if (!contentRef.current.content) {\n contentRef.current.reload();\n dispatch({ type: 'sync', state: 'BUILD_READY_RELOAD' });\n } else {\n dispatch({ type: 'sync', state: 'BUILD_READY' });\n }\n break;\n case 'cached':\n dispatch({ type: 'sync', state: 'UP_TO_DATE' });\n break;\n\n default:\n dispatch({\n type: 'sync',\n state: 'ERROR',\n syncError: new Error('Unexpected return state'),\n });\n break;\n }\n } catch (e) {\n dispatch({ type: 'sync', state: 'ERROR', syncError: e });\n } finally {\n // Cancel the timer that sets the state \"BUILDING\"\n clearTimeout(buildingTimeout);\n }\n }, [kind, name, namespace, techdocsStorageApi, dispatch, contentRef]);\n\n const displayState = useMemo(\n () =>\n calculateDisplayState({\n activeSyncState: state.activeSyncState,\n contentLoading: state.contentLoading,\n content: state.content,\n }),\n [state.activeSyncState, state.content, state.contentLoading],\n );\n\n return {\n state: displayState,\n contentReload,\n path: state.path,\n content: state.content,\n contentErrorMessage: state.contentError?.toString(),\n syncErrorMessage: state.syncError?.toString(),\n buildLog: state.buildLog,\n };\n}\n"],"names":[],"mappings":";;;;;;AAmDO,SAAS,qBAAsB,CAAA;AAAA,EACpC,cAAA;AAAA,EACA,OAAA;AAAA,EACA;AACF,CAGsB,EAAA;AAEpB,EAAA,IAAI,cAAgB,EAAA;AAClB,IAAO,OAAA,UAAA;AAAA;AAIT,EAAA,IAAI,oBAAoB,oBAAsB,EAAA;AAC5C,IAAO,OAAA,UAAA;AAAA;AAIT,EAAI,IAAA,CAAC,OAAW,IAAA,eAAA,KAAoB,UAAY,EAAA;AAC9C,IAAO,OAAA,UAAA;AAAA;AAIT,EAAI,IAAA,CAAC,OAAW,IAAA,eAAA,KAAoB,UAAY,EAAA;AAC9C,IAAO,OAAA,eAAA;AAAA;AAIT,EAAA,IAAI,CAA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,YACP,IAAM,EAAA,MAAA;AAAA,YACN,KAAO,EAAA,OAAA;AAAA,YACP,SAAA,EAAW,IAAI,KAAA,CAAM,yBAAyB;AAAA,WAC/C,CAAA;AACD,UAAA;AAAA;AACJ,aACO,CAAG,EAAA;AACV,MAAA,QAAA,CAAS,EAAE,IAAM,EAAA,MAAA,EAAQ,OAAO,OAAS,EAAA,SAAA,EAAW,GAAG,CAAA;AAAA,KACvD,SAAA;AAEA,MAAA,YAAA,CAAa,eAAe,CAAA;AAAA;AAC9B,GACF,EAAG,CAAC,IAAM,EAAA,IAAA,EAAM,WAAW,kBAAoB,EAAA,QAAA,EAAU,UAAU,CAAC,CAAA;AAEpE,EAAA,MAAM,YAAe,GAAA,OAAA;AAAA,IACnB,MACE,qBAAsB,CAAA;AAAA,MACpB,iBAAiB,KAAM,CAAA,eAAA;AAAA,MACvB,gBAAgB,KAAM,CAAA,cAAA;AAAA,MACtB,SAAS,KAAM,CAAA;AAAA,KAChB,CAAA;AAAA,IACH,CAAC,KAAM,CAAA,eAAA,EAAiB,KAAM,CAAA,OAAA,EAAS,MAAM,cAAc;AAAA,GAC7D;AAEA,EAAO,OAAA;AAAA,IACL,KAAO,EAAA,YAAA;AAAA,IACP,aAAA;AAAA,IACA,MAAM,KAAM,CAAA,IAAA;AAAA,IACZ,SAAS,KAAM,CAAA,OAAA;AAAA,IACf,mBAAA,EAAqB,KAAM,CAAA,YAAA,EAAc,QAAS,EAAA;AAAA,IAClD,gBAAA,EAAkB,KAAM,CAAA,SAAA,EAAW,QAAS,EAAA;AAAA,IAC5C,UAAU,KAAM,CAAA;AAAA,GAClB;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"useReaderState.esm.js","sources":["../../../src/reader/components/useReaderState.ts"],"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 { useApi } from '@backstage/core-plugin-api';\nimport { useMemo, useReducer, useRef } from 'react';\nimport useAsync from 'react-use/esm/useAsync';\nimport useAsyncRetry from 'react-use/esm/useAsyncRetry';\nimport { techdocsStorageApiRef } from '@backstage/plugin-techdocs-react';\n\n/**\n * @public\n * A state representation that is used to configure the UI of <Reader />\n */\nexport type ContentStateTypes =\n /** There is nothing to display but a loading indicator */\n | 'CHECKING'\n\n /** There is no content yet -> present a full screen loading page */\n | 'INITIAL_BUILD'\n\n /** There is content, but the backend is about to update it */\n | 'CONTENT_STALE_REFRESHING'\n\n /** There is content, but after a reload, the content will be different */\n | 'CONTENT_STALE_READY'\n\n /** There is content, the backend tried to update it, but failed */\n | 'CONTENT_STALE_ERROR'\n\n /** There is nothing to see but a \"not found\" page. Is also shown on page load errors */\n | 'CONTENT_NOT_FOUND'\n\n /** There is only the latest and greatest content */\n | 'CONTENT_FRESH';\n\n/**\n * Calculate the state that should be reported to the display component.\n */\nexport function calculateDisplayState({\n contentLoading,\n content,\n activeSyncState,\n}: Pick<\n ReducerState,\n 'contentLoading' | 'content' | 'activeSyncState'\n>): ContentStateTypes {\n // we have nothing to display yet\n if (contentLoading) {\n return 'CHECKING';\n }\n\n // the build is ready, but it triggered a content reload and the content variable is not trusted\n if (activeSyncState === 'BUILD_READY_RELOAD') {\n return 'CHECKING';\n }\n\n // there is no content, but the sync process is still evaluating\n if (!content && activeSyncState === 'CHECKING') {\n return 'CHECKING';\n }\n\n // there is no content yet so we assume that we are building it for the first time\n if (!content && activeSyncState === 'BUILDING') {\n return 'INITIAL_BUILD';\n }\n\n // if there is still no content after building, it might just not exist\n if (!content) {\n return 'CONTENT_NOT_FOUND';\n }\n\n // we are still building, but we already show stale content\n if (activeSyncState === 'BUILDING') {\n return 'CONTENT_STALE_REFRESHING';\n }\n\n // the build is ready, but the content is still stale\n if (activeSyncState === 'BUILD_READY') {\n return 'CONTENT_STALE_READY';\n }\n\n // the build failed, but the content is still stale\n if (activeSyncState === 'ERROR') {\n return 'CONTENT_STALE_ERROR';\n }\n\n // seems like the content is up-to-date (or we don't know yet and the sync process is still evaluating in the background)\n return 'CONTENT_FRESH';\n}\n\n/**\n * The state of the synchronization task. It checks whether the docs are\n * up-to-date. If they aren't, it triggers a build.\n */\ntype SyncStates =\n /** Checking if it should be synced */\n | 'CHECKING'\n\n /** Building the documentation */\n | 'BUILDING'\n\n /** Finished building the documentation */\n | 'BUILD_READY'\n\n /**\n * Finished building the documentation and triggered a content reload.\n * This state is left toward UP_TO_DATE when the content loading has finished.\n */\n | 'BUILD_READY_RELOAD'\n\n /** No need for a sync. The content was already up-to-date. */\n | 'UP_TO_DATE'\n\n /** An error occurred */\n | 'ERROR';\n\ntype ReducerActions =\n | {\n type: 'sync';\n state: SyncStates;\n syncError?: Error;\n }\n | { type: 'contentLoading' }\n | {\n type: 'content';\n path?: string;\n content?: string;\n contentError?: Error;\n }\n | { type: 'buildLog'; log: string };\n\ntype ReducerState = {\n /**\n * The path of the current page\n */\n path: string;\n\n /**\n * The current sync state\n */\n activeSyncState: SyncStates;\n\n /**\n * If true, the content is downloading from the storage.\n */\n contentLoading: boolean;\n /**\n * The content that has been downloaded and should be displayed.\n */\n content?: string;\n\n contentError?: Error;\n syncError?: Error;\n\n /**\n * A list of log messages that were emitted by the build process.\n */\n buildLog: string[];\n};\n\nexport function reducer(\n oldState: ReducerState,\n action: ReducerActions,\n): ReducerState {\n const newState = { ...oldState };\n\n switch (action.type) {\n case 'sync':\n // reset the build log when a new check starts\n if (action.state === 'CHECKING') {\n newState.buildLog = [];\n }\n\n newState.activeSyncState = action.state;\n newState.syncError = action.syncError;\n break;\n\n case 'contentLoading':\n newState.contentLoading = true;\n\n // only reset errors but keep the old content until it is replaced by the 'content' action\n newState.contentError = undefined;\n break;\n\n case 'content':\n // only override the path if it is part of the action\n if (typeof action.path === 'string') {\n newState.path = action.path;\n }\n\n newState.contentLoading = false;\n newState.content = action.content;\n newState.contentError = action.contentError;\n break;\n\n case 'buildLog':\n newState.buildLog = newState.buildLog.concat(action.log);\n break;\n\n default:\n throw new Error();\n }\n\n // a content update loads fresh content so the build is updated to being up-to-date\n if (\n ['BUILD_READY', 'BUILD_READY_RELOAD'].includes(newState.activeSyncState) &&\n ['contentLoading', 'content'].includes(action.type)\n ) {\n newState.activeSyncState = 'UP_TO_DATE';\n newState.buildLog = [];\n }\n\n return newState;\n}\n/**\n * @public shared reader state\n */\nexport type ReaderState = {\n state: ContentStateTypes;\n path: string;\n contentReload: () => void;\n content?: string;\n contentErrorMessage?: string;\n syncErrorMessage?: string;\n buildLog: string[];\n};\n\nexport function useReaderState(\n kind: string,\n namespace: string,\n name: string,\n path: string,\n): ReaderState {\n const [state, dispatch] = useReducer(reducer, {\n activeSyncState: 'CHECKING',\n path,\n contentLoading: true,\n buildLog: [],\n });\n\n const techdocsStorageApi = useApi(techdocsStorageApiRef);\n\n // try to load the content. the function will fire events and we don't care for the return values\n const { retry: contentReload } = useAsyncRetry(async () => {\n dispatch({ type: 'contentLoading' });\n\n try {\n const entityDocs = await techdocsStorageApi.getEntityDocs(\n { kind, namespace, name },\n path,\n );\n\n // update content and path at the same time\n dispatch({ type: 'content', content: entityDocs, path });\n\n return entityDocs;\n } catch (e) {\n dispatch({ type: 'content', contentError: e, path });\n }\n\n return undefined;\n }, [techdocsStorageApi, kind, namespace, name, path]);\n\n // create a ref that holds the latest content. This provides a useAsync hook\n // with the latest content without restarting the useAsync hook.\n const contentRef = useRef<{ content?: string; reload: () => void }>({\n content: undefined,\n reload: () => {},\n });\n contentRef.current = { content: state.content, reload: contentReload };\n\n // try to derive the state. the function will fire events and we don't care for the return values\n useAsync(async () => {\n dispatch({ type: 'sync', state: 'CHECKING' });\n\n // should only switch to BUILDING if the request takes more than 1 seconds\n const buildingTimeout = setTimeout(() => {\n dispatch({ type: 'sync', state: 'BUILDING' });\n }, 1000);\n\n try {\n const result = await techdocsStorageApi.syncEntityDocs(\n {\n kind,\n namespace,\n name,\n },\n log => {\n dispatch({ type: 'buildLog', log });\n },\n );\n\n switch (result) {\n case 'updated':\n // if there was no content prior to building, retry the loading\n if (!contentRef.current.content) {\n contentRef.current.reload();\n dispatch({ type: 'sync', state: 'BUILD_READY_RELOAD' });\n } else {\n dispatch({ type: 'sync', state: 'BUILD_READY' });\n }\n break;\n case 'cached':\n dispatch({ type: 'sync', state: 'UP_TO_DATE' });\n break;\n\n default:\n dispatch({\n type: 'sync',\n state: 'ERROR',\n syncError: new Error('Unexpected return state'),\n });\n break;\n }\n } catch (e) {\n dispatch({ type: 'sync', state: 'ERROR', syncError: e });\n } finally {\n // Cancel the timer that sets the state \"BUILDING\"\n clearTimeout(buildingTimeout);\n }\n }, [kind, name, namespace, techdocsStorageApi, dispatch, contentRef]);\n\n const displayState = useMemo(\n () =>\n calculateDisplayState({\n activeSyncState: state.activeSyncState,\n contentLoading: state.contentLoading,\n content: state.content,\n }),\n [state.activeSyncState, state.content, state.contentLoading],\n );\n\n return useMemo(\n () => ({\n state: displayState,\n contentReload,\n path: state.path,\n content: state.content,\n contentErrorMessage: state.contentError?.toString(),\n syncErrorMessage: state.syncError?.toString(),\n buildLog: state.buildLog,\n }),\n [\n displayState,\n contentReload,\n state.path,\n state.content,\n state.contentError,\n state.syncError,\n state.buildLog,\n ],\n );\n}\n"],"names":[],"mappings":";;;;;;AAmDO,SAAS,qBAAsB,CAAA;AAAA,EACpC,cAAA;AAAA,EACA,OAAA;AAAA,EACA;AACF,CAGsB,EAAA;AAEpB,EAAA,IAAI,cAAgB,EAAA;AAClB,IAAO,OAAA,UAAA;AAAA;AAIT,EAAA,IAAI,oBAAoB,oBAAsB,EAAA;AAC5C,IAAO,OAAA,UAAA;AAAA;AAIT,EAAI,IAAA,CAAC,OAAW,IAAA,eAAA,KAA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aAAA;AAAA,MACA,KAAM,CAAA,IAAA;AAAA,MACN,KAAM,CAAA,OAAA;AAAA,MACN,KAAM,CAAA,YAAA;AAAA,MACN,KAAM,CAAA,SAAA;AAAA,MACN,KAAM,CAAA;AAAA;AACR,GACF;AACF;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import DOMPurify from 'dompurify';
|
|
2
|
-
import {
|
|
2
|
+
import { useMemo, useCallback } from 'react';
|
|
3
3
|
import { useApi, configApiRef } from '@backstage/core-plugin-api';
|
|
4
4
|
import { removeUnsafeLinks } from './hooks/links.esm.js';
|
|
5
5
|
import { removeUnsafeIframes } from './hooks/iframes.esm.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-techdocs",
|
|
3
|
-
"version": "1.11.1
|
|
3
|
+
"version": "1.11.1",
|
|
4
4
|
"description": "The Backstage plugin that renders technical documentation for your components",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "frontend-plugin",
|
|
@@ -68,22 +68,22 @@
|
|
|
68
68
|
"test": "backstage-cli package test"
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@backstage/catalog-model": "1.7.
|
|
72
|
-
"@backstage/config": "1.
|
|
73
|
-
"@backstage/core-compat-api": "0.3.2
|
|
74
|
-
"@backstage/core-components": "0.16.0
|
|
75
|
-
"@backstage/core-plugin-api": "1.10.
|
|
76
|
-
"@backstage/errors": "1.2.
|
|
77
|
-
"@backstage/frontend-plugin-api": "0.9.1
|
|
78
|
-
"@backstage/integration": "1.15.
|
|
79
|
-
"@backstage/integration-react": "1.2.
|
|
80
|
-
"@backstage/plugin-auth-react": "0.1.8
|
|
81
|
-
"@backstage/plugin-catalog-react": "1.14.1
|
|
82
|
-
"@backstage/plugin-search-common": "1.2.
|
|
83
|
-
"@backstage/plugin-search-react": "1.8.2
|
|
84
|
-
"@backstage/plugin-techdocs-common": "0.1.0",
|
|
85
|
-
"@backstage/plugin-techdocs-react": "1.2.10
|
|
86
|
-
"@backstage/theme": "0.6.1
|
|
71
|
+
"@backstage/catalog-model": "^1.7.1",
|
|
72
|
+
"@backstage/config": "^1.3.0",
|
|
73
|
+
"@backstage/core-compat-api": "^0.3.2",
|
|
74
|
+
"@backstage/core-components": "^0.16.0",
|
|
75
|
+
"@backstage/core-plugin-api": "^1.10.1",
|
|
76
|
+
"@backstage/errors": "^1.2.5",
|
|
77
|
+
"@backstage/frontend-plugin-api": "^0.9.1",
|
|
78
|
+
"@backstage/integration": "^1.15.2",
|
|
79
|
+
"@backstage/integration-react": "^1.2.1",
|
|
80
|
+
"@backstage/plugin-auth-react": "^0.1.8",
|
|
81
|
+
"@backstage/plugin-catalog-react": "^1.14.1",
|
|
82
|
+
"@backstage/plugin-search-common": "^1.2.15",
|
|
83
|
+
"@backstage/plugin-search-react": "^1.8.2",
|
|
84
|
+
"@backstage/plugin-techdocs-common": "^0.1.0",
|
|
85
|
+
"@backstage/plugin-techdocs-react": "^1.2.10",
|
|
86
|
+
"@backstage/theme": "^0.6.1",
|
|
87
87
|
"@material-ui/core": "^4.12.2",
|
|
88
88
|
"@material-ui/icons": "^4.9.1",
|
|
89
89
|
"@material-ui/lab": "4.0.0-alpha.61",
|
|
@@ -97,11 +97,11 @@
|
|
|
97
97
|
"react-use": "^17.2.4"
|
|
98
98
|
},
|
|
99
99
|
"devDependencies": {
|
|
100
|
-
"@backstage/cli": "0.29.0
|
|
101
|
-
"@backstage/core-app-api": "1.15.
|
|
102
|
-
"@backstage/dev-utils": "1.1.3
|
|
103
|
-
"@backstage/plugin-techdocs-module-addons-contrib": "1.1.17
|
|
104
|
-
"@backstage/test-utils": "1.7.1
|
|
100
|
+
"@backstage/cli": "^0.29.0",
|
|
101
|
+
"@backstage/core-app-api": "^1.15.2",
|
|
102
|
+
"@backstage/dev-utils": "^1.1.3",
|
|
103
|
+
"@backstage/plugin-techdocs-module-addons-contrib": "^1.1.17",
|
|
104
|
+
"@backstage/test-utils": "^1.7.1",
|
|
105
105
|
"@testing-library/dom": "^10.0.0",
|
|
106
106
|
"@testing-library/jest-dom": "^6.0.0",
|
|
107
107
|
"@testing-library/react": "^16.0.0",
|