@backstage/plugin-techdocs 0.15.0 → 0.15.1-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,18 @@
1
1
  # @backstage/plugin-techdocs
2
2
 
3
+ ## 0.15.1-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 7a1dbe6ce9: The panels of `TechDocsCustomHome` now use the `useEntityOwnership` hook to resolve ownership when the `'ownedByUser'` filter predicate is used.
8
+ - Updated dependencies
9
+ - @backstage/plugin-catalog@0.10.0-next.0
10
+ - @backstage/plugin-catalog-react@0.9.0-next.0
11
+ - @backstage/core-components@0.9.1-next.0
12
+ - @backstage/catalog-model@0.13.0-next.0
13
+ - @backstage/plugin-search@0.7.3-next.0
14
+ - @backstage/integration-react@0.1.25-next.0
15
+
3
16
  ## 0.15.0
4
17
 
5
18
  ### Minor Changes
@@ -1,11 +1,10 @@
1
1
  import React, { useState } from 'react';
2
2
  import useAsync from 'react-use/lib/useAsync';
3
3
  import { makeStyles } from '@material-ui/core';
4
- import { catalogApiRef, CATALOG_FILTER_EXISTS, isOwnerOf } from '@backstage/plugin-catalog-react';
5
- import { parseEntityRef, DEFAULT_NAMESPACE } from '@backstage/catalog-model';
4
+ import { catalogApiRef, CATALOG_FILTER_EXISTS, useEntityOwnership } from '@backstage/plugin-catalog-react';
6
5
  import { TechDocsPageWrapper, DocsTable, DocsCardGrid } from '../index.esm.js';
7
6
  import { Content, Progress, WarningPanel, CodeSnippet, HeaderTabs, ContentHeader, SupportButton } from '@backstage/core-components';
8
- import { useApi, identityApiRef } from '@backstage/core-plugin-api';
7
+ import { useApi } from '@backstage/core-plugin-api';
9
8
  import '@backstage/errors';
10
9
  import 'event-source-polyfill';
11
10
  import 'react-router-dom';
@@ -26,6 +25,7 @@ import '@material-ui/lab';
26
25
  import '@material-ui/icons/Close';
27
26
  import 'react-use/lib/useAsyncRetry';
28
27
  import '@material-ui/icons/Code';
28
+ import '@backstage/catalog-model';
29
29
  import 'react-use/lib/useCopyToClipboard';
30
30
  import 'lodash';
31
31
  import '@material-ui/icons/Share';
@@ -50,14 +50,14 @@ const CustomPanel = ({
50
50
  }
51
51
  });
52
52
  const classes = useStyles();
53
- const { value: user } = useOwnUser();
53
+ const { loading: loadingOwnership, isOwnedEntity } = useEntityOwnership();
54
54
  const Panel = panels[config.panelType];
55
55
  const shownEntities = entities.filter((entity) => {
56
56
  if (config.filterPredicate === "ownedByUser") {
57
- if (!user) {
57
+ if (loadingOwnership) {
58
58
  return false;
59
59
  }
60
- return isOwnerOf(user, entity);
60
+ return isOwnedEntity(entity);
61
61
  }
62
62
  return typeof config.filterPredicate === "function" && config.filterPredicate(entity);
63
63
  });
@@ -127,17 +127,6 @@ const TechDocsCustomHome = (props) => {
127
127
  index
128
128
  }))));
129
129
  };
130
- function useOwnUser() {
131
- const catalogApi = useApi(catalogApiRef);
132
- const identityApi = useApi(identityApiRef);
133
- return useAsync(async () => {
134
- const identity = await identityApi.getBackstageIdentity();
135
- return catalogApi.getEntityByRef(parseEntityRef(identity.userEntityRef, {
136
- defaultKind: "User",
137
- defaultNamespace: DEFAULT_NAMESPACE
138
- }));
139
- }, [catalogApi, identityApi]);
140
- }
141
130
 
142
131
  export { TechDocsCustomHome };
143
- //# sourceMappingURL=TechDocsCustomHome-4e5e8594.esm.js.map
132
+ //# sourceMappingURL=TechDocsCustomHome-a4f542cd.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TechDocsCustomHome-a4f542cd.esm.js","sources":["../../src/home/components/TechDocsCustomHome.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 React, { useState } from 'react';\nimport useAsync from 'react-use/lib/useAsync';\nimport { makeStyles } from '@material-ui/core';\nimport { CSSProperties } from '@material-ui/styles';\nimport {\n CATALOG_FILTER_EXISTS,\n catalogApiRef,\n CatalogApi,\n useEntityOwnership,\n} from '@backstage/plugin-catalog-react';\nimport { Entity } from '@backstage/catalog-model';\nimport { DocsTable } from './Tables';\nimport { DocsCardGrid } from './Grids';\nimport { TechDocsPageWrapper } from './TechDocsPageWrapper';\n\nimport {\n CodeSnippet,\n Content,\n HeaderTabs,\n Progress,\n WarningPanel,\n SupportButton,\n ContentHeader,\n} from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\n\nconst panels = {\n DocsTable: DocsTable,\n DocsCardGrid: DocsCardGrid,\n};\n\n/**\n * Available panel types\n *\n * @public\n */\nexport type PanelType = 'DocsCardGrid' | 'DocsTable';\n\n/**\n * Type representing a TechDocsCustomHome panel.\n *\n * @public\n */\nexport interface PanelConfig {\n title: string;\n description: string;\n panelType: PanelType;\n panelCSS?: CSSProperties;\n filterPredicate: ((entity: Entity) => boolean) | string;\n}\n\n/**\n * Type representing a TechDocsCustomHome tab.\n *\n * @public\n */\nexport interface TabConfig {\n label: string;\n panels: PanelConfig[];\n}\n\n/**\n * Type representing a list of TechDocsCustomHome tabs.\n *\n * @public\n */\nexport type TabsConfig = TabConfig[];\n\nconst CustomPanel = ({\n config,\n entities,\n index,\n}: {\n config: PanelConfig;\n entities: Entity[];\n index: number;\n}) => {\n const useStyles = makeStyles({\n panelContainer: {\n marginBottom: '2rem',\n ...(config.panelCSS ? config.panelCSS : {}),\n },\n });\n const classes = useStyles();\n const { loading: loadingOwnership, isOwnedEntity } = useEntityOwnership();\n\n const Panel = panels[config.panelType];\n\n const shownEntities = entities.filter(entity => {\n if (config.filterPredicate === 'ownedByUser') {\n if (loadingOwnership) {\n return false;\n }\n return isOwnedEntity(entity);\n }\n\n return (\n typeof config.filterPredicate === 'function' &&\n config.filterPredicate(entity)\n );\n });\n\n return (\n <>\n <ContentHeader title={config.title} description={config.description}>\n {index === 0 ? (\n <SupportButton>\n Discover documentation in your ecosystem.\n </SupportButton>\n ) : null}\n </ContentHeader>\n <div className={classes.panelContainer}>\n <Panel data-testid=\"techdocs-custom-panel\" entities={shownEntities} />\n </div>\n </>\n );\n};\n\n/**\n * Props for {@link TechDocsCustomHome}\n *\n * @public\n */\nexport type TechDocsCustomHomeProps = {\n tabsConfig: TabsConfig;\n};\n\nexport const TechDocsCustomHome = (props: TechDocsCustomHomeProps) => {\n const { tabsConfig } = props;\n const [selectedTab, setSelectedTab] = useState<number>(0);\n const catalogApi: CatalogApi = useApi(catalogApiRef);\n\n const {\n value: entities,\n loading,\n error,\n } = useAsync(async () => {\n const response = await catalogApi.getEntities({\n filter: {\n 'metadata.annotations.backstage.io/techdocs-ref': CATALOG_FILTER_EXISTS,\n },\n fields: [\n 'apiVersion',\n 'kind',\n 'metadata',\n 'relations',\n 'spec.owner',\n 'spec.type',\n ],\n });\n return response.items.filter((entity: Entity) => {\n return !!entity.metadata.annotations?.['backstage.io/techdocs-ref'];\n });\n });\n\n const currentTabConfig = tabsConfig[selectedTab];\n\n if (loading) {\n return (\n <TechDocsPageWrapper>\n <Content>\n <Progress />\n </Content>\n </TechDocsPageWrapper>\n );\n }\n\n if (error) {\n return (\n <TechDocsPageWrapper>\n <Content>\n <WarningPanel\n severity=\"error\"\n title=\"Could not load available documentation.\"\n >\n <CodeSnippet language=\"text\" text={error.toString()} />\n </WarningPanel>\n </Content>\n </TechDocsPageWrapper>\n );\n }\n\n return (\n <TechDocsPageWrapper>\n <HeaderTabs\n selectedIndex={selectedTab}\n onChange={index => setSelectedTab(index)}\n tabs={tabsConfig.map(({ label }, index) => ({\n id: index.toString(),\n label,\n }))}\n />\n <Content data-testid=\"techdocs-content\">\n {currentTabConfig.panels.map((config, index) => (\n <CustomPanel\n key={index}\n config={config}\n entities={!!entities ? entities : []}\n index={index}\n />\n ))}\n </Content>\n </TechDocsPageWrapper>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,MAAM,SAAS;AAAA,EACb;AAAA,EACA;AAAA;AAwCF,MAAM,cAAc,CAAC;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,MAKI;AACJ,QAAM,YAAY,WAAW;AAAA,IAC3B,gBAAgB;AAAA,MACd,cAAc;AAAA,SACV,OAAO,WAAW,OAAO,WAAW;AAAA;AAAA;AAG5C,QAAM,UAAU;AAChB,QAAM,EAAE,SAAS,kBAAkB,kBAAkB;AAErD,QAAM,QAAQ,OAAO,OAAO;AAE5B,QAAM,gBAAgB,SAAS,OAAO,YAAU;AAC9C,QAAI,OAAO,oBAAoB,eAAe;AAC5C,UAAI,kBAAkB;AACpB,eAAO;AAAA;AAET,aAAO,cAAc;AAAA;AAGvB,WACE,OAAO,OAAO,oBAAoB,cAClC,OAAO,gBAAgB;AAAA;AAI3B,uGAEK,eAAD;AAAA,IAAe,OAAO,OAAO;AAAA,IAAO,aAAa,OAAO;AAAA,KACrD,UAAU,wCACR,eAAD,MAAe,+CAGb,2CAEL,OAAD;AAAA,IAAK,WAAW,QAAQ;AAAA,yCACrB,OAAD;AAAA,IAAO,eAAY;AAAA,IAAwB,UAAU;AAAA;AAAA;MAehD,qBAAqB,CAAC,UAAmC;AACpE,QAAM,EAAE,eAAe;AACvB,QAAM,CAAC,aAAa,kBAAkB,SAAiB;AACvD,QAAM,aAAyB,OAAO;AAEtC,QAAM;AAAA,IACJ,OAAO;AAAA,IACP;AAAA,IACA;AAAA,MACE,SAAS,YAAY;AACvB,UAAM,WAAW,MAAM,WAAW,YAAY;AAAA,MAC5C,QAAQ;AAAA,QACN,kDAAkD;AAAA;AAAA,MAEpD,QAAQ;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA;AAGJ,WAAO,SAAS,MAAM,OAAO,CAAC,WAAmB;AAtKrD;AAuKM,aAAO,CAAC,eAAQ,SAAS,gBAAhB,mBAA8B;AAAA;AAAA;AAI3C,QAAM,mBAAmB,WAAW;AAEpC,MAAI,SAAS;AACX,+CACG,qBAAD,0CACG,SAAD,0CACG,UAAD;AAAA;AAMR,MAAI,OAAO;AACT,+CACG,qBAAD,0CACG,SAAD,0CACG,cAAD;AAAA,MACE,UAAS;AAAA,MACT,OAAM;AAAA,2CAEL,aAAD;AAAA,MAAa,UAAS;AAAA,MAAO,MAAM,MAAM;AAAA;AAAA;AAOnD,6CACG,qBAAD,0CACG,YAAD;AAAA,IACE,eAAe;AAAA,IACf,UAAU,WAAS,eAAe;AAAA,IAClC,MAAM,WAAW,IAAI,CAAC,EAAE,SAAS;AAAW,MAC1C,IAAI,MAAM;AAAA,MACV;AAAA;AAAA,0CAGH,SAAD;AAAA,IAAS,eAAY;AAAA,KAClB,iBAAiB,OAAO,IAAI,CAAC,QAAQ,8CACnC,aAAD;AAAA,IACE,KAAK;AAAA,IACL;AAAA,IACA,UAAU,CAAC,CAAC,WAAW,WAAW;AAAA,IAClC;AAAA;AAAA;;;;"}
package/dist/index.esm.js CHANGED
@@ -2051,7 +2051,7 @@ const EntityTechdocsContent = techdocsPlugin.provide(createRoutableExtension({
2051
2051
  }));
2052
2052
  const TechDocsCustomHome = techdocsPlugin.provide(createRoutableExtension({
2053
2053
  name: "TechDocsCustomHome",
2054
- component: () => import('./esm/TechDocsCustomHome-4e5e8594.esm.js').then((m) => m.TechDocsCustomHome),
2054
+ component: () => import('./esm/TechDocsCustomHome-a4f542cd.esm.js').then((m) => m.TechDocsCustomHome),
2055
2055
  mountPoint: rootRouteRef
2056
2056
  }));
2057
2057
  const TechDocsIndexPage$2 = techdocsPlugin.provide(createRoutableExtension({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@backstage/plugin-techdocs",
3
3
  "description": "The Backstage plugin that renders technical documentation for your components",
4
- "version": "0.15.0",
4
+ "version": "0.15.1-next.0",
5
5
  "main": "dist/index.esm.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "license": "Apache-2.0",
@@ -35,16 +35,16 @@
35
35
  "clean": "backstage-cli package clean"
36
36
  },
37
37
  "dependencies": {
38
- "@backstage/catalog-model": "^0.12.0",
38
+ "@backstage/catalog-model": "^0.13.0-next.0",
39
39
  "@backstage/config": "^0.1.15",
40
- "@backstage/core-components": "^0.9.0",
40
+ "@backstage/core-components": "^0.9.1-next.0",
41
41
  "@backstage/core-plugin-api": "^0.8.0",
42
42
  "@backstage/errors": "^0.2.2",
43
43
  "@backstage/integration": "^0.8.0",
44
- "@backstage/integration-react": "^0.1.24",
45
- "@backstage/plugin-catalog": "^0.9.1",
46
- "@backstage/plugin-catalog-react": "^0.8.0",
47
- "@backstage/plugin-search": "^0.7.2",
44
+ "@backstage/integration-react": "^0.1.25-next.0",
45
+ "@backstage/plugin-catalog": "^0.10.0-next.0",
46
+ "@backstage/plugin-catalog-react": "^0.9.0-next.0",
47
+ "@backstage/plugin-search": "^0.7.3-next.0",
48
48
  "@backstage/theme": "^0.2.15",
49
49
  "@material-ui/core": "^4.12.2",
50
50
  "@material-ui/icons": "^4.9.1",
@@ -65,9 +65,9 @@
65
65
  "react-dom": "^16.13.1 || ^17.0.0"
66
66
  },
67
67
  "devDependencies": {
68
- "@backstage/cli": "^0.15.0",
68
+ "@backstage/cli": "^0.15.2-next.0",
69
69
  "@backstage/core-app-api": "^0.6.0",
70
- "@backstage/dev-utils": "^0.2.24",
70
+ "@backstage/dev-utils": "^0.2.25-next.0",
71
71
  "@backstage/test-utils": "^0.3.0",
72
72
  "@testing-library/jest-dom": "^5.10.1",
73
73
  "@testing-library/react": "^11.2.5",
@@ -85,5 +85,5 @@
85
85
  "config.d.ts"
86
86
  ],
87
87
  "configSchema": "config.d.ts",
88
- "gitHead": "04bb0dd824b78f6b57dac62c3015e681f094045c"
88
+ "gitHead": "e90d3ed129ebfce978f1adfa40c1dc2cef3f7e65"
89
89
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"TechDocsCustomHome-4e5e8594.esm.js","sources":["../../src/home/components/TechDocsCustomHome.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 React, { useState } from 'react';\nimport useAsync, { AsyncState } from 'react-use/lib/useAsync';\nimport { makeStyles } from '@material-ui/core';\nimport { CSSProperties } from '@material-ui/styles';\nimport {\n CATALOG_FILTER_EXISTS,\n catalogApiRef,\n CatalogApi,\n isOwnerOf,\n} from '@backstage/plugin-catalog-react';\nimport {\n DEFAULT_NAMESPACE,\n Entity,\n parseEntityRef,\n UserEntity,\n} from '@backstage/catalog-model';\nimport { DocsTable } from './Tables';\nimport { DocsCardGrid } from './Grids';\nimport { TechDocsPageWrapper } from './TechDocsPageWrapper';\n\nimport {\n CodeSnippet,\n Content,\n HeaderTabs,\n Progress,\n WarningPanel,\n SupportButton,\n ContentHeader,\n} from '@backstage/core-components';\n\nimport { identityApiRef, useApi } from '@backstage/core-plugin-api';\n\nconst panels = {\n DocsTable: DocsTable,\n DocsCardGrid: DocsCardGrid,\n};\n\n/**\n * Available panel types\n *\n * @public\n */\nexport type PanelType = 'DocsCardGrid' | 'DocsTable';\n\n/**\n * Type representing a TechDocsCustomHome panel.\n *\n * @public\n */\nexport interface PanelConfig {\n title: string;\n description: string;\n panelType: PanelType;\n panelCSS?: CSSProperties;\n filterPredicate: ((entity: Entity) => boolean) | string;\n}\n\n/**\n * Type representing a TechDocsCustomHome tab.\n *\n * @public\n */\nexport interface TabConfig {\n label: string;\n panels: PanelConfig[];\n}\n\n/**\n * Type representing a list of TechDocsCustomHome tabs.\n *\n * @public\n */\nexport type TabsConfig = TabConfig[];\n\nconst CustomPanel = ({\n config,\n entities,\n index,\n}: {\n config: PanelConfig;\n entities: Entity[];\n index: number;\n}) => {\n const useStyles = makeStyles({\n panelContainer: {\n marginBottom: '2rem',\n ...(config.panelCSS ? config.panelCSS : {}),\n },\n });\n const classes = useStyles();\n const { value: user } = useOwnUser();\n\n const Panel = panels[config.panelType];\n\n const shownEntities = entities.filter(entity => {\n if (config.filterPredicate === 'ownedByUser') {\n if (!user) {\n return false;\n }\n return isOwnerOf(user, entity);\n }\n\n return (\n typeof config.filterPredicate === 'function' &&\n config.filterPredicate(entity)\n );\n });\n\n return (\n <>\n <ContentHeader title={config.title} description={config.description}>\n {index === 0 ? (\n <SupportButton>\n Discover documentation in your ecosystem.\n </SupportButton>\n ) : null}\n </ContentHeader>\n <div className={classes.panelContainer}>\n <Panel data-testid=\"techdocs-custom-panel\" entities={shownEntities} />\n </div>\n </>\n );\n};\n\n/**\n * Props for {@link TechDocsCustomHome}\n *\n * @public\n */\nexport type TechDocsCustomHomeProps = {\n tabsConfig: TabsConfig;\n};\n\nexport const TechDocsCustomHome = (props: TechDocsCustomHomeProps) => {\n const { tabsConfig } = props;\n const [selectedTab, setSelectedTab] = useState<number>(0);\n const catalogApi: CatalogApi = useApi(catalogApiRef);\n\n const {\n value: entities,\n loading,\n error,\n } = useAsync(async () => {\n const response = await catalogApi.getEntities({\n filter: {\n 'metadata.annotations.backstage.io/techdocs-ref': CATALOG_FILTER_EXISTS,\n },\n fields: [\n 'apiVersion',\n 'kind',\n 'metadata',\n 'relations',\n 'spec.owner',\n 'spec.type',\n ],\n });\n return response.items.filter((entity: Entity) => {\n return !!entity.metadata.annotations?.['backstage.io/techdocs-ref'];\n });\n });\n\n const currentTabConfig = tabsConfig[selectedTab];\n\n if (loading) {\n return (\n <TechDocsPageWrapper>\n <Content>\n <Progress />\n </Content>\n </TechDocsPageWrapper>\n );\n }\n\n if (error) {\n return (\n <TechDocsPageWrapper>\n <Content>\n <WarningPanel\n severity=\"error\"\n title=\"Could not load available documentation.\"\n >\n <CodeSnippet language=\"text\" text={error.toString()} />\n </WarningPanel>\n </Content>\n </TechDocsPageWrapper>\n );\n }\n\n return (\n <TechDocsPageWrapper>\n <HeaderTabs\n selectedIndex={selectedTab}\n onChange={index => setSelectedTab(index)}\n tabs={tabsConfig.map(({ label }, index) => ({\n id: index.toString(),\n label,\n }))}\n />\n <Content data-testid=\"techdocs-content\">\n {currentTabConfig.panels.map((config, index) => (\n <CustomPanel\n key={index}\n config={config}\n entities={!!entities ? entities : []}\n index={index}\n />\n ))}\n </Content>\n </TechDocsPageWrapper>\n );\n};\n\nfunction useOwnUser(): AsyncState<UserEntity | undefined> {\n const catalogApi = useApi(catalogApiRef);\n const identityApi = useApi(identityApiRef);\n\n return useAsync(async () => {\n const identity = await identityApi.getBackstageIdentity();\n // TODO(freben): Defensively parse with defaults even though getEntityByRef\n // supports the string form, since some auth resolvers have been known to\n // return incomplete refs (just the name part) historically. This can be\n // simplified in the future to just pass the ref immediately to\n // getEntityByRef.\n return catalogApi.getEntityByRef(\n parseEntityRef(identity.userEntityRef, {\n defaultKind: 'User',\n defaultNamespace: DEFAULT_NAMESPACE,\n }),\n ) as Promise<UserEntity | undefined>;\n }, [catalogApi, identityApi]);\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA,MAAM,SAAS;AAAA,EACb;AAAA,EACA;AAAA;AAwCF,MAAM,cAAc,CAAC;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,MAKI;AACJ,QAAM,YAAY,WAAW;AAAA,IAC3B,gBAAgB;AAAA,MACd,cAAc;AAAA,SACV,OAAO,WAAW,OAAO,WAAW;AAAA;AAAA;AAG5C,QAAM,UAAU;AAChB,QAAM,EAAE,OAAO,SAAS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