@backstage/plugin-techdocs 1.17.3-next.1 → 1.17.3-next.2

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,28 @@
1
1
  # @backstage/plugin-techdocs
2
2
 
3
+ ## 1.17.3-next.2
4
+
5
+ ### Patch Changes
6
+
7
+ - e5af44c: Replaced deprecated `humanizeEntityRef` usage with the Catalog Presentation API.
8
+ - Updated dependencies
9
+ - @backstage/ui@0.14.0-next.2
10
+ - @backstage/errors@1.3.0-next.0
11
+ - @backstage/theme@0.7.3-next.0
12
+ - @backstage/core-components@0.18.9-next.1
13
+ - @backstage/plugin-catalog-react@2.1.2-next.2
14
+ - @backstage/integration@2.0.1-next.0
15
+ - @backstage/catalog-client@1.14.1-next.0
16
+ - @backstage/catalog-model@1.7.8-next.0
17
+ - @backstage/config@1.3.7-next.0
18
+ - @backstage/core-plugin-api@1.12.5-next.2
19
+ - @backstage/frontend-plugin-api@0.16.0-next.2
20
+ - @backstage/plugin-auth-react@0.1.26-next.1
21
+ - @backstage/plugin-search-react@1.11.1-next.2
22
+ - @backstage/plugin-techdocs-react@1.3.10-next.2
23
+ - @backstage/integration-react@1.2.17-next.1
24
+ - @backstage/plugin-search-common@1.2.23-next.0
25
+
3
26
  ## 1.17.3-next.1
4
27
 
5
28
  ### Patch Changes
@@ -1,8 +1,8 @@
1
1
  import { RELATION_OWNED_BY } from '@backstage/catalog-model';
2
- import { getEntityRelations, humanizeEntityRef } from '@backstage/plugin-catalog-react';
2
+ import { getEntityRelations, entityPresentationSnapshot } from '@backstage/plugin-catalog-react';
3
3
  import { toLowerMaybe } from '../../../helpers.esm.js';
4
4
 
5
- function entitiesToDocsMapper(entities, getRouteToReaderPageFor, config) {
5
+ function entitiesToDocsMapper(entities, getRouteToReaderPageFor, config, entityPresentationApi) {
6
6
  return entities.map((entity) => {
7
7
  const ownedByRelations = getEntityRelations(entity, RELATION_OWNED_BY);
8
8
  return {
@@ -17,7 +17,13 @@ function entitiesToDocsMapper(entities, getRouteToReaderPageFor, config) {
17
17
  name: toLowerMaybe(entity.metadata.name, config)
18
18
  }),
19
19
  ownedByRelations,
20
- ownedByRelationsTitle: ownedByRelations.map((r) => humanizeEntityRef(r, { defaultKind: "group" })).join(", ")
20
+ ownedByRelationsTitle: ownedByRelations.map(
21
+ (r) => entityPresentationSnapshot(
22
+ r,
23
+ { defaultKind: "group" },
24
+ entityPresentationApi
25
+ ).primaryTitle
26
+ ).join(", ")
21
27
  }
22
28
  };
23
29
  });
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.esm.js","sources":["../../../../src/home/components/Tables/helpers.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { RELATION_OWNED_BY, Entity } from '@backstage/catalog-model';\nimport {\n getEntityRelations,\n humanizeEntityRef,\n} from '@backstage/plugin-catalog-react';\nimport { toLowerMaybe } from '../../../helpers';\nimport { ConfigApi, RouteFunc } from '@backstage/core-plugin-api';\n\ntype getRouteFunc = RouteFunc<{\n namespace: string;\n kind: string;\n name: string;\n}>;\n\nexport function entitiesToDocsMapper(\n entities: Entity[],\n getRouteToReaderPageFor: getRouteFunc,\n config: ConfigApi,\n) {\n return entities.map(entity => {\n const ownedByRelations = getEntityRelations(entity, RELATION_OWNED_BY);\n return {\n entity,\n resolved: {\n docsUrl: getRouteToReaderPageFor({\n namespace: toLowerMaybe(\n entity.metadata.namespace ?? 'default',\n config,\n ),\n kind: toLowerMaybe(entity.kind, config),\n name: toLowerMaybe(entity.metadata.name, config),\n }),\n ownedByRelations,\n ownedByRelationsTitle: ownedByRelations\n .map(r => humanizeEntityRef(r, { defaultKind: 'group' }))\n .join(', '),\n },\n };\n });\n}\n"],"names":[],"mappings":";;;;AA8BO,SAAS,oBAAA,CACd,QAAA,EACA,uBAAA,EACA,MAAA,EACA;AACA,EAAA,OAAO,QAAA,CAAS,IAAI,CAAA,MAAA,KAAU;AAC5B,IAAA,MAAM,gBAAA,GAAmB,kBAAA,CAAmB,MAAA,EAAQ,iBAAiB,CAAA;AACrE,IAAA,OAAO;AAAA,MACL,MAAA;AAAA,MACA,QAAA,EAAU;AAAA,QACR,SAAS,uBAAA,CAAwB;AAAA,UAC/B,SAAA,EAAW,YAAA;AAAA,YACT,MAAA,CAAO,SAAS,SAAA,IAAa,SAAA;AAAA,YAC7B;AAAA,WACF;AAAA,UACA,IAAA,EAAM,YAAA,CAAa,MAAA,CAAO,IAAA,EAAM,MAAM,CAAA;AAAA,UACtC,IAAA,EAAM,YAAA,CAAa,MAAA,CAAO,QAAA,CAAS,MAAM,MAAM;AAAA,SAChD,CAAA;AAAA,QACD,gBAAA;AAAA,QACA,qBAAA,EAAuB,gBAAA,CACpB,GAAA,CAAI,CAAA,CAAA,KAAK,iBAAA,CAAkB,CAAA,EAAG,EAAE,WAAA,EAAa,OAAA,EAAS,CAAC,CAAA,CACvD,KAAK,IAAI;AAAA;AACd,KACF;AAAA,EACF,CAAC,CAAA;AACH;;;;"}
1
+ {"version":3,"file":"helpers.esm.js","sources":["../../../../src/home/components/Tables/helpers.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { RELATION_OWNED_BY, Entity } from '@backstage/catalog-model';\nimport {\n entityPresentationSnapshot,\n getEntityRelations,\n type EntityPresentationApi,\n} from '@backstage/plugin-catalog-react';\nimport { toLowerMaybe } from '../../../helpers';\nimport { ConfigApi, RouteFunc } from '@backstage/core-plugin-api';\n\ntype getRouteFunc = RouteFunc<{\n namespace: string;\n kind: string;\n name: string;\n}>;\n\nexport function entitiesToDocsMapper(\n entities: Entity[],\n getRouteToReaderPageFor: getRouteFunc,\n config: ConfigApi,\n entityPresentationApi?: EntityPresentationApi,\n) {\n return entities.map(entity => {\n const ownedByRelations = getEntityRelations(entity, RELATION_OWNED_BY);\n return {\n entity,\n resolved: {\n docsUrl: getRouteToReaderPageFor({\n namespace: toLowerMaybe(\n entity.metadata.namespace ?? 'default',\n config,\n ),\n kind: toLowerMaybe(entity.kind, config),\n name: toLowerMaybe(entity.metadata.name, config),\n }),\n ownedByRelations,\n ownedByRelationsTitle: ownedByRelations\n .map(\n r =>\n entityPresentationSnapshot(\n r,\n { defaultKind: 'group' },\n entityPresentationApi,\n ).primaryTitle,\n )\n .join(', '),\n },\n };\n });\n}\n"],"names":[],"mappings":";;;;AA+BO,SAAS,oBAAA,CACd,QAAA,EACA,uBAAA,EACA,MAAA,EACA,qBAAA,EACA;AACA,EAAA,OAAO,QAAA,CAAS,IAAI,CAAA,MAAA,KAAU;AAC5B,IAAA,MAAM,gBAAA,GAAmB,kBAAA,CAAmB,MAAA,EAAQ,iBAAiB,CAAA;AACrE,IAAA,OAAO;AAAA,MACL,MAAA;AAAA,MACA,QAAA,EAAU;AAAA,QACR,SAAS,uBAAA,CAAwB;AAAA,UAC/B,SAAA,EAAW,YAAA;AAAA,YACT,MAAA,CAAO,SAAS,SAAA,IAAa,SAAA;AAAA,YAC7B;AAAA,WACF;AAAA,UACA,IAAA,EAAM,YAAA,CAAa,MAAA,CAAO,IAAA,EAAM,MAAM,CAAA;AAAA,UACtC,IAAA,EAAM,YAAA,CAAa,MAAA,CAAO,QAAA,CAAS,MAAM,MAAM;AAAA,SAChD,CAAA;AAAA,QACD,gBAAA;AAAA,QACA,uBAAuB,gBAAA,CACpB,GAAA;AAAA,UACC,CAAA,CAAA,KACE,0BAAA;AAAA,YACE,CAAA;AAAA,YACA,EAAE,aAAa,OAAA,EAAQ;AAAA,YACvB;AAAA,WACF,CAAE;AAAA,SACN,CACC,KAAK,IAAI;AAAA;AACd,KACF;AAAA,EACF,CAAC,CAAA;AACH;;;;"}
@@ -1,5 +1,5 @@
1
1
  var name = "@backstage/plugin-techdocs";
2
- var version = "1.17.3-next.1";
2
+ var version = "1.17.3-next.2";
3
3
  var description = "The Backstage plugin that renders technical documentation for your components";
4
4
  var backstage = {
5
5
  role: "frontend-plugin",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-techdocs",
3
- "version": "1.17.3-next.1",
3
+ "version": "1.17.3-next.2",
4
4
  "description": "The Backstage plugin that renders technical documentation for your components",
5
5
  "backstage": {
6
6
  "role": "frontend-plugin",
@@ -71,23 +71,23 @@
71
71
  "test": "backstage-cli package test"
72
72
  },
73
73
  "dependencies": {
74
- "@backstage/catalog-client": "1.14.0",
75
- "@backstage/catalog-model": "1.7.7",
76
- "@backstage/config": "1.3.6",
77
- "@backstage/core-components": "0.18.9-next.0",
78
- "@backstage/core-plugin-api": "1.12.5-next.1",
79
- "@backstage/errors": "1.2.7",
80
- "@backstage/frontend-plugin-api": "0.16.0-next.1",
81
- "@backstage/integration": "2.0.0",
82
- "@backstage/integration-react": "1.2.17-next.0",
83
- "@backstage/plugin-auth-react": "0.1.26-next.0",
84
- "@backstage/plugin-catalog-react": "2.1.2-next.1",
85
- "@backstage/plugin-search-common": "1.2.22",
86
- "@backstage/plugin-search-react": "1.11.1-next.1",
74
+ "@backstage/catalog-client": "1.14.1-next.0",
75
+ "@backstage/catalog-model": "1.7.8-next.0",
76
+ "@backstage/config": "1.3.7-next.0",
77
+ "@backstage/core-components": "0.18.9-next.1",
78
+ "@backstage/core-plugin-api": "1.12.5-next.2",
79
+ "@backstage/errors": "1.3.0-next.0",
80
+ "@backstage/frontend-plugin-api": "0.16.0-next.2",
81
+ "@backstage/integration": "2.0.1-next.0",
82
+ "@backstage/integration-react": "1.2.17-next.1",
83
+ "@backstage/plugin-auth-react": "0.1.26-next.1",
84
+ "@backstage/plugin-catalog-react": "2.1.2-next.2",
85
+ "@backstage/plugin-search-common": "1.2.23-next.0",
86
+ "@backstage/plugin-search-react": "1.11.1-next.2",
87
87
  "@backstage/plugin-techdocs-common": "0.1.1",
88
- "@backstage/plugin-techdocs-react": "1.3.10-next.1",
89
- "@backstage/theme": "0.7.2",
90
- "@backstage/ui": "0.14.0-next.1",
88
+ "@backstage/plugin-techdocs-react": "1.3.10-next.2",
89
+ "@backstage/theme": "0.7.3-next.0",
90
+ "@backstage/ui": "0.14.0-next.2",
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",
@@ -101,12 +101,12 @@
101
101
  "react-use": "^17.2.4"
102
102
  },
103
103
  "devDependencies": {
104
- "@backstage/cli": "0.36.1-next.1",
105
- "@backstage/core-app-api": "1.20.0-next.1",
106
- "@backstage/dev-utils": "1.1.22-next.1",
107
- "@backstage/plugin-catalog": "2.0.2-next.1",
108
- "@backstage/plugin-techdocs-module-addons-contrib": "1.1.35-next.1",
109
- "@backstage/test-utils": "1.7.17-next.1",
104
+ "@backstage/cli": "0.36.1-next.2",
105
+ "@backstage/core-app-api": "1.20.0-next.2",
106
+ "@backstage/dev-utils": "1.1.22-next.2",
107
+ "@backstage/plugin-catalog": "2.0.2-next.2",
108
+ "@backstage/plugin-techdocs-module-addons-contrib": "1.1.35-next.2",
109
+ "@backstage/test-utils": "1.7.17-next.2",
110
110
  "@testing-library/dom": "^10.0.0",
111
111
  "@testing-library/jest-dom": "^6.0.0",
112
112
  "@testing-library/react": "^16.0.0",