@backstage/plugin-api-docs 0.13.1 → 0.13.2-next.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 CHANGED
@@ -1,5 +1,35 @@
1
1
  # @backstage/plugin-api-docs
2
2
 
3
+ ## 0.13.2-next.1
4
+
5
+ ### Patch Changes
6
+
7
+ - f3f84f1: Minor extension type updates after frontend API bump
8
+ - Updated dependencies
9
+ - @backstage/plugin-catalog@1.32.1-next.1
10
+ - @backstage/frontend-plugin-api@0.13.2-next.1
11
+ - @backstage/plugin-catalog-react@1.21.4-next.2
12
+ - @backstage/core-components@0.18.4-next.2
13
+ - @backstage/catalog-model@1.7.6
14
+ - @backstage/core-plugin-api@1.12.1-next.0
15
+ - @backstage/plugin-catalog-common@1.1.7
16
+ - @backstage/plugin-permission-react@0.4.39-next.0
17
+
18
+ ## 0.13.2-next.0
19
+
20
+ ### Patch Changes
21
+
22
+ - d02db50: Remove unnecessary use of `compatWrapper` and `convertLegacyRouteRef`(s) for the new frontend system.
23
+ - Updated dependencies
24
+ - @backstage/frontend-plugin-api@0.13.2-next.0
25
+ - @backstage/core-plugin-api@1.12.1-next.0
26
+ - @backstage/plugin-catalog-react@1.21.4-next.0
27
+ - @backstage/plugin-catalog@1.32.1-next.0
28
+ - @backstage/core-components@0.18.4-next.0
29
+ - @backstage/plugin-permission-react@0.4.39-next.0
30
+ - @backstage/catalog-model@1.7.6
31
+ - @backstage/plugin-catalog-common@1.1.7
32
+
3
33
  ## 0.13.1
4
34
 
5
35
  ### Patch Changes
package/dist/alpha.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
2
1
  import * as _backstage_catalog_model from '@backstage/catalog-model';
3
2
  import * as react from 'react';
4
3
  import * as _backstage_plugin_catalog_react_alpha from '@backstage/plugin-catalog-react/alpha';
5
4
  import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
5
+ import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
6
6
 
7
7
  /**
8
8
  * @alpha
@@ -40,9 +40,9 @@ declare const apiDocsTranslationRef: _backstage_frontend_plugin_api.TranslationR
40
40
  }>;
41
41
 
42
42
  declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin<{
43
- root: _backstage_frontend_plugin_api.RouteRef<undefined>;
43
+ root: _backstage_core_plugin_api.RouteRef<undefined>;
44
44
  }, {
45
- registerApi: _backstage_frontend_plugin_api.ExternalRouteRef<undefined>;
45
+ registerApi: _backstage_core_plugin_api.ExternalRouteRef<undefined, true>;
46
46
  }, {
47
47
  "api:api-docs/config": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
48
48
  kind: "api";
@@ -284,36 +284,29 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
284
284
  configInput: {};
285
285
  output: _backstage_frontend_plugin_api.ExtensionDataRef<{
286
286
  title: string;
287
- icon: _backstage_core_plugin_api.IconComponent;
287
+ icon: _backstage_frontend_plugin_api.IconComponent;
288
288
  routeRef: _backstage_frontend_plugin_api.RouteRef<undefined>;
289
289
  }, "core.nav-item.target", {}>;
290
290
  inputs: {};
291
291
  params: {
292
292
  title: string;
293
- icon: _backstage_core_plugin_api.IconComponent;
293
+ icon: _backstage_frontend_plugin_api.IconComponent;
294
294
  routeRef: _backstage_frontend_plugin_api.RouteRef<undefined>;
295
295
  };
296
296
  }>;
297
297
  "page:api-docs": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
298
298
  config: {
299
299
  initiallySelectedFilter: "all" | "owned" | "starred" | undefined;
300
- } & {
301
300
  path: string | undefined;
302
301
  };
303
302
  configInput: {
304
303
  initiallySelectedFilter?: "all" | "owned" | "starred" | undefined;
305
- } & {
306
304
  path?: string | undefined;
307
305
  };
308
306
  output: _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
309
307
  optional: true;
310
308
  }>;
311
- inputs: {
312
- [x: string]: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.ExtensionDataRef, {
313
- singleton: boolean;
314
- optional: boolean;
315
- }>;
316
- };
309
+ inputs: {};
317
310
  kind: "page";
318
311
  name: undefined;
319
312
  params: {
package/dist/alpha.esm.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import Grid from '@material-ui/core/Grid';
3
3
  import { NavItemBlueprint, ApiBlueprint, PageBlueprint, createFrontendPlugin } from '@backstage/frontend-plugin-api';
4
- import { compatWrapper, convertLegacyRouteRef } from '@backstage/core-compat-api';
5
4
  import { RELATION_HAS_PART, parseEntityRef } from '@backstage/catalog-model';
6
5
  import '@backstage/plugin-catalog-react';
7
6
  import { AppIcon } from '@backstage/core-components';
@@ -17,8 +16,8 @@ import { EntityCardBlueprint, EntityContentBlueprint } from '@backstage/plugin-c
17
16
  const apiDocsNavItem = NavItemBlueprint.make({
18
17
  params: {
19
18
  title: "APIs",
20
- routeRef: convertLegacyRouteRef(rootRoute),
21
- icon: () => compatWrapper(/* @__PURE__ */ jsx(AppIcon, { id: "kind:api" }))
19
+ routeRef: rootRoute,
20
+ icon: () => /* @__PURE__ */ jsx(AppIcon, { id: "kind:api" })
22
21
  }
23
22
  });
24
23
  const apiDocsConfigApi = ApiBlueprint.make({
@@ -46,17 +45,13 @@ const apiDocsExplorerPage = PageBlueprint.makeWithOverrides({
46
45
  factory(originalFactory, { config }) {
47
46
  return originalFactory({
48
47
  path: "/api-docs",
49
- routeRef: convertLegacyRouteRef(rootRoute),
50
- loader: () => import('./components/ApiExplorerPage/index.esm.js').then(
51
- (m) => compatWrapper(
52
- /* @__PURE__ */ jsx(
53
- m.ApiExplorerIndexPage,
54
- {
55
- initiallySelectedFilter: config.initiallySelectedFilter
56
- }
57
- )
58
- )
59
- )
48
+ routeRef: rootRoute,
49
+ loader: () => import('./components/ApiExplorerPage/index.esm.js').then((m) => /* @__PURE__ */ jsx(
50
+ m.ApiExplorerIndexPage,
51
+ {
52
+ initiallySelectedFilter: config.initiallySelectedFilter
53
+ }
54
+ ))
60
55
  });
61
56
  }
62
57
  });
@@ -71,18 +66,14 @@ const apiDocsHasApisEntityCard = EntityCardBlueprint.make({
71
66
  ({ type, targetRef }) => type.toLocaleLowerCase("en-US") === RELATION_HAS_PART && parseEntityRef(targetRef).kind === "API"
72
67
  );
73
68
  },
74
- loader: () => import('./components/ApisCards/index.esm.js').then(
75
- (m) => compatWrapper(/* @__PURE__ */ jsx(m.HasApisCard, {}))
76
- )
69
+ loader: () => import('./components/ApisCards/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.HasApisCard, {}))
77
70
  }
78
71
  });
79
72
  const apiDocsDefinitionEntityCard = EntityCardBlueprint.make({
80
73
  name: "definition",
81
74
  params: {
82
75
  filter: "kind:api",
83
- loader: () => import('./components/ApiDefinitionCard/index.esm.js').then(
84
- (m) => compatWrapper(/* @__PURE__ */ jsx(m.ApiDefinitionCard, {}))
85
- )
76
+ loader: () => import('./components/ApiDefinitionCard/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.ApiDefinitionCard, {}))
86
77
  }
87
78
  });
88
79
  const apiDocsConsumedApisEntityCard = EntityCardBlueprint.make({
@@ -92,9 +83,7 @@ const apiDocsConsumedApisEntityCard = EntityCardBlueprint.make({
92
83
  // We are skipping variants and columns are too complex to map to zod
93
84
  // See: https://github.com/backstage/backstage/pull/22619#discussion_r1477333252
94
85
  filter: "kind:component",
95
- loader: () => import('./components/ApisCards/index.esm.js').then(
96
- (m) => compatWrapper(/* @__PURE__ */ jsx(m.ConsumedApisCard, {}))
97
- )
86
+ loader: () => import('./components/ApisCards/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.ConsumedApisCard, {}))
98
87
  }
99
88
  });
100
89
  const apiDocsProvidedApisEntityCard = EntityCardBlueprint.make({
@@ -104,9 +93,7 @@ const apiDocsProvidedApisEntityCard = EntityCardBlueprint.make({
104
93
  // We are skipping variants and columns are too complex to map to zod
105
94
  // See: https://github.com/backstage/backstage/pull/22619#discussion_r1477333252
106
95
  filter: "kind:component",
107
- loader: () => import('./components/ApisCards/index.esm.js').then(
108
- (m) => compatWrapper(/* @__PURE__ */ jsx(m.ProvidedApisCard, {}))
109
- )
96
+ loader: () => import('./components/ApisCards/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.ProvidedApisCard, {}))
110
97
  }
111
98
  });
112
99
  const apiDocsConsumingComponentsEntityCard = EntityCardBlueprint.make({
@@ -116,9 +103,7 @@ const apiDocsConsumingComponentsEntityCard = EntityCardBlueprint.make({
116
103
  // We are skipping variants
117
104
  // See: https://github.com/backstage/backstage/pull/22619#discussion_r1477333252
118
105
  filter: "kind:api",
119
- loader: () => import('./components/ComponentsCards/index.esm.js').then(
120
- (m) => compatWrapper(/* @__PURE__ */ jsx(m.ConsumingComponentsCard, {}))
121
- )
106
+ loader: () => import('./components/ComponentsCards/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.ConsumingComponentsCard, {}))
122
107
  }
123
108
  });
124
109
  const apiDocsProvidingComponentsEntityCard = EntityCardBlueprint.make({
@@ -128,9 +113,7 @@ const apiDocsProvidingComponentsEntityCard = EntityCardBlueprint.make({
128
113
  // We are skipping variants
129
114
  // See: https://github.com/backstage/backstage/pull/22619#discussion_r1477333252
130
115
  filter: "kind:api",
131
- loader: () => import('./components/ComponentsCards/index.esm.js').then(
132
- (m) => compatWrapper(/* @__PURE__ */ jsx(m.ProvidingComponentsCard, {}))
133
- )
116
+ loader: () => import('./components/ComponentsCards/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.ProvidingComponentsCard, {}))
134
117
  }
135
118
  });
136
119
  const apiDocsDefinitionEntityContent = EntityContentBlueprint.make({
@@ -139,11 +122,7 @@ const apiDocsDefinitionEntityContent = EntityContentBlueprint.make({
139
122
  path: "/definition",
140
123
  title: "Definition",
141
124
  filter: "kind:api",
142
- loader: async () => import('./components/ApiDefinitionCard/index.esm.js').then(
143
- (m) => compatWrapper(
144
- /* @__PURE__ */ jsx(Grid, { container: true, spacing: 3, children: /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsx(m.ApiDefinitionCard, {}) }) })
145
- )
146
- )
125
+ loader: async () => import('./components/ApiDefinitionCard/index.esm.js').then((m) => /* @__PURE__ */ jsx(Grid, { container: true, spacing: 3, children: /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsx(m.ApiDefinitionCard, {}) }) }))
147
126
  }
148
127
  });
149
128
  const apiDocsApisEntityContent = EntityContentBlueprint.make({
@@ -152,24 +131,20 @@ const apiDocsApisEntityContent = EntityContentBlueprint.make({
152
131
  path: "/apis",
153
132
  title: "APIs",
154
133
  filter: "kind:component",
155
- loader: async () => import('./components/ApisCards/index.esm.js').then(
156
- (m) => compatWrapper(
157
- /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 3, alignItems: "stretch", children: [
158
- /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsx(m.ProvidedApisCard, {}) }),
159
- /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsx(m.ConsumedApisCard, {}) })
160
- ] })
161
- )
162
- )
134
+ loader: async () => import('./components/ApisCards/index.esm.js').then((m) => /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 3, alignItems: "stretch", children: [
135
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsx(m.ProvidedApisCard, {}) }),
136
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsx(m.ConsumedApisCard, {}) })
137
+ ] }))
163
138
  }
164
139
  });
165
140
  var alpha = createFrontendPlugin({
166
141
  pluginId: "api-docs",
167
142
  info: { packageJson: () => import('./package.json.esm.js') },
168
143
  routes: {
169
- root: convertLegacyRouteRef(rootRoute)
144
+ root: rootRoute
170
145
  },
171
146
  externalRoutes: {
172
- registerApi: convertLegacyRouteRef(registerComponentRouteRef)
147
+ registerApi: registerComponentRouteRef
173
148
  },
174
149
  extensions: [
175
150
  apiDocsNavItem,
@@ -1 +1 @@
1
- {"version":3,"file":"alpha.esm.js","sources":["../src/alpha.tsx"],"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 Grid from '@material-ui/core/Grid';\n\nimport {\n ApiBlueprint,\n NavItemBlueprint,\n PageBlueprint,\n createFrontendPlugin,\n} from '@backstage/frontend-plugin-api';\n\nimport {\n compatWrapper,\n convertLegacyRouteRef,\n} from '@backstage/core-compat-api';\n\nimport {\n ApiEntity,\n parseEntityRef,\n RELATION_HAS_PART,\n} from '@backstage/catalog-model';\n\nimport { defaultDefinitionWidgets } from './components/ApiDefinitionCard';\nimport { rootRoute, registerComponentRouteRef } from './routes';\nimport { apiDocsConfigRef } from './config';\nimport { AppIcon } from '@backstage/core-components';\n\nimport {\n EntityCardBlueprint,\n EntityContentBlueprint,\n} from '@backstage/plugin-catalog-react/alpha';\n\nconst apiDocsNavItem = NavItemBlueprint.make({\n params: {\n title: 'APIs',\n routeRef: convertLegacyRouteRef(rootRoute),\n icon: () => compatWrapper(<AppIcon id=\"kind:api\" />),\n },\n});\n\nconst apiDocsConfigApi = ApiBlueprint.make({\n name: 'config',\n params: defineParams =>\n defineParams({\n api: apiDocsConfigRef,\n deps: {},\n factory: () => {\n const definitionWidgets = defaultDefinitionWidgets();\n return {\n getApiDefinitionWidget: (apiEntity: ApiEntity) => {\n return definitionWidgets.find(d => d.type === apiEntity.spec.type);\n },\n };\n },\n }),\n});\n\nconst apiDocsExplorerPage = PageBlueprint.makeWithOverrides({\n config: {\n schema: {\n // Omitting columns and actions for now as their types are too complex to map to zod\n initiallySelectedFilter: z =>\n z.enum(['owned', 'starred', 'all']).optional(),\n },\n },\n factory(originalFactory, { config }) {\n return originalFactory({\n path: '/api-docs',\n routeRef: convertLegacyRouteRef(rootRoute),\n loader: () =>\n import('./components/ApiExplorerPage').then(m =>\n compatWrapper(\n <m.ApiExplorerIndexPage\n initiallySelectedFilter={config.initiallySelectedFilter}\n />,\n ),\n ),\n });\n },\n});\n\nconst apiDocsHasApisEntityCard = EntityCardBlueprint.make({\n name: 'has-apis',\n params: {\n // Omitting configSchema for now\n // We are skipping variants and columns are too complex to map to zod\n // See: https://github.com/backstage/backstage/pull/22619#discussion_r1477333252\n filter: entity => {\n return (\n entity.kind === 'Component' &&\n entity.relations?.some(\n ({ type, targetRef }) =>\n type.toLocaleLowerCase('en-US') === RELATION_HAS_PART &&\n parseEntityRef(targetRef).kind === 'API',\n )!!\n );\n },\n loader: () =>\n import('./components/ApisCards').then(m =>\n compatWrapper(<m.HasApisCard />),\n ),\n },\n});\n\nconst apiDocsDefinitionEntityCard = EntityCardBlueprint.make({\n name: 'definition',\n params: {\n filter: 'kind:api',\n loader: () =>\n import('./components/ApiDefinitionCard').then(m =>\n compatWrapper(<m.ApiDefinitionCard />),\n ),\n },\n});\n\nconst apiDocsConsumedApisEntityCard = EntityCardBlueprint.make({\n name: 'consumed-apis',\n params: {\n // Omitting configSchema for now\n // We are skipping variants and columns are too complex to map to zod\n // See: https://github.com/backstage/backstage/pull/22619#discussion_r1477333252\n filter: 'kind:component',\n loader: () =>\n import('./components/ApisCards').then(m =>\n compatWrapper(<m.ConsumedApisCard />),\n ),\n },\n});\n\nconst apiDocsProvidedApisEntityCard = EntityCardBlueprint.make({\n name: 'provided-apis',\n params: {\n // Omitting configSchema for now\n // We are skipping variants and columns are too complex to map to zod\n // See: https://github.com/backstage/backstage/pull/22619#discussion_r1477333252\n filter: 'kind:component',\n loader: () =>\n import('./components/ApisCards').then(m =>\n compatWrapper(<m.ProvidedApisCard />),\n ),\n },\n});\n\nconst apiDocsConsumingComponentsEntityCard = EntityCardBlueprint.make({\n name: 'consuming-components',\n params: {\n // Omitting configSchema for now\n // We are skipping variants\n // See: https://github.com/backstage/backstage/pull/22619#discussion_r1477333252\n filter: 'kind:api',\n loader: () =>\n import('./components/ComponentsCards').then(m =>\n compatWrapper(<m.ConsumingComponentsCard />),\n ),\n },\n});\n\nconst apiDocsProvidingComponentsEntityCard = EntityCardBlueprint.make({\n name: 'providing-components',\n params: {\n // Omitting configSchema for now\n // We are skipping variants\n // See: https://github.com/backstage/backstage/pull/22619#discussion_r1477333252\n filter: 'kind:api',\n loader: () =>\n import('./components/ComponentsCards').then(m =>\n compatWrapper(<m.ProvidingComponentsCard />),\n ),\n },\n});\n\nconst apiDocsDefinitionEntityContent = EntityContentBlueprint.make({\n name: 'definition',\n params: {\n path: '/definition',\n title: 'Definition',\n filter: 'kind:api',\n loader: async () =>\n import('./components/ApiDefinitionCard').then(m =>\n compatWrapper(\n <Grid container spacing={3}>\n <Grid item xs={12}>\n <m.ApiDefinitionCard />\n </Grid>\n </Grid>,\n ),\n ),\n },\n});\n\nconst apiDocsApisEntityContent = EntityContentBlueprint.make({\n name: 'apis',\n params: {\n path: '/apis',\n title: 'APIs',\n filter: 'kind:component',\n loader: async () =>\n import('./components/ApisCards').then(m =>\n compatWrapper(\n <Grid container spacing={3} alignItems=\"stretch\">\n <Grid item xs={12}>\n <m.ProvidedApisCard />\n </Grid>\n <Grid item xs={12}>\n <m.ConsumedApisCard />\n </Grid>\n </Grid>,\n ),\n ),\n },\n});\n\nexport default createFrontendPlugin({\n pluginId: 'api-docs',\n info: { packageJson: () => import('../package.json') },\n routes: {\n root: convertLegacyRouteRef(rootRoute),\n },\n externalRoutes: {\n registerApi: convertLegacyRouteRef(registerComponentRouteRef),\n },\n extensions: [\n apiDocsNavItem,\n apiDocsConfigApi,\n apiDocsExplorerPage,\n apiDocsHasApisEntityCard,\n apiDocsDefinitionEntityCard,\n apiDocsProvidedApisEntityCard,\n apiDocsConsumedApisEntityCard,\n apiDocsConsumingComponentsEntityCard,\n apiDocsProvidingComponentsEntityCard,\n apiDocsDefinitionEntityContent,\n apiDocsApisEntityContent,\n ],\n});\n\nexport { apiDocsTranslationRef } from './translation';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA8CA,MAAM,cAAA,GAAiB,iBAAiB,IAAA,CAAK;AAAA,EAC3C,MAAA,EAAQ;AAAA,IACN,KAAA,EAAO,MAAA;AAAA,IACP,QAAA,EAAU,sBAAsB,SAAS,CAAA;AAAA,IACzC,MAAM,MAAM,aAAA,qBAAe,OAAA,EAAA,EAAQ,EAAA,EAAG,YAAW,CAAE;AAAA;AAEvD,CAAC,CAAA;AAED,MAAM,gBAAA,GAAmB,aAAa,IAAA,CAAK;AAAA,EACzC,IAAA,EAAM,QAAA;AAAA,EACN,MAAA,EAAQ,kBACN,YAAA,CAAa;AAAA,IACX,GAAA,EAAK,gBAAA;AAAA,IACL,MAAM,EAAC;AAAA,IACP,SAAS,MAAM;AACb,MAAA,MAAM,oBAAoB,wBAAA,EAAyB;AACnD,MAAA,OAAO;AAAA,QACL,sBAAA,EAAwB,CAAC,SAAA,KAAyB;AAChD,UAAA,OAAO,kBAAkB,IAAA,CAAK,CAAA,CAAA,KAAK,EAAE,IAAA,KAAS,SAAA,CAAU,KAAK,IAAI,CAAA;AAAA,QACnE;AAAA,OACF;AAAA,IACF;AAAA,GACD;AACL,CAAC,CAAA;AAED,MAAM,mBAAA,GAAsB,cAAc,iBAAA,CAAkB;AAAA,EAC1D,MAAA,EAAQ;AAAA,IACN,MAAA,EAAQ;AAAA;AAAA,MAEN,uBAA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,CAAC,IAAA,EAAA,EAAK,MAAI,IAAA,EAAC,EAAA,EAAI,IACb,QAAA,kBAAA,GAAA,CAAC,CAAA,CAAE,gBAAA,EAAF,EAAmB,CAAA,EACtB,CAAA;AAAA,0BACA,GAAA,CAAC,IAAA,EAAA,EAAK,IAAA,EAAI,IAAA,EAAC,EAAA,EAAI,IACb,QAAA,kBAAA,GAAA,CAAC,CAAA,CAAE,gBAAA,EAAF,EAAmB,CAAA,EACtB;AAAA,SAAA,EACF;AAAA;AACF;AACF;AAEN,CAAC,CAAA;AAED,YAAe,oBAAA,CAAqB;AAAA,EAClC,QAAA,EAAU,UAAA;AAAA,EACV,MAAM,EAAE,WAAA,EAAa,MAAM,OAAO,uBAAiB,CAAA,EAAE;AAAA,EACrD,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,sBAAsB,SAAS;AAAA,GACvC;AAAA,EACA,cAAA,EAAgB;AAAA,IACd,WAAA,EAAa,sBAAsB,yBAAyB;AAAA,GAC9D;AAAA,EACA,UAAA,EAAY;AAAA,IACV,cAAA;AAAA,IACA,gBAAA;AAAA,IACA,mBAAA;AAAA,IACA,wBAAA;AAAA,IACA,2BAAA;AAAA,IACA,6BAAA;AAAA,IACA,6BAAA;AAAA,IACA,oCAAA;AAAA,IACA,oCAAA;AAAA,IACA,8BAAA;AAAA,IACA;AAAA;AAEJ,CAAC,CAAA;;;;"}
1
+ {"version":3,"file":"alpha.esm.js","sources":["../src/alpha.tsx"],"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 Grid from '@material-ui/core/Grid';\n\nimport {\n ApiBlueprint,\n NavItemBlueprint,\n PageBlueprint,\n createFrontendPlugin,\n} from '@backstage/frontend-plugin-api';\n\nimport {\n ApiEntity,\n parseEntityRef,\n RELATION_HAS_PART,\n} from '@backstage/catalog-model';\n\nimport { defaultDefinitionWidgets } from './components/ApiDefinitionCard';\nimport { rootRoute, registerComponentRouteRef } from './routes';\nimport { apiDocsConfigRef } from './config';\nimport { AppIcon } from '@backstage/core-components';\n\nimport {\n EntityCardBlueprint,\n EntityContentBlueprint,\n} from '@backstage/plugin-catalog-react/alpha';\n\nconst apiDocsNavItem = NavItemBlueprint.make({\n params: {\n title: 'APIs',\n routeRef: rootRoute,\n icon: () => <AppIcon id=\"kind:api\" />,\n },\n});\n\nconst apiDocsConfigApi = ApiBlueprint.make({\n name: 'config',\n params: defineParams =>\n defineParams({\n api: apiDocsConfigRef,\n deps: {},\n factory: () => {\n const definitionWidgets = defaultDefinitionWidgets();\n return {\n getApiDefinitionWidget: (apiEntity: ApiEntity) => {\n return definitionWidgets.find(d => d.type === apiEntity.spec.type);\n },\n };\n },\n }),\n});\n\nconst apiDocsExplorerPage = PageBlueprint.makeWithOverrides({\n config: {\n schema: {\n // Omitting columns and actions for now as their types are too complex to map to zod\n initiallySelectedFilter: z =>\n z.enum(['owned', 'starred', 'all']).optional(),\n },\n },\n factory(originalFactory, { config }) {\n return originalFactory({\n path: '/api-docs',\n routeRef: rootRoute,\n loader: () =>\n import('./components/ApiExplorerPage').then(m => (\n <m.ApiExplorerIndexPage\n initiallySelectedFilter={config.initiallySelectedFilter}\n />\n )),\n });\n },\n});\n\nconst apiDocsHasApisEntityCard = EntityCardBlueprint.make({\n name: 'has-apis',\n params: {\n // Omitting configSchema for now\n // We are skipping variants and columns are too complex to map to zod\n // See: https://github.com/backstage/backstage/pull/22619#discussion_r1477333252\n filter: entity => {\n return (\n entity.kind === 'Component' &&\n entity.relations?.some(\n ({ type, targetRef }) =>\n type.toLocaleLowerCase('en-US') === RELATION_HAS_PART &&\n parseEntityRef(targetRef).kind === 'API',\n )!!\n );\n },\n loader: () => import('./components/ApisCards').then(m => <m.HasApisCard />),\n },\n});\n\nconst apiDocsDefinitionEntityCard = EntityCardBlueprint.make({\n name: 'definition',\n params: {\n filter: 'kind:api',\n loader: () =>\n import('./components/ApiDefinitionCard').then(m => (\n <m.ApiDefinitionCard />\n )),\n },\n});\n\nconst apiDocsConsumedApisEntityCard = EntityCardBlueprint.make({\n name: 'consumed-apis',\n params: {\n // Omitting configSchema for now\n // We are skipping variants and columns are too complex to map to zod\n // See: https://github.com/backstage/backstage/pull/22619#discussion_r1477333252\n filter: 'kind:component',\n loader: () =>\n import('./components/ApisCards').then(m => <m.ConsumedApisCard />),\n },\n});\n\nconst apiDocsProvidedApisEntityCard = EntityCardBlueprint.make({\n name: 'provided-apis',\n params: {\n // Omitting configSchema for now\n // We are skipping variants and columns are too complex to map to zod\n // See: https://github.com/backstage/backstage/pull/22619#discussion_r1477333252\n filter: 'kind:component',\n loader: () =>\n import('./components/ApisCards').then(m => <m.ProvidedApisCard />),\n },\n});\n\nconst apiDocsConsumingComponentsEntityCard = EntityCardBlueprint.make({\n name: 'consuming-components',\n params: {\n // Omitting configSchema for now\n // We are skipping variants\n // See: https://github.com/backstage/backstage/pull/22619#discussion_r1477333252\n filter: 'kind:api',\n loader: () =>\n import('./components/ComponentsCards').then(m => (\n <m.ConsumingComponentsCard />\n )),\n },\n});\n\nconst apiDocsProvidingComponentsEntityCard = EntityCardBlueprint.make({\n name: 'providing-components',\n params: {\n // Omitting configSchema for now\n // We are skipping variants\n // See: https://github.com/backstage/backstage/pull/22619#discussion_r1477333252\n filter: 'kind:api',\n loader: () =>\n import('./components/ComponentsCards').then(m => (\n <m.ProvidingComponentsCard />\n )),\n },\n});\n\nconst apiDocsDefinitionEntityContent = EntityContentBlueprint.make({\n name: 'definition',\n params: {\n path: '/definition',\n title: 'Definition',\n filter: 'kind:api',\n loader: async () =>\n import('./components/ApiDefinitionCard').then(m => (\n <Grid container spacing={3}>\n <Grid item xs={12}>\n <m.ApiDefinitionCard />\n </Grid>\n </Grid>\n )),\n },\n});\n\nconst apiDocsApisEntityContent = EntityContentBlueprint.make({\n name: 'apis',\n params: {\n path: '/apis',\n title: 'APIs',\n filter: 'kind:component',\n loader: async () =>\n import('./components/ApisCards').then(m => (\n <Grid container spacing={3} alignItems=\"stretch\">\n <Grid item xs={12}>\n <m.ProvidedApisCard />\n </Grid>\n <Grid item xs={12}>\n <m.ConsumedApisCard />\n </Grid>\n </Grid>\n )),\n },\n});\n\nexport default createFrontendPlugin({\n pluginId: 'api-docs',\n info: { packageJson: () => import('../package.json') },\n routes: {\n root: rootRoute,\n },\n externalRoutes: {\n registerApi: registerComponentRouteRef,\n },\n extensions: [\n apiDocsNavItem,\n apiDocsConfigApi,\n apiDocsExplorerPage,\n apiDocsHasApisEntityCard,\n apiDocsDefinitionEntityCard,\n apiDocsProvidedApisEntityCard,\n apiDocsConsumedApisEntityCard,\n apiDocsConsumingComponentsEntityCard,\n apiDocsProvidingComponentsEntityCard,\n apiDocsDefinitionEntityContent,\n apiDocsApisEntityContent,\n ],\n});\n\nexport { apiDocsTranslationRef } from './translation';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAyCA,MAAM,cAAA,GAAiB,iBAAiB,IAAA,CAAK;AAAA,EAC3C,MAAA,EAAQ;AAAA,IACN,KAAA,EAAO,MAAA;AAAA,IACP,QAAA,EAAU,SAAA;AAAA,IACV,IAAA,EAAM,sBAAM,GAAA,CAAC,OAAA,EAAA,EAAQ,IAAG,UAAA,EAAW;AAAA;AAEvC,CAAC,CAAA;AAED,MAAM,gBAAA,GAAmB,aAAa,IAAA,CAAK;AAAA,EACzC,IAAA,EAAM,QAAA;AAAA,EACN,MAAA,EAAQ,kBACN,YAAA,CAAa;AAAA,IACX,GAAA,EAAK,gBAAA;AAAA,IACL,MAAM,EAAC;AAAA,IACP,SAAS,MAAM;AACb,MAAA,MAAM,oBAAoB,wBAAA,EAAyB;AACnD,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;AAAA,IACR,MAAA,EAAQ,YACN,OAAO,qCAAwB,EAAE,IAAA,CAAK,CAAA,CAAA,qBACpC,IAAA,CAAC,IAAA,EAAA,EAAK,SAAA,EAAS,IAAA,EAAC,OAAA,EAAS,CAAA,EAAG,YAAW,SAAA,EACrC,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,IAAA,EAAA,EAAK,MAAI,IAAA,EAAC,EAAA,EAAI,IACb,QAAA,kBAAA,GAAA,CAAC,CAAA,CAAE,gBAAA,EAAF,EAAmB,CAAA,EACtB,CAAA;AAAA,sBACA,GAAA,CAAC,IAAA,EAAA,EAAK,IAAA,EAAI,IAAA,EAAC,EAAA,EAAI,IACb,QAAA,kBAAA,GAAA,CAAC,CAAA,CAAE,gBAAA,EAAF,EAAmB,CAAA,EACtB;AAAA,KAAA,EACF,CACD;AAAA;AAEP,CAAC,CAAA;AAED,YAAe,oBAAA,CAAqB;AAAA,EAClC,QAAA,EAAU,UAAA;AAAA,EACV,MAAM,EAAE,WAAA,EAAa,MAAM,OAAO,uBAAiB,CAAA,EAAE;AAAA,EACrD,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM;AAAA,GACR;AAAA,EACA,cAAA,EAAgB;AAAA,IACd,WAAA,EAAa;AAAA,GACf;AAAA,EACA,UAAA,EAAY;AAAA,IACV,cAAA;AAAA,IACA,gBAAA;AAAA,IACA,mBAAA;AAAA,IACA,wBAAA;AAAA,IACA,2BAAA;AAAA,IACA,6BAAA;AAAA,IACA,6BAAA;AAAA,IACA,oCAAA;AAAA,IACA,oCAAA;AAAA,IACA,8BAAA;AAAA,IACA;AAAA;AAEJ,CAAC,CAAA;;;;"}
package/dist/index.d.ts CHANGED
@@ -6,6 +6,7 @@ import { UserListFilterKind, EntityOwnerPickerProps, EntityListPagination } from
6
6
  import { ReactElement } from 'react';
7
7
  import * as _backstage_catalog_model from '@backstage/catalog-model';
8
8
  import { ApiEntity, ComponentEntity } from '@backstage/catalog-model';
9
+ import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
9
10
  import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
10
11
 
11
12
  /**
@@ -154,7 +155,7 @@ type TrpcApiDefinitionWidgetProps = {
154
155
  declare const TrpcApiDefinitionWidget: (props: TrpcApiDefinitionWidgetProps) => react_jsx_runtime.JSX.Element;
155
156
 
156
157
  /** @public */
157
- declare const apiDocsConfigRef: _backstage_core_plugin_api.ApiRef<ApiDocsConfig>;
158
+ declare const apiDocsConfigRef: _backstage_frontend_plugin_api.ApiRef<ApiDocsConfig>;
158
159
  /** @public */
159
160
  interface ApiDocsConfig {
160
161
  getApiDefinitionWidget: (apiEntity: ApiEntity) => ApiDefinitionWidget | undefined;
@@ -202,4 +203,5 @@ declare const EntityHasApisCard: (props: {
202
203
  tableOptions?: _backstage_core_components.TableOptions;
203
204
  }) => react_jsx_runtime.JSX.Element;
204
205
 
205
- export { ApiDefinitionCard, ApiDefinitionDialog, type ApiDefinitionWidget, type ApiDocsConfig, ApiExplorerPage$1 as ApiExplorerIndexPage, ApiExplorerPage, ApiTypeTitle, AsyncApiDefinitionWidget, type AsyncApiDefinitionWidgetProps, type AsyncApiResolver, ConsumedApisCard, ConsumingComponentsCard, DefaultApiExplorerPage, type DefaultApiExplorerPageProps, EntityApiDefinitionCard, EntityConsumedApisCard, EntityConsumingComponentsCard, EntityHasApisCard, EntityProvidedApisCard, EntityProvidingComponentsCard, GraphQlDefinitionWidget, type GraphQlDefinitionWidgetProps, HasApisCard, OpenApiDefinitionWidget, type OpenApiDefinitionWidgetProps, PlainApiDefinitionWidget, type PlainApiDefinitionWidgetProps, ProvidedApisCard, ProvidingComponentsCard, TrpcApiDefinitionWidget, type TrpcApiDefinitionWidgetProps, apiDocsConfigRef, apiDocsPlugin, defaultDefinitionWidgets, apiDocsPlugin as plugin };
206
+ export { ApiDefinitionCard, ApiDefinitionDialog, ApiExplorerPage$1 as ApiExplorerIndexPage, ApiExplorerPage, ApiTypeTitle, AsyncApiDefinitionWidget, ConsumedApisCard, ConsumingComponentsCard, DefaultApiExplorerPage, EntityApiDefinitionCard, EntityConsumedApisCard, EntityConsumingComponentsCard, EntityHasApisCard, EntityProvidedApisCard, EntityProvidingComponentsCard, GraphQlDefinitionWidget, HasApisCard, OpenApiDefinitionWidget, PlainApiDefinitionWidget, ProvidedApisCard, ProvidingComponentsCard, TrpcApiDefinitionWidget, apiDocsConfigRef, apiDocsPlugin, defaultDefinitionWidgets, apiDocsPlugin as plugin };
207
+ export type { ApiDefinitionWidget, ApiDocsConfig, AsyncApiDefinitionWidgetProps, AsyncApiResolver, DefaultApiExplorerPageProps, GraphQlDefinitionWidgetProps, OpenApiDefinitionWidgetProps, PlainApiDefinitionWidgetProps, TrpcApiDefinitionWidgetProps };
@@ -1,5 +1,5 @@
1
1
  var name = "@backstage/plugin-api-docs";
2
- var version = "0.13.1";
2
+ var version = "0.13.2-next.1";
3
3
  var description = "A Backstage plugin that helps represent API entities in the frontend";
4
4
  var backstage = {
5
5
  role: "frontend-plugin",
@@ -22,7 +22,7 @@ var repository = {
22
22
  };
23
23
  var license = "Apache-2.0";
24
24
  var sideEffects = false;
25
- var exports = {
25
+ var exports$1 = {
26
26
  ".": "./src/index.ts",
27
27
  "./alpha": "./src/alpha.tsx",
28
28
  "./package.json": "./package.json"
@@ -54,7 +54,6 @@ var scripts = {
54
54
  var dependencies = {
55
55
  "@asyncapi/react-component": "^2.3.3",
56
56
  "@backstage/catalog-model": "workspace:^",
57
- "@backstage/core-compat-api": "workspace:^",
58
57
  "@backstage/core-components": "workspace:^",
59
58
  "@backstage/core-plugin-api": "workspace:^",
60
59
  "@backstage/frontend-plugin-api": "workspace:^",
@@ -110,7 +109,7 @@ var _package = {
110
109
  repository: repository,
111
110
  license: license,
112
111
  sideEffects: sideEffects,
113
- exports: exports,
112
+ exports: exports$1,
114
113
  main: main,
115
114
  types: types,
116
115
  typesVersions: typesVersions,
@@ -122,5 +121,5 @@ var _package = {
122
121
  peerDependenciesMeta: peerDependenciesMeta
123
122
  };
124
123
 
125
- export { backstage, _package as default, dependencies, description, devDependencies, exports, files, homepage, keywords, license, main, name, peerDependencies, peerDependenciesMeta, publishConfig, repository, scripts, sideEffects, types, typesVersions, version };
124
+ export { backstage, _package as default, dependencies, description, devDependencies, exports$1 as exports, files, homepage, keywords, license, main, name, peerDependencies, peerDependenciesMeta, publishConfig, repository, scripts, sideEffects, types, typesVersions, version };
126
125
  //# sourceMappingURL=package.json.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"package.json.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"package.json.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-api-docs",
3
- "version": "0.13.1",
3
+ "version": "0.13.2-next.1",
4
4
  "description": "A Backstage plugin that helps represent API entities in the frontend",
5
5
  "backstage": {
6
6
  "role": "frontend-plugin",
@@ -66,15 +66,14 @@
66
66
  },
67
67
  "dependencies": {
68
68
  "@asyncapi/react-component": "^2.3.3",
69
- "@backstage/catalog-model": "^1.7.6",
70
- "@backstage/core-compat-api": "^0.5.4",
71
- "@backstage/core-components": "^0.18.3",
72
- "@backstage/core-plugin-api": "^1.12.0",
73
- "@backstage/frontend-plugin-api": "^0.13.0",
74
- "@backstage/plugin-catalog": "^1.32.0",
75
- "@backstage/plugin-catalog-common": "^1.1.7",
76
- "@backstage/plugin-catalog-react": "^1.21.3",
77
- "@backstage/plugin-permission-react": "^0.4.38",
69
+ "@backstage/catalog-model": "1.7.6",
70
+ "@backstage/core-components": "0.18.4-next.2",
71
+ "@backstage/core-plugin-api": "1.12.1-next.0",
72
+ "@backstage/frontend-plugin-api": "0.13.2-next.1",
73
+ "@backstage/plugin-catalog": "1.32.1-next.1",
74
+ "@backstage/plugin-catalog-common": "1.1.7",
75
+ "@backstage/plugin-catalog-react": "1.21.4-next.2",
76
+ "@backstage/plugin-permission-react": "0.4.39-next.0",
78
77
  "@graphiql/react": "^0.23.0",
79
78
  "@material-ui/core": "^4.12.2",
80
79
  "@material-ui/icons": "^4.9.1",
@@ -86,10 +85,10 @@
86
85
  "swagger-ui-react": "^5.27.1"
87
86
  },
88
87
  "devDependencies": {
89
- "@backstage/cli": "^0.34.5",
90
- "@backstage/core-app-api": "^1.19.2",
91
- "@backstage/dev-utils": "^1.1.17",
92
- "@backstage/test-utils": "^1.7.13",
88
+ "@backstage/cli": "0.35.0-next.2",
89
+ "@backstage/core-app-api": "1.19.3-next.1",
90
+ "@backstage/dev-utils": "1.1.18-next.1",
91
+ "@backstage/test-utils": "1.7.14-next.0",
93
92
  "@testing-library/dom": "^10.0.0",
94
93
  "@testing-library/jest-dom": "^6.0.0",
95
94
  "@testing-library/react": "^16.0.0",