@backstage/plugin-api-docs 0.6.21 → 0.7.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 +67 -0
- package/dist/esm/{OpenApiDefinition-48ae3040.esm.js → OpenApiDefinition-3c1031f2.esm.js} +2 -1
- package/dist/esm/{OpenApiDefinition-48ae3040.esm.js.map → OpenApiDefinition-3c1031f2.esm.js.map} +1 -1
- package/dist/esm/{index-02cb4cdc.esm.js → index-1dc3ed84.esm.js} +1 -1
- package/dist/esm/index-1dc3ed84.esm.js.map +1 -0
- package/dist/esm/{index-32c80387.esm.js → index-446e3e5c.esm.js} +1 -1
- package/dist/esm/index-446e3e5c.esm.js.map +1 -0
- package/dist/esm/{index-89d097b6.esm.js → index-8a745bfb.esm.js} +1 -1
- package/dist/esm/index-8a745bfb.esm.js.map +1 -0
- package/dist/esm/{index-30e4d7f8.esm.js → index-d40626b4.esm.js} +1 -1
- package/dist/esm/index-d40626b4.esm.js.map +1 -0
- package/dist/index.d.ts +7 -2
- package/dist/index.esm.js +14 -14
- package/dist/index.esm.js.map +1 -1
- package/package.json +14 -15
- package/dist/esm/index-02cb4cdc.esm.js.map +0 -1
- package/dist/esm/index-30e4d7f8.esm.js.map +0 -1
- package/dist/esm/index-32c80387.esm.js.map +0 -1
- package/dist/esm/index-89d097b6.esm.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,72 @@
|
|
|
1
1
|
# @backstage/plugin-api-docs
|
|
2
2
|
|
|
3
|
+
## 0.7.1-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/core-components@0.8.7-next.0
|
|
9
|
+
- @backstage/plugin-catalog@0.7.11-next.0
|
|
10
|
+
- @backstage/plugin-catalog-react@0.6.13-next.0
|
|
11
|
+
|
|
12
|
+
## 0.7.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- b3831be2fe: Renamed the `createComponent` external route to `registerApi` since it's now recommended to link to the entity registration page rather than the creation page.
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- 306d879536: chore(deps): bump `react-syntax-highligher` and `swagger-ui-react`
|
|
21
|
+
- c007bea546: Export `GraphQlDefinitionWidget` to be reused.
|
|
22
|
+
- cd4e3c4d4e: Using an explicitly empty string for the url argument ensures that the swagger UI does not run into undefined errors.
|
|
23
|
+
- 0c0d8a47e7: Bump @asyncapi/react-component for CVE
|
|
24
|
+
|
|
25
|
+
[CVE-2022-21680](https://github.com/advisories/GHSA-rrrm-qjm4-v8hf) and [CVE-2022-21681](https://github.com/advisories/GHSA-5v2h-r2cx-5xgj)
|
|
26
|
+
|
|
27
|
+
See https://github.com/asyncapi/asyncapi-react/pull/522
|
|
28
|
+
|
|
29
|
+
- Updated dependencies
|
|
30
|
+
- @backstage/core-components@0.8.5
|
|
31
|
+
- @backstage/core-plugin-api@0.6.0
|
|
32
|
+
- @backstage/plugin-catalog@0.7.9
|
|
33
|
+
- @backstage/plugin-catalog-react@0.6.12
|
|
34
|
+
- @backstage/catalog-model@0.9.10
|
|
35
|
+
|
|
36
|
+
## 0.6.23-next.0
|
|
37
|
+
|
|
38
|
+
### Patch Changes
|
|
39
|
+
|
|
40
|
+
- 306d879536: chore(deps): bump `react-syntax-highligher` and `swagger-ui-react`
|
|
41
|
+
- c007bea546: Export `GraphQlDefinitionWidget` to be reused.
|
|
42
|
+
- cd4e3c4d4e: Using an explicitly empty string for the url argument ensures that the swagger UI does not run into undefined errors.
|
|
43
|
+
- Updated dependencies
|
|
44
|
+
- @backstage/core-components@0.8.5-next.0
|
|
45
|
+
- @backstage/core-plugin-api@0.6.0-next.0
|
|
46
|
+
- @backstage/plugin-catalog@0.7.9-next.0
|
|
47
|
+
- @backstage/plugin-catalog-react@0.6.12-next.0
|
|
48
|
+
- @backstage/catalog-model@0.9.10-next.0
|
|
49
|
+
|
|
50
|
+
## 0.6.22
|
|
51
|
+
|
|
52
|
+
### Patch Changes
|
|
53
|
+
|
|
54
|
+
- faf844e269: Update @asyncapi/react-component to 1.0.0-next.26, which will fix the
|
|
55
|
+
`ResizeObserver loop limit exceeded` errors which we encountered in several E2E
|
|
56
|
+
tests.
|
|
57
|
+
|
|
58
|
+
For more details check the following links:
|
|
59
|
+
|
|
60
|
+
- https://github.com/backstage/backstage/pull/8088#issuecomment-991183968
|
|
61
|
+
- https://github.com/asyncapi/asyncapi-react/issues/498
|
|
62
|
+
|
|
63
|
+
- Updated dependencies
|
|
64
|
+
- @backstage/core-components@0.8.4
|
|
65
|
+
- @backstage/core-plugin-api@0.5.0
|
|
66
|
+
- @backstage/plugin-catalog-react@0.6.11
|
|
67
|
+
- @backstage/catalog-model@0.9.9
|
|
68
|
+
- @backstage/plugin-catalog@0.7.8
|
|
69
|
+
|
|
3
70
|
## 0.6.21
|
|
4
71
|
|
|
5
72
|
### Patch Changes
|
|
@@ -123,9 +123,10 @@ const OpenApiDefinition = ({ definition }) => {
|
|
|
123
123
|
className: classes.root
|
|
124
124
|
}, /* @__PURE__ */ React.createElement(SwaggerUI, {
|
|
125
125
|
spec: def,
|
|
126
|
+
url: "",
|
|
126
127
|
deepLinking: true
|
|
127
128
|
}));
|
|
128
129
|
};
|
|
129
130
|
|
|
130
131
|
export { OpenApiDefinition };
|
|
131
|
-
//# sourceMappingURL=OpenApiDefinition-
|
|
132
|
+
//# sourceMappingURL=OpenApiDefinition-3c1031f2.esm.js.map
|
package/dist/esm/{OpenApiDefinition-48ae3040.esm.js.map → OpenApiDefinition-3c1031f2.esm.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenApiDefinition-
|
|
1
|
+
{"version":3,"file":"OpenApiDefinition-3c1031f2.esm.js","sources":["../../src/components/OpenApiDefinitionWidget/OpenApiDefinition.tsx"],"sourcesContent":["/*\n * Copyright 2020 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 { makeStyles } from '@material-ui/core/styles';\nimport React, { useEffect, useState } from 'react';\nimport SwaggerUI from 'swagger-ui-react';\nimport 'swagger-ui-react/swagger-ui.css';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n '& .swagger-ui': {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n\n [`& .scheme-container`]: {\n backgroundColor: theme.palette.background.default,\n },\n [`& .opblock-tag,\n .opblock-tag small,\n table thead tr td,\n table thead tr th`]: {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n borderColor: theme.palette.divider,\n },\n [`& section.models,\n section.models.is-open h4`]: {\n borderColor: theme.palette.divider,\n },\n [`& .model-title,\n .model .renderedMarkdown,\n .model .description`]: {\n fontFamily: theme.typography.fontFamily,\n fontWeight: theme.typography.fontWeightRegular,\n },\n [`& h1, h2, h3, h4, h5, h6,\n .errors h4, .error h4, .opblock h4, section.models h4,\n .response-control-media-type__accept-message,\n .opblock-summary-description,\n .opblock-summary-operation-id,\n .opblock-summary-path,\n .opblock-summary-path__deprecated,\n .opblock-external-docs-wrapper,\n .opblock-section-header .btn,\n .opblock-section-header>label,\n .scheme-container .schemes>label,a.nostyle,\n .parameter__name,\n .response-col_status,\n .response-col_links,\n .error .btn,\n .info .title,\n .info .base-url`]: {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n },\n [`& .opblock .opblock-section-header, \n .model-box,\n section.models .model-container`]: {\n background: theme.palette.background.default,\n },\n [`& .prop-format,\n .parameter__in`]: {\n color: theme.palette.text.disabled,\n },\n [`& table.model, \n .parameter__type,\n .model.model-title,\n .model-title,\n .model span,\n .model .brace-open,\n .model .brace-close,\n .model .property.primitive,\n .model .renderedMarkdown,\n .model .description,\n .errors small`]: {\n color: theme.palette.text.secondary,\n },\n [`& .parameter__name.required:after`]: {\n color: theme.palette.warning.dark,\n },\n [`& table.model, \n table.model .model,\n .opblock-external-docs-wrapper`]: {\n fontSize: theme.typography.fontSize,\n },\n [`& table.headers td`]: {\n color: theme.palette.text.primary,\n fontWeight: theme.typography.fontWeightRegular,\n },\n [`& .model-hint`]: {\n color: theme.palette.text.hint,\n backgroundColor: theme.palette.background.paper,\n },\n [`& .opblock-summary-method, \n .info a`]: {\n fontFamily: theme.typography.fontFamily,\n },\n [`& .info, .opblock, .tab`]: {\n [`& li, p`]: {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n },\n },\n [`& a`]: {\n color: theme.palette.primary.main,\n },\n [`& .renderedMarkdown code`]: {\n color: theme.palette.secondary.light,\n },\n [`& .property-row td:first-child`]: {\n color: theme.palette.text.primary,\n },\n [`& span.prop-type`]: {\n color: theme.palette.success.light,\n },\n },\n },\n}));\n\nexport type OpenApiDefinitionProps = {\n definition: string;\n};\n\nexport const OpenApiDefinition = ({ definition }: OpenApiDefinitionProps) => {\n const classes = useStyles();\n\n // Due to a bug in the swagger-ui-react component, the component needs\n // to be created without content first.\n const [def, setDef] = useState('');\n\n useEffect(() => {\n const timer = setTimeout(() => setDef(definition), 0);\n return () => clearTimeout(timer);\n }, [definition, setDef]);\n\n return (\n <div className={classes.root}>\n <SwaggerUI spec={def} url=\"\" deepLinking />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;AAqBA,MAAM,YAAY,WAAW;AAAU,EACrC,MAAM;AAAA,IACJ,iBAAiB;AAAA,MACf,YAAY,MAAM,WAAW;AAAA,MAC7B,OAAO,MAAM,QAAQ,KAAK;AAAA,OAEzB,wBAAwB;AAAA,QACvB,iBAAiB,MAAM,QAAQ,WAAW;AAAA;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Y,MAAM,WAAW;AAAA,UAC7B,OAAO,MAAM,QAAQ,KAAK;AAAA;AAAA;AAAA,OAG7B,QAAQ;AAAA,QACP,OAAO,MAAM,QAAQ,QAAQ;AAAA;AAAA,OAE9B,6BAA6B;AAAA,QAC5B,OAAO,MAAM,QAAQ,UAAU;AAAA;AAAA,OAEhC,mCAAmC;AAAA,QAClC,OAAO,MAAM,QAAQ,KAAK;AAAA;AAAA,OAE3B,qBAAqB;AAAA,QACpB,OAAO,MAAM,QAAQ,QAAQ;AAAA;AAAA;AAAA;AAAA;MAUxB,oBAAoB,CAAC,EAAE,iBAAyC;AAC3E,QAAM,UAAU;AAIhB,QAAM,CAAC,KAAK,UAAU,SAAS;AAE/B,YAAU,MAAM;AACd,UAAM,QAAQ,WAAW,MAAM,OAAO,aAAa;AACnD,WAAO,MAAM,aAAa;AAAA,KACzB,CAAC,YAAY;AAEhB,6CACG,OAAD;AAAA,IAAK,WAAW,QAAQ;AAAA,yCACrB,WAAD;AAAA,IAAW,MAAM;AAAA,IAAK,KAAI;AAAA,IAAG,aAAW;AAAA;AAAA;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-1dc3ed84.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-446e3e5c.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-8a745bfb.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-d40626b4.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -84,6 +84,11 @@ declare type Props = {
|
|
|
84
84
|
};
|
|
85
85
|
declare const ProvidingComponentsCard: ({ variant }: Props) => JSX.Element;
|
|
86
86
|
|
|
87
|
+
declare type GraphQlDefinitionWidgetProps = {
|
|
88
|
+
definition: string;
|
|
89
|
+
};
|
|
90
|
+
declare const GraphQlDefinitionWidget: (props: GraphQlDefinitionWidgetProps) => JSX.Element;
|
|
91
|
+
|
|
87
92
|
declare type OpenApiDefinitionWidgetProps = {
|
|
88
93
|
definition: string;
|
|
89
94
|
};
|
|
@@ -103,7 +108,7 @@ interface ApiDocsConfig {
|
|
|
103
108
|
declare const apiDocsPlugin: _backstage_core_plugin_api.BackstagePlugin<{
|
|
104
109
|
root: _backstage_core_plugin_api.RouteRef<undefined>;
|
|
105
110
|
}, {
|
|
106
|
-
|
|
111
|
+
registerApi: _backstage_core_plugin_api.ExternalRouteRef<undefined, true>;
|
|
107
112
|
}>;
|
|
108
113
|
declare const ApiExplorerPage: (props: DefaultApiExplorerPageProps) => JSX.Element;
|
|
109
114
|
declare const EntityApiDefinitionCard: (_: {
|
|
@@ -129,4 +134,4 @@ declare const EntityHasApisCard: ({ variant }: {
|
|
|
129
134
|
variant?: "gridItem" | undefined;
|
|
130
135
|
}) => JSX.Element;
|
|
131
136
|
|
|
132
|
-
export { ApiDefinitionCard, ApiDefinitionWidget, ApiExplorerPage$1 as ApiExplorerIndexPage, ApiExplorerPage, ApiTypeTitle, AsyncApiDefinitionWidget, AsyncApiDefinitionWidgetProps, ConsumedApisCard, ConsumingComponentsCard, DefaultApiExplorerPage, DefaultApiExplorerPageProps, EntityApiDefinitionCard, EntityConsumedApisCard, EntityConsumingComponentsCard, EntityHasApisCard, EntityProvidedApisCard, EntityProvidingComponentsCard, HasApisCard, OpenApiDefinitionWidget, OpenApiDefinitionWidgetProps, PlainApiDefinitionWidget, PlainApiDefinitionWidgetProps, ProvidedApisCard, ProvidingComponentsCard, apiDocsConfigRef, apiDocsPlugin, defaultDefinitionWidgets, apiDocsPlugin as plugin };
|
|
137
|
+
export { ApiDefinitionCard, ApiDefinitionWidget, ApiExplorerPage$1 as ApiExplorerIndexPage, ApiExplorerPage, ApiTypeTitle, AsyncApiDefinitionWidget, AsyncApiDefinitionWidgetProps, ConsumedApisCard, ConsumingComponentsCard, DefaultApiExplorerPage, DefaultApiExplorerPageProps, EntityApiDefinitionCard, EntityConsumedApisCard, EntityConsumingComponentsCard, EntityHasApisCard, EntityProvidedApisCard, EntityProvidingComponentsCard, GraphQlDefinitionWidget, GraphQlDefinitionWidgetProps, HasApisCard, OpenApiDefinitionWidget, OpenApiDefinitionWidgetProps, PlainApiDefinitionWidget, PlainApiDefinitionWidgetProps, ProvidedApisCard, ProvidingComponentsCard, apiDocsConfigRef, apiDocsPlugin, defaultDefinitionWidgets, apiDocsPlugin as plugin };
|
package/dist/index.esm.js
CHANGED
|
@@ -11,8 +11,8 @@ import { Typography } from '@material-ui/core';
|
|
|
11
11
|
const rootRoute = createRouteRef({
|
|
12
12
|
id: "api-docs"
|
|
13
13
|
});
|
|
14
|
-
const
|
|
15
|
-
id: "
|
|
14
|
+
const registerComponentRouteRef = createExternalRouteRef({
|
|
15
|
+
id: "register-component",
|
|
16
16
|
optional: true
|
|
17
17
|
});
|
|
18
18
|
|
|
@@ -33,7 +33,7 @@ const DefaultApiExplorerPage = ({
|
|
|
33
33
|
var _a;
|
|
34
34
|
const configApi = useApi(configApiRef);
|
|
35
35
|
const generatedSubtitle = `${(_a = configApi.getOptionalString("organization.name")) != null ? _a : "Backstage"} API Explorer`;
|
|
36
|
-
const
|
|
36
|
+
const registerComponentLink = useRouteRef(registerComponentRouteRef);
|
|
37
37
|
return /* @__PURE__ */ React.createElement(PageWithHeader, {
|
|
38
38
|
themeId: "apis",
|
|
39
39
|
title: "APIs",
|
|
@@ -43,7 +43,7 @@ const DefaultApiExplorerPage = ({
|
|
|
43
43
|
title: ""
|
|
44
44
|
}, /* @__PURE__ */ React.createElement(CreateButton, {
|
|
45
45
|
title: "Register Existing API",
|
|
46
|
-
to:
|
|
46
|
+
to: registerComponentLink == null ? void 0 : registerComponentLink()
|
|
47
47
|
}), /* @__PURE__ */ React.createElement(SupportButton, null, "All your APIs")), /* @__PURE__ */ React.createElement(EntityListProvider, null, /* @__PURE__ */ React.createElement(FilteredEntityLayout, null, /* @__PURE__ */ React.createElement(FilterContainer, null, /* @__PURE__ */ React.createElement(EntityKindPicker, {
|
|
48
48
|
initialFilter: "api",
|
|
49
49
|
hidden: true
|
|
@@ -136,7 +136,7 @@ const GraphQlDefinitionWidget = (props) => {
|
|
|
136
136
|
}));
|
|
137
137
|
};
|
|
138
138
|
|
|
139
|
-
const LazyOpenApiDefinition = React.lazy(() => import('./esm/OpenApiDefinition-
|
|
139
|
+
const LazyOpenApiDefinition = React.lazy(() => import('./esm/OpenApiDefinition-3c1031f2.esm.js').then((m) => ({
|
|
140
140
|
default: m.OpenApiDefinition
|
|
141
141
|
})));
|
|
142
142
|
const OpenApiDefinitionWidget = (props) => {
|
|
@@ -434,50 +434,50 @@ const apiDocsPlugin = createPlugin({
|
|
|
434
434
|
})
|
|
435
435
|
],
|
|
436
436
|
externalRoutes: {
|
|
437
|
-
|
|
437
|
+
registerApi: registerComponentRouteRef
|
|
438
438
|
}
|
|
439
439
|
});
|
|
440
440
|
const ApiExplorerPage = apiDocsPlugin.provide(createRoutableExtension({
|
|
441
441
|
name: "ApiExplorerPage",
|
|
442
|
-
component: () => import('./esm/index-
|
|
442
|
+
component: () => import('./esm/index-1dc3ed84.esm.js').then((m) => m.ApiExplorerIndexPage),
|
|
443
443
|
mountPoint: rootRoute
|
|
444
444
|
}));
|
|
445
445
|
const EntityApiDefinitionCard = apiDocsPlugin.provide(createComponentExtension({
|
|
446
446
|
name: "EntityApiDefinitionCard",
|
|
447
447
|
component: {
|
|
448
|
-
lazy: () => import('./esm/index-
|
|
448
|
+
lazy: () => import('./esm/index-8a745bfb.esm.js').then((m) => m.ApiDefinitionCard)
|
|
449
449
|
}
|
|
450
450
|
}));
|
|
451
451
|
const EntityConsumedApisCard = apiDocsPlugin.provide(createComponentExtension({
|
|
452
452
|
name: "EntityConsumedApisCard",
|
|
453
453
|
component: {
|
|
454
|
-
lazy: () => import('./esm/index-
|
|
454
|
+
lazy: () => import('./esm/index-446e3e5c.esm.js').then((m) => m.ConsumedApisCard)
|
|
455
455
|
}
|
|
456
456
|
}));
|
|
457
457
|
const EntityConsumingComponentsCard = apiDocsPlugin.provide(createComponentExtension({
|
|
458
458
|
name: "EntityConsumingComponentsCard",
|
|
459
459
|
component: {
|
|
460
|
-
lazy: () => import('./esm/index-
|
|
460
|
+
lazy: () => import('./esm/index-d40626b4.esm.js').then((m) => m.ConsumingComponentsCard)
|
|
461
461
|
}
|
|
462
462
|
}));
|
|
463
463
|
const EntityProvidedApisCard = apiDocsPlugin.provide(createComponentExtension({
|
|
464
464
|
name: "EntityProvidedApisCard",
|
|
465
465
|
component: {
|
|
466
|
-
lazy: () => import('./esm/index-
|
|
466
|
+
lazy: () => import('./esm/index-446e3e5c.esm.js').then((m) => m.ProvidedApisCard)
|
|
467
467
|
}
|
|
468
468
|
}));
|
|
469
469
|
const EntityProvidingComponentsCard = apiDocsPlugin.provide(createComponentExtension({
|
|
470
470
|
name: "EntityProvidingComponentsCard",
|
|
471
471
|
component: {
|
|
472
|
-
lazy: () => import('./esm/index-
|
|
472
|
+
lazy: () => import('./esm/index-d40626b4.esm.js').then((m) => m.ProvidingComponentsCard)
|
|
473
473
|
}
|
|
474
474
|
}));
|
|
475
475
|
const EntityHasApisCard = apiDocsPlugin.provide(createComponentExtension({
|
|
476
476
|
name: "EntityHasApisCard",
|
|
477
477
|
component: {
|
|
478
|
-
lazy: () => import('./esm/index-
|
|
478
|
+
lazy: () => import('./esm/index-446e3e5c.esm.js').then((m) => m.HasApisCard)
|
|
479
479
|
}
|
|
480
480
|
}));
|
|
481
481
|
|
|
482
|
-
export { ApiDefinitionCard, ApiExplorerPage$1 as ApiExplorerIndexPage, ApiExplorerPage, ApiTypeTitle, AsyncApiDefinitionWidget, ConsumedApisCard, ConsumingComponentsCard, DefaultApiExplorerPage, EntityApiDefinitionCard, EntityConsumedApisCard, EntityConsumingComponentsCard, EntityHasApisCard, EntityProvidedApisCard, EntityProvidingComponentsCard, HasApisCard, OpenApiDefinitionWidget, PlainApiDefinitionWidget, ProvidedApisCard, ProvidingComponentsCard, apiDocsConfigRef, apiDocsPlugin, defaultDefinitionWidgets, apiDocsPlugin as plugin };
|
|
482
|
+
export { ApiDefinitionCard, ApiExplorerPage$1 as ApiExplorerIndexPage, ApiExplorerPage, ApiTypeTitle, AsyncApiDefinitionWidget, ConsumedApisCard, ConsumingComponentsCard, DefaultApiExplorerPage, EntityApiDefinitionCard, EntityConsumedApisCard, EntityConsumingComponentsCard, EntityHasApisCard, EntityProvidedApisCard, EntityProvidingComponentsCard, GraphQlDefinitionWidget, HasApisCard, OpenApiDefinitionWidget, PlainApiDefinitionWidget, ProvidedApisCard, ProvidingComponentsCard, apiDocsConfigRef, apiDocsPlugin, defaultDefinitionWidgets, apiDocsPlugin as plugin };
|
|
483
483
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../src/routes.ts","../src/components/ApiExplorerPage/DefaultApiExplorerPage.tsx","../src/components/ApiExplorerPage/ApiExplorerPage.tsx","../src/config.ts","../src/components/PlainApiDefinitionWidget/PlainApiDefinitionWidget.tsx","../src/components/ApiDefinitionCard/ApiDefinitionCard.tsx","../src/components/AsyncApiDefinitionWidget/AsyncApiDefinitionWidget.tsx","../src/components/GraphQlDefinitionWidget/GraphQlDefinitionWidget.tsx","../src/components/OpenApiDefinitionWidget/OpenApiDefinitionWidget.tsx","../src/components/ApiDefinitionCard/ApiDefinitionWidget.tsx","../src/components/ApiDefinitionCard/ApiTypeTitle.tsx","../src/components/ApisCards/presets.tsx","../src/components/ApisCards/ConsumedApisCard.tsx","../src/components/ApisCards/HasApisCard.tsx","../src/components/ApisCards/ProvidedApisCard.tsx","../src/components/ComponentsCards/ConsumingComponentsCard.tsx","../src/components/ComponentsCards/ProvidingComponentsCard.tsx","../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2020 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 {\n createExternalRouteRef,\n createRouteRef,\n} from '@backstage/core-plugin-api';\n\nexport const rootRoute = createRouteRef({\n id: 'api-docs',\n});\n\nexport const createComponentRouteRef = createExternalRouteRef({\n id: 'create-component',\n optional: true,\n});\n","/*\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 {\n Content,\n ContentHeader,\n CreateButton,\n PageWithHeader,\n SupportButton,\n TableColumn,\n TableProps,\n} from '@backstage/core-components';\nimport { configApiRef, useApi, useRouteRef } from '@backstage/core-plugin-api';\nimport {\n CatalogTable,\n CatalogTableRow,\n FilteredEntityLayout,\n EntityListContainer,\n FilterContainer,\n} from '@backstage/plugin-catalog';\nimport {\n EntityKindPicker,\n EntityLifecyclePicker,\n EntityListProvider,\n EntityOwnerPicker,\n EntityTagPicker,\n EntityTypePicker,\n UserListFilterKind,\n UserListPicker,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { createComponentRouteRef } from '../../routes';\n\nconst defaultColumns: TableColumn<CatalogTableRow>[] = [\n CatalogTable.columns.createNameColumn({ defaultKind: 'API' }),\n CatalogTable.columns.createSystemColumn(),\n CatalogTable.columns.createOwnerColumn(),\n CatalogTable.columns.createSpecTypeColumn(),\n CatalogTable.columns.createSpecLifecycleColumn(),\n CatalogTable.columns.createMetadataDescriptionColumn(),\n CatalogTable.columns.createTagsColumn(),\n];\n\n/**\n * DefaultApiExplorerPageProps\n * @public\n */\nexport type DefaultApiExplorerPageProps = {\n initiallySelectedFilter?: UserListFilterKind;\n columns?: TableColumn<CatalogTableRow>[];\n actions?: TableProps<CatalogTableRow>['actions'];\n};\n\n/**\n * DefaultApiExplorerPage\n * @public\n */\nexport const DefaultApiExplorerPage = ({\n initiallySelectedFilter = 'all',\n columns,\n actions,\n}: DefaultApiExplorerPageProps) => {\n const configApi = useApi(configApiRef);\n const generatedSubtitle = `${\n configApi.getOptionalString('organization.name') ?? 'Backstage'\n } API Explorer`;\n const createComponentLink = useRouteRef(createComponentRouteRef);\n\n return (\n <PageWithHeader\n themeId=\"apis\"\n title=\"APIs\"\n subtitle={generatedSubtitle}\n pageTitleOverride=\"APIs\"\n >\n <Content>\n <ContentHeader title=\"\">\n <CreateButton\n title=\"Register Existing API\"\n to={createComponentLink?.()}\n />\n <SupportButton>All your APIs</SupportButton>\n </ContentHeader>\n <EntityListProvider>\n <FilteredEntityLayout>\n <FilterContainer>\n <EntityKindPicker initialFilter=\"api\" hidden />\n <EntityTypePicker />\n <UserListPicker initialFilter={initiallySelectedFilter} />\n <EntityOwnerPicker />\n <EntityLifecyclePicker />\n <EntityTagPicker />\n </FilterContainer>\n <EntityListContainer>\n <CatalogTable\n columns={columns || defaultColumns}\n actions={actions}\n />\n </EntityListContainer>\n </FilteredEntityLayout>\n </EntityListProvider>\n </Content>\n </PageWithHeader>\n );\n};\n","/*\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 from 'react';\nimport { useOutlet } from 'react-router';\nimport {\n DefaultApiExplorerPage,\n DefaultApiExplorerPageProps,\n} from './DefaultApiExplorerPage';\n\n/**\n * ApiExplorerPage\n * @public\n */\nexport const ApiExplorerPage = (props: DefaultApiExplorerPageProps) => {\n const outlet = useOutlet();\n\n return outlet || <DefaultApiExplorerPage {...props} />;\n};\n","/*\n * Copyright 2020 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 { ApiEntity } from '@backstage/catalog-model';\nimport { ApiDefinitionWidget } from './components/ApiDefinitionCard/ApiDefinitionWidget';\nimport { createApiRef } from '@backstage/core-plugin-api';\n\nexport const apiDocsConfigRef = createApiRef<ApiDocsConfig>({\n id: 'plugin.api-docs.config',\n});\n\nexport interface ApiDocsConfig {\n getApiDefinitionWidget: (\n apiEntity: ApiEntity,\n ) => ApiDefinitionWidget | undefined;\n}\n","/*\n * Copyright 2020 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 from 'react';\nimport { CodeSnippet } from '@backstage/core-components';\n\nexport type PlainApiDefinitionWidgetProps = {\n definition: any;\n language: string;\n};\n\nexport const PlainApiDefinitionWidget = (\n props: PlainApiDefinitionWidgetProps,\n) => {\n return (\n <CodeSnippet\n text={props.definition}\n language={props.language}\n showCopyCodeButton\n />\n );\n};\n","/*\n * Copyright 2020 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 { ApiEntity } from '@backstage/catalog-model';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { Alert } from '@material-ui/lab';\nimport React from 'react';\nimport { apiDocsConfigRef } from '../../config';\nimport { PlainApiDefinitionWidget } from '../PlainApiDefinitionWidget';\n\nimport { CardTab, TabbedCard } from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\n\ntype Props = {\n /** @deprecated The entity is now grabbed from context instead */\n apiEntity?: ApiEntity;\n};\n\nexport const ApiDefinitionCard = (_: Props) => {\n const { entity } = useEntity<ApiEntity>();\n const config = useApi(apiDocsConfigRef);\n const { getApiDefinitionWidget } = config;\n\n if (!entity) {\n return <Alert severity=\"error\">Could not fetch the API</Alert>;\n }\n\n const definitionWidget = getApiDefinitionWidget(entity);\n const entityTitle = entity.metadata.title ?? entity.metadata.name;\n\n if (definitionWidget) {\n return (\n <TabbedCard title={entityTitle}>\n <CardTab label={definitionWidget.title} key=\"widget\">\n {definitionWidget.component(entity.spec.definition)}\n </CardTab>\n <CardTab label=\"Raw\" key=\"raw\">\n <PlainApiDefinitionWidget\n definition={entity.spec.definition}\n language={definitionWidget.rawLanguage || entity.spec.type}\n />\n </CardTab>\n </TabbedCard>\n );\n }\n\n return (\n <TabbedCard\n title={entityTitle}\n children={[\n // Has to be an array, otherwise typescript doesn't like that this has only a single child\n <CardTab label={entity.spec.type} key=\"raw\">\n <PlainApiDefinitionWidget\n definition={entity.spec.definition}\n language={entity.spec.type}\n />\n </CardTab>,\n ]}\n />\n );\n};\n","/*\n * Copyright 2020 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 { Progress } from '@backstage/core-components';\nimport React, { Suspense } from 'react';\n\n// The asyncapi component and related CSS has a significant size, only load it\n// if the element is actually used.\nconst LazyAsyncApiDefinition = React.lazy(() =>\n import('./AsyncApiDefinition').then(m => ({\n default: m.AsyncApiDefinition,\n })),\n);\n\nexport type AsyncApiDefinitionWidgetProps = {\n definition: string;\n};\n\nexport const AsyncApiDefinitionWidget = (\n props: AsyncApiDefinitionWidgetProps,\n) => {\n return (\n <Suspense fallback={<Progress />}>\n <LazyAsyncApiDefinition {...props} />\n </Suspense>\n );\n};\n","/*\n * Copyright 2020 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 { Progress } from '@backstage/core-components';\nimport React, { Suspense } from 'react';\n\n// The graphql component, graphql and related CSS has a significant size, only\n// load it if the element is actually used.\nconst LazyGraphQlDefinition = React.lazy(() =>\n import('./GraphQlDefinition').then(m => ({\n default: m.GraphQlDefinition,\n })),\n);\n\nexport type GraphQlDefinitionWidgetProps = {\n definition: string;\n};\n\nexport const GraphQlDefinitionWidget = (\n props: GraphQlDefinitionWidgetProps,\n) => {\n return (\n <Suspense fallback={<Progress />}>\n <LazyGraphQlDefinition {...props} />\n </Suspense>\n );\n};\n","/*\n * Copyright 2020 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 { Progress } from '@backstage/core-components';\nimport React, { Suspense } from 'react';\n\n// The swagger-ui component and related CSS has a significant size, only load it\n// if the element is actually used.\nconst LazyOpenApiDefinition = React.lazy(() =>\n import('./OpenApiDefinition').then(m => ({\n default: m.OpenApiDefinition,\n })),\n);\n\nexport type OpenApiDefinitionWidgetProps = {\n definition: string;\n};\n\nexport const OpenApiDefinitionWidget = (\n props: OpenApiDefinitionWidgetProps,\n) => {\n return (\n <Suspense fallback={<Progress />}>\n <LazyOpenApiDefinition {...props} />\n </Suspense>\n );\n};\n","/*\n * Copyright 2020 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 */\nimport React from 'react';\nimport { AsyncApiDefinitionWidget } from '../AsyncApiDefinitionWidget';\nimport { GraphQlDefinitionWidget } from '../GraphQlDefinitionWidget';\nimport { OpenApiDefinitionWidget } from '../OpenApiDefinitionWidget';\n\nexport type ApiDefinitionWidget = {\n type: string;\n title: string;\n component: (definition: string) => React.ReactElement;\n rawLanguage?: string;\n};\n\nexport function defaultDefinitionWidgets(): ApiDefinitionWidget[] {\n return [\n {\n type: 'openapi',\n title: 'OpenAPI',\n rawLanguage: 'yaml',\n component: definition => (\n <OpenApiDefinitionWidget definition={definition} />\n ),\n },\n {\n type: 'asyncapi',\n title: 'AsyncAPI',\n rawLanguage: 'yaml',\n component: definition => (\n <AsyncApiDefinitionWidget definition={definition} />\n ),\n },\n {\n type: 'graphql',\n title: 'GraphQL',\n rawLanguage: 'graphql',\n component: definition => (\n <GraphQlDefinitionWidget definition={definition} />\n ),\n },\n ];\n}\n","/*\n * Copyright 2020 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 { ApiEntity } from '@backstage/catalog-model';\nimport React from 'react';\nimport { apiDocsConfigRef } from '../../config';\nimport { useApi } from '@backstage/core-plugin-api';\n\nexport const ApiTypeTitle = ({ apiEntity }: { apiEntity: ApiEntity }) => {\n const config = useApi(apiDocsConfigRef);\n const definition = config.getApiDefinitionWidget(apiEntity);\n const type = definition ? definition.title : apiEntity.spec.type;\n\n return <span>{type}</span>;\n};\n","/*\n * Copyright 2020 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 { ApiEntity } from '@backstage/catalog-model';\nimport { EntityTable } from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { ApiTypeTitle } from '../ApiDefinitionCard';\nimport { TableColumn } from '@backstage/core-components';\n\nexport function createSpecApiTypeColumn(): TableColumn<ApiEntity> {\n return {\n title: 'Type',\n field: 'spec.type',\n render: entity => <ApiTypeTitle apiEntity={entity} />,\n };\n}\n\n// TODO: This could be moved to plugin-catalog-react if we wouldn't have a\n// special createSpecApiTypeColumn. But this is required to use ApiTypeTitle to\n// resolve the display name of an entity. Is the display name really worth it?\n\nexport const apiEntityColumns: TableColumn<ApiEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'API' }),\n EntityTable.columns.createSystemColumn(),\n EntityTable.columns.createOwnerColumn(),\n createSpecApiTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\n","/*\n * Copyright 2020 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 {\n ApiEntity,\n Entity,\n RELATION_CONSUMES_API,\n} from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { apiEntityColumns } from './presets';\nimport {\n CodeSnippet,\n InfoCard,\n Link,\n Progress,\n WarningPanel,\n} from '@backstage/core-components';\n\ntype Props = {\n /** @deprecated The entity is now grabbed from context instead */\n entity?: Entity;\n variant?: 'gridItem';\n};\n\nexport const ConsumedApisCard = ({ variant = 'gridItem' }: Props) => {\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: RELATION_CONSUMES_API,\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title=\"Consumed APIs\">\n <Progress />\n </InfoCard>\n );\n }\n\n if (error || !entities) {\n return (\n <InfoCard variant={variant} title=\"Consumed APIs\">\n <WarningPanel\n severity=\"error\"\n title=\"Could not load APIs\"\n message={<CodeSnippet text={`${error}`} language=\"text\" />}\n />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title=\"Consumed APIs\"\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">\n This {entity.kind.toLocaleLowerCase('en-US')} does not consume any\n APIs.\n </Typography>\n <Typography variant=\"body2\">\n <Link to=\"https://backstage.io/docs/features/software-catalog/descriptor-format#specconsumesapis-optional\">\n Learn how to change this.\n </Link>\n </Typography>\n </div>\n }\n columns={apiEntityColumns}\n entities={entities as ApiEntity[]}\n />\n );\n};\n","/*\n * Copyright 2020 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 { ApiEntity, RELATION_HAS_PART } from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { createSpecApiTypeColumn } from './presets';\nimport {\n CodeSnippet,\n InfoCard,\n Link,\n Progress,\n TableColumn,\n WarningPanel,\n} from '@backstage/core-components';\n\ntype Props = {\n variant?: 'gridItem';\n};\n\nconst columns: TableColumn<ApiEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'API' }),\n EntityTable.columns.createOwnerColumn(),\n createSpecApiTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\n\nexport const HasApisCard = ({ variant = 'gridItem' }: Props) => {\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: RELATION_HAS_PART,\n kind: 'API',\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title=\"APIs\">\n <Progress />\n </InfoCard>\n );\n }\n\n if (error || !entities) {\n return (\n <InfoCard variant={variant} title=\"APIs\">\n <WarningPanel\n severity=\"error\"\n title=\"Could not load APIs\"\n message={<CodeSnippet text={`${error}`} language=\"text\" />}\n />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title=\"APIs\"\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">\n This {entity.kind.toLocaleLowerCase('en-US')} does not contain any\n APIs.\n </Typography>\n <Typography variant=\"body2\">\n <Link to=\"https://backstage.io/docs/features/software-catalog/descriptor-format#kind-api\">\n Learn how to change this.\n </Link>\n </Typography>\n </div>\n }\n columns={columns}\n entities={entities as ApiEntity[]}\n />\n );\n};\n","/*\n * Copyright 2020 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 {\n ApiEntity,\n Entity,\n RELATION_PROVIDES_API,\n} from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { apiEntityColumns } from './presets';\nimport {\n CodeSnippet,\n InfoCard,\n Link,\n Progress,\n WarningPanel,\n} from '@backstage/core-components';\n\ntype Props = {\n /** @deprecated The entity is now grabbed from context instead */\n entity?: Entity;\n variant?: 'gridItem';\n};\n\nexport const ProvidedApisCard = ({ variant = 'gridItem' }: Props) => {\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: RELATION_PROVIDES_API,\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title=\"Provided APIs\">\n <Progress />\n </InfoCard>\n );\n }\n\n if (error || !entities) {\n return (\n <InfoCard variant={variant} title=\"Provided APIs\">\n <WarningPanel\n severity=\"error\"\n title=\"Could not load APIs\"\n message={<CodeSnippet text={`${error}`} language=\"text\" />}\n />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title=\"Provided APIs\"\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">\n This {entity.kind.toLocaleLowerCase('en-US')} does not provide any\n APIs.\n </Typography>\n <Typography variant=\"body2\">\n <Link to=\"https://backstage.io/docs/features/software-catalog/descriptor-format#specprovidesapis-optional\">\n Learn how to change this.\n </Link>\n </Typography>\n </div>\n }\n columns={apiEntityColumns}\n entities={entities as ApiEntity[]}\n />\n );\n};\n","/*\n * Copyright 2020 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 {\n ComponentEntity,\n Entity,\n RELATION_API_CONSUMED_BY,\n} from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n CodeSnippet,\n InfoCard,\n Link,\n Progress,\n WarningPanel,\n} from '@backstage/core-components';\n\ntype Props = {\n /** @deprecated The entity is now grabbed from context instead */\n entity?: Entity;\n variant?: 'gridItem';\n};\n\nexport const ConsumingComponentsCard = ({ variant = 'gridItem' }: Props) => {\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: RELATION_API_CONSUMED_BY,\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title=\"Consumers\">\n <Progress />\n </InfoCard>\n );\n }\n\n if (error || !entities) {\n return (\n <InfoCard variant={variant} title=\"Consumers\">\n <WarningPanel\n severity=\"error\"\n title=\"Could not load components\"\n message={<CodeSnippet text={`${error}`} language=\"text\" />}\n />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title=\"Consumers\"\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">\n No component consumes this API.\n </Typography>\n <Typography variant=\"body2\">\n <Link to=\"https://backstage.io/docs/features/software-catalog/descriptor-format#specconsumesapis-optional\">\n Learn how to change this.\n </Link>\n </Typography>\n </div>\n }\n columns={EntityTable.componentEntityColumns}\n entities={entities as ComponentEntity[]}\n />\n );\n};\n","/*\n * Copyright 2020 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 {\n ComponentEntity,\n Entity,\n RELATION_API_PROVIDED_BY,\n} from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n CodeSnippet,\n InfoCard,\n Link,\n Progress,\n WarningPanel,\n} from '@backstage/core-components';\n\ntype Props = {\n /** @deprecated The entity is now grabbed from context instead */\n entity?: Entity;\n variant?: 'gridItem';\n};\n\nexport const ProvidingComponentsCard = ({ variant = 'gridItem' }: Props) => {\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: RELATION_API_PROVIDED_BY,\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title=\"Providers\">\n <Progress />\n </InfoCard>\n );\n }\n\n if (error || !entities) {\n return (\n <InfoCard variant={variant} title=\"Providers\">\n <WarningPanel\n severity=\"error\"\n title=\"Could not load components\"\n message={<CodeSnippet text={`${error}`} language=\"text\" />}\n />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title=\"Providers\"\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">\n No component provides this API.\n </Typography>\n <Typography variant=\"body2\">\n <Link to=\"https://backstage.io/docs/features/software-catalog/descriptor-format#specprovidesapis-optional\">\n Learn how to change this.\n </Link>\n </Typography>\n </div>\n }\n columns={EntityTable.componentEntityColumns}\n entities={entities as ComponentEntity[]}\n />\n );\n};\n","/*\n * Copyright 2020 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 { ApiEntity } from '@backstage/catalog-model';\nimport { defaultDefinitionWidgets } from './components/ApiDefinitionCard';\nimport { apiDocsConfigRef } from './config';\nimport { createComponentRouteRef, rootRoute } from './routes';\nimport {\n createApiFactory,\n createComponentExtension,\n createPlugin,\n createRoutableExtension,\n} from '@backstage/core-plugin-api';\n\nexport const apiDocsPlugin = createPlugin({\n id: 'api-docs',\n routes: {\n root: rootRoute,\n },\n apis: [\n createApiFactory({\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 externalRoutes: {\n createComponent: createComponentRouteRef,\n },\n});\n\nexport const ApiExplorerPage = apiDocsPlugin.provide(\n createRoutableExtension({\n name: 'ApiExplorerPage',\n component: () =>\n import('./components/ApiExplorerPage').then(m => m.ApiExplorerIndexPage),\n mountPoint: rootRoute,\n }),\n);\n\nexport const EntityApiDefinitionCard = apiDocsPlugin.provide(\n createComponentExtension({\n name: 'EntityApiDefinitionCard',\n component: {\n lazy: () =>\n import('./components/ApiDefinitionCard').then(m => m.ApiDefinitionCard),\n },\n }),\n);\n\nexport const EntityConsumedApisCard = apiDocsPlugin.provide(\n createComponentExtension({\n name: 'EntityConsumedApisCard',\n component: {\n lazy: () =>\n import('./components/ApisCards').then(m => m.ConsumedApisCard),\n },\n }),\n);\n\nexport const EntityConsumingComponentsCard = apiDocsPlugin.provide(\n createComponentExtension({\n name: 'EntityConsumingComponentsCard',\n component: {\n lazy: () =>\n import('./components/ComponentsCards').then(\n m => m.ConsumingComponentsCard,\n ),\n },\n }),\n);\n\nexport const EntityProvidedApisCard = apiDocsPlugin.provide(\n createComponentExtension({\n name: 'EntityProvidedApisCard',\n component: {\n lazy: () =>\n import('./components/ApisCards').then(m => m.ProvidedApisCard),\n },\n }),\n);\n\nexport const EntityProvidingComponentsCard = apiDocsPlugin.provide(\n createComponentExtension({\n name: 'EntityProvidingComponentsCard',\n component: {\n lazy: () =>\n import('./components/ComponentsCards').then(\n m => m.ProvidingComponentsCard,\n ),\n },\n }),\n);\n\nexport const EntityHasApisCard = apiDocsPlugin.provide(\n createComponentExtension({\n name: 'EntityHasApisCard',\n component: {\n lazy: () => import('./components/ApisCards').then(m => m.HasApisCard),\n },\n }),\n);\n"],"names":["ApiExplorerPage"],"mappings":";;;;;;;;;;MAqBa,YAAY,eAAe;AAAA,EACtC,IAAI;AAAA;MAGO,0BAA0B,uBAAuB;AAAA,EAC5D,IAAI;AAAA,EACJ,UAAU;AAAA;;ACmBZ,MAAM,iBAAiD;AAAA,EACrD,aAAa,QAAQ,iBAAiB,EAAE,aAAa;AAAA,EACrD,aAAa,QAAQ;AAAA,EACrB,aAAa,QAAQ;AAAA,EACrB,aAAa,QAAQ;AAAA,EACrB,aAAa,QAAQ;AAAA,EACrB,aAAa,QAAQ;AAAA,EACrB,aAAa,QAAQ;AAAA;MAiBV,yBAAyB,CAAC;AAAA,EACrC,0BAA0B;AAAA,EAC1B;AAAA,EACA;AAAA,MACiC;AA1EnC;AA2EE,QAAM,YAAY,OAAO;AACzB,QAAM,oBAAoB,GACxB,gBAAU,kBAAkB,yBAA5B,YAAoD;AAEtD,QAAM,sBAAsB,YAAY;AAExC,6CACG,gBAAD;AAAA,IACE,SAAQ;AAAA,IACR,OAAM;AAAA,IACN,UAAU;AAAA,IACV,mBAAkB;AAAA,yCAEjB,SAAD,0CACG,eAAD;AAAA,IAAe,OAAM;AAAA,yCAClB,cAAD;AAAA,IACE,OAAM;AAAA,IACN,IAAI;AAAA,0CAEL,eAAD,MAAe,uDAEhB,oBAAD,0CACG,sBAAD,0CACG,iBAAD,0CACG,kBAAD;AAAA,IAAkB,eAAc;AAAA,IAAM,QAAM;AAAA,0CAC3C,kBAAD,2CACC,gBAAD;AAAA,IAAgB,eAAe;AAAA,0CAC9B,mBAAD,2CACC,uBAAD,2CACC,iBAAD,4CAED,qBAAD,0CACG,cAAD;AAAA,IACE,SAAS,WAAW;AAAA,IACpB;AAAA;AAAA;;MClFHA,oBAAkB,CAAC,UA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rC,OAAK,EAAE;AAAA;AAAA;MAMJ,yBAAyB,cAAc,QAClD,yBAAyB;AAAA,EACvB,MAAM;AAAA,EACN,WAAW;AAAA,IACT,MAAM,MACJ,OAAO,+BAA0B,KAAK,OAAK,EAAE;AAAA;AAAA;MAKxC,gCAAgC,cAAc,QACzD,yBAAyB;AAAA,EACvB,MAAM;AAAA,EACN,WAAW;AAAA,IACT,MAAM,MACJ,OAAO,+BAAgC,KACrC,OAAK,EAAE;AAAA;AAAA;MAMJ,oBAAoB,cAAc,QAC7C,yBAAyB;AAAA,EACvB,MAAM;AAAA,EACN,WAAW;AAAA,IACT,MAAM,MAAM,OAAO,+BAA0B,KAAK,OAAK,EAAE;AAAA;AAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../src/routes.ts","../src/components/ApiExplorerPage/DefaultApiExplorerPage.tsx","../src/components/ApiExplorerPage/ApiExplorerPage.tsx","../src/config.ts","../src/components/PlainApiDefinitionWidget/PlainApiDefinitionWidget.tsx","../src/components/ApiDefinitionCard/ApiDefinitionCard.tsx","../src/components/AsyncApiDefinitionWidget/AsyncApiDefinitionWidget.tsx","../src/components/GraphQlDefinitionWidget/GraphQlDefinitionWidget.tsx","../src/components/OpenApiDefinitionWidget/OpenApiDefinitionWidget.tsx","../src/components/ApiDefinitionCard/ApiDefinitionWidget.tsx","../src/components/ApiDefinitionCard/ApiTypeTitle.tsx","../src/components/ApisCards/presets.tsx","../src/components/ApisCards/ConsumedApisCard.tsx","../src/components/ApisCards/HasApisCard.tsx","../src/components/ApisCards/ProvidedApisCard.tsx","../src/components/ComponentsCards/ConsumingComponentsCard.tsx","../src/components/ComponentsCards/ProvidingComponentsCard.tsx","../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2020 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 {\n createExternalRouteRef,\n createRouteRef,\n} from '@backstage/core-plugin-api';\n\nexport const rootRoute = createRouteRef({\n id: 'api-docs',\n});\n\nexport const registerComponentRouteRef = createExternalRouteRef({\n id: 'register-component',\n optional: true,\n});\n","/*\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 {\n Content,\n ContentHeader,\n CreateButton,\n PageWithHeader,\n SupportButton,\n TableColumn,\n TableProps,\n} from '@backstage/core-components';\nimport { configApiRef, useApi, useRouteRef } from '@backstage/core-plugin-api';\nimport {\n CatalogTable,\n CatalogTableRow,\n FilteredEntityLayout,\n EntityListContainer,\n FilterContainer,\n} from '@backstage/plugin-catalog';\nimport {\n EntityKindPicker,\n EntityLifecyclePicker,\n EntityListProvider,\n EntityOwnerPicker,\n EntityTagPicker,\n EntityTypePicker,\n UserListFilterKind,\n UserListPicker,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { registerComponentRouteRef } from '../../routes';\n\nconst defaultColumns: TableColumn<CatalogTableRow>[] = [\n CatalogTable.columns.createNameColumn({ defaultKind: 'API' }),\n CatalogTable.columns.createSystemColumn(),\n CatalogTable.columns.createOwnerColumn(),\n CatalogTable.columns.createSpecTypeColumn(),\n CatalogTable.columns.createSpecLifecycleColumn(),\n CatalogTable.columns.createMetadataDescriptionColumn(),\n CatalogTable.columns.createTagsColumn(),\n];\n\n/**\n * DefaultApiExplorerPageProps\n * @public\n */\nexport type DefaultApiExplorerPageProps = {\n initiallySelectedFilter?: UserListFilterKind;\n columns?: TableColumn<CatalogTableRow>[];\n actions?: TableProps<CatalogTableRow>['actions'];\n};\n\n/**\n * DefaultApiExplorerPage\n * @public\n */\nexport const DefaultApiExplorerPage = ({\n initiallySelectedFilter = 'all',\n columns,\n actions,\n}: DefaultApiExplorerPageProps) => {\n const configApi = useApi(configApiRef);\n const generatedSubtitle = `${\n configApi.getOptionalString('organization.name') ?? 'Backstage'\n } API Explorer`;\n const registerComponentLink = useRouteRef(registerComponentRouteRef);\n\n return (\n <PageWithHeader\n themeId=\"apis\"\n title=\"APIs\"\n subtitle={generatedSubtitle}\n pageTitleOverride=\"APIs\"\n >\n <Content>\n <ContentHeader title=\"\">\n <CreateButton\n title=\"Register Existing API\"\n to={registerComponentLink?.()}\n />\n <SupportButton>All your APIs</SupportButton>\n </ContentHeader>\n <EntityListProvider>\n <FilteredEntityLayout>\n <FilterContainer>\n <EntityKindPicker initialFilter=\"api\" hidden />\n <EntityTypePicker />\n <UserListPicker initialFilter={initiallySelectedFilter} />\n <EntityOwnerPicker />\n <EntityLifecyclePicker />\n <EntityTagPicker />\n </FilterContainer>\n <EntityListContainer>\n <CatalogTable\n columns={columns || defaultColumns}\n actions={actions}\n />\n </EntityListContainer>\n </FilteredEntityLayout>\n </EntityListProvider>\n </Content>\n </PageWithHeader>\n );\n};\n","/*\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 from 'react';\nimport { useOutlet } from 'react-router';\nimport {\n DefaultApiExplorerPage,\n DefaultApiExplorerPageProps,\n} from './DefaultApiExplorerPage';\n\n/**\n * ApiExplorerPage\n * @public\n */\nexport const ApiExplorerPage = (props: DefaultApiExplorerPageProps) => {\n const outlet = useOutlet();\n\n return outlet || <DefaultApiExplorerPage {...props} />;\n};\n","/*\n * Copyright 2020 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 { ApiEntity } from '@backstage/catalog-model';\nimport { ApiDefinitionWidget } from './components/ApiDefinitionCard/ApiDefinitionWidget';\nimport { createApiRef } from '@backstage/core-plugin-api';\n\nexport const apiDocsConfigRef = createApiRef<ApiDocsConfig>({\n id: 'plugin.api-docs.config',\n});\n\nexport interface ApiDocsConfig {\n getApiDefinitionWidget: (\n apiEntity: ApiEntity,\n ) => ApiDefinitionWidget | undefined;\n}\n","/*\n * Copyright 2020 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 from 'react';\nimport { CodeSnippet } from '@backstage/core-components';\n\nexport type PlainApiDefinitionWidgetProps = {\n definition: any;\n language: string;\n};\n\nexport const PlainApiDefinitionWidget = (\n props: PlainApiDefinitionWidgetProps,\n) => {\n return (\n <CodeSnippet\n text={props.definition}\n language={props.language}\n showCopyCodeButton\n />\n );\n};\n","/*\n * Copyright 2020 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 { ApiEntity } from '@backstage/catalog-model';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { Alert } from '@material-ui/lab';\nimport React from 'react';\nimport { apiDocsConfigRef } from '../../config';\nimport { PlainApiDefinitionWidget } from '../PlainApiDefinitionWidget';\n\nimport { CardTab, TabbedCard } from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\n\ntype Props = {\n /** @deprecated The entity is now grabbed from context instead */\n apiEntity?: ApiEntity;\n};\n\nexport const ApiDefinitionCard = (_: Props) => {\n const { entity } = useEntity<ApiEntity>();\n const config = useApi(apiDocsConfigRef);\n const { getApiDefinitionWidget } = config;\n\n if (!entity) {\n return <Alert severity=\"error\">Could not fetch the API</Alert>;\n }\n\n const definitionWidget = getApiDefinitionWidget(entity);\n const entityTitle = entity.metadata.title ?? entity.metadata.name;\n\n if (definitionWidget) {\n return (\n <TabbedCard title={entityTitle}>\n <CardTab label={definitionWidget.title} key=\"widget\">\n {definitionWidget.component(entity.spec.definition)}\n </CardTab>\n <CardTab label=\"Raw\" key=\"raw\">\n <PlainApiDefinitionWidget\n definition={entity.spec.definition}\n language={definitionWidget.rawLanguage || entity.spec.type}\n />\n </CardTab>\n </TabbedCard>\n );\n }\n\n return (\n <TabbedCard\n title={entityTitle}\n children={[\n // Has to be an array, otherwise typescript doesn't like that this has only a single child\n <CardTab label={entity.spec.type} key=\"raw\">\n <PlainApiDefinitionWidget\n definition={entity.spec.definition}\n language={entity.spec.type}\n />\n </CardTab>,\n ]}\n />\n );\n};\n","/*\n * Copyright 2020 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 { Progress } from '@backstage/core-components';\nimport React, { Suspense } from 'react';\n\n// The asyncapi component and related CSS has a significant size, only load it\n// if the element is actually used.\nconst LazyAsyncApiDefinition = React.lazy(() =>\n import('./AsyncApiDefinition').then(m => ({\n default: m.AsyncApiDefinition,\n })),\n);\n\nexport type AsyncApiDefinitionWidgetProps = {\n definition: string;\n};\n\nexport const AsyncApiDefinitionWidget = (\n props: AsyncApiDefinitionWidgetProps,\n) => {\n return (\n <Suspense fallback={<Progress />}>\n <LazyAsyncApiDefinition {...props} />\n </Suspense>\n );\n};\n","/*\n * Copyright 2020 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 { Progress } from '@backstage/core-components';\nimport React, { Suspense } from 'react';\n\n// The graphql component, graphql and related CSS has a significant size, only\n// load it if the element is actually used.\nconst LazyGraphQlDefinition = React.lazy(() =>\n import('./GraphQlDefinition').then(m => ({\n default: m.GraphQlDefinition,\n })),\n);\n\nexport type GraphQlDefinitionWidgetProps = {\n definition: string;\n};\n\nexport const GraphQlDefinitionWidget = (\n props: GraphQlDefinitionWidgetProps,\n) => {\n return (\n <Suspense fallback={<Progress />}>\n <LazyGraphQlDefinition {...props} />\n </Suspense>\n );\n};\n","/*\n * Copyright 2020 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 { Progress } from '@backstage/core-components';\nimport React, { Suspense } from 'react';\n\n// The swagger-ui component and related CSS has a significant size, only load it\n// if the element is actually used.\nconst LazyOpenApiDefinition = React.lazy(() =>\n import('./OpenApiDefinition').then(m => ({\n default: m.OpenApiDefinition,\n })),\n);\n\nexport type OpenApiDefinitionWidgetProps = {\n definition: string;\n};\n\nexport const OpenApiDefinitionWidget = (\n props: OpenApiDefinitionWidgetProps,\n) => {\n return (\n <Suspense fallback={<Progress />}>\n <LazyOpenApiDefinition {...props} />\n </Suspense>\n );\n};\n","/*\n * Copyright 2020 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 */\nimport React from 'react';\nimport { AsyncApiDefinitionWidget } from '../AsyncApiDefinitionWidget';\nimport { GraphQlDefinitionWidget } from '../GraphQlDefinitionWidget';\nimport { OpenApiDefinitionWidget } from '../OpenApiDefinitionWidget';\n\nexport type ApiDefinitionWidget = {\n type: string;\n title: string;\n component: (definition: string) => React.ReactElement;\n rawLanguage?: string;\n};\n\nexport function defaultDefinitionWidgets(): ApiDefinitionWidget[] {\n return [\n {\n type: 'openapi',\n title: 'OpenAPI',\n rawLanguage: 'yaml',\n component: definition => (\n <OpenApiDefinitionWidget definition={definition} />\n ),\n },\n {\n type: 'asyncapi',\n title: 'AsyncAPI',\n rawLanguage: 'yaml',\n component: definition => (\n <AsyncApiDefinitionWidget definition={definition} />\n ),\n },\n {\n type: 'graphql',\n title: 'GraphQL',\n rawLanguage: 'graphql',\n component: definition => (\n <GraphQlDefinitionWidget definition={definition} />\n ),\n },\n ];\n}\n","/*\n * Copyright 2020 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 { ApiEntity } from '@backstage/catalog-model';\nimport React from 'react';\nimport { apiDocsConfigRef } from '../../config';\nimport { useApi } from '@backstage/core-plugin-api';\n\nexport const ApiTypeTitle = ({ apiEntity }: { apiEntity: ApiEntity }) => {\n const config = useApi(apiDocsConfigRef);\n const definition = config.getApiDefinitionWidget(apiEntity);\n const type = definition ? definition.title : apiEntity.spec.type;\n\n return <span>{type}</span>;\n};\n","/*\n * Copyright 2020 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 { ApiEntity } from '@backstage/catalog-model';\nimport { EntityTable } from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { ApiTypeTitle } from '../ApiDefinitionCard';\nimport { TableColumn } from '@backstage/core-components';\n\nexport function createSpecApiTypeColumn(): TableColumn<ApiEntity> {\n return {\n title: 'Type',\n field: 'spec.type',\n render: entity => <ApiTypeTitle apiEntity={entity} />,\n };\n}\n\n// TODO: This could be moved to plugin-catalog-react if we wouldn't have a\n// special createSpecApiTypeColumn. But this is required to use ApiTypeTitle to\n// resolve the display name of an entity. Is the display name really worth it?\n\nexport const apiEntityColumns: TableColumn<ApiEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'API' }),\n EntityTable.columns.createSystemColumn(),\n EntityTable.columns.createOwnerColumn(),\n createSpecApiTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\n","/*\n * Copyright 2020 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 {\n ApiEntity,\n Entity,\n RELATION_CONSUMES_API,\n} from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { apiEntityColumns } from './presets';\nimport {\n CodeSnippet,\n InfoCard,\n Link,\n Progress,\n WarningPanel,\n} from '@backstage/core-components';\n\ntype Props = {\n /** @deprecated The entity is now grabbed from context instead */\n entity?: Entity;\n variant?: 'gridItem';\n};\n\nexport const ConsumedApisCard = ({ variant = 'gridItem' }: Props) => {\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: RELATION_CONSUMES_API,\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title=\"Consumed APIs\">\n <Progress />\n </InfoCard>\n );\n }\n\n if (error || !entities) {\n return (\n <InfoCard variant={variant} title=\"Consumed APIs\">\n <WarningPanel\n severity=\"error\"\n title=\"Could not load APIs\"\n message={<CodeSnippet text={`${error}`} language=\"text\" />}\n />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title=\"Consumed APIs\"\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">\n This {entity.kind.toLocaleLowerCase('en-US')} does not consume any\n APIs.\n </Typography>\n <Typography variant=\"body2\">\n <Link to=\"https://backstage.io/docs/features/software-catalog/descriptor-format#specconsumesapis-optional\">\n Learn how to change this.\n </Link>\n </Typography>\n </div>\n }\n columns={apiEntityColumns}\n entities={entities as ApiEntity[]}\n />\n );\n};\n","/*\n * Copyright 2020 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 { ApiEntity, RELATION_HAS_PART } from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { createSpecApiTypeColumn } from './presets';\nimport {\n CodeSnippet,\n InfoCard,\n Link,\n Progress,\n TableColumn,\n WarningPanel,\n} from '@backstage/core-components';\n\ntype Props = {\n variant?: 'gridItem';\n};\n\nconst columns: TableColumn<ApiEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'API' }),\n EntityTable.columns.createOwnerColumn(),\n createSpecApiTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\n\nexport const HasApisCard = ({ variant = 'gridItem' }: Props) => {\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: RELATION_HAS_PART,\n kind: 'API',\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title=\"APIs\">\n <Progress />\n </InfoCard>\n );\n }\n\n if (error || !entities) {\n return (\n <InfoCard variant={variant} title=\"APIs\">\n <WarningPanel\n severity=\"error\"\n title=\"Could not load APIs\"\n message={<CodeSnippet text={`${error}`} language=\"text\" />}\n />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title=\"APIs\"\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">\n This {entity.kind.toLocaleLowerCase('en-US')} does not contain any\n APIs.\n </Typography>\n <Typography variant=\"body2\">\n <Link to=\"https://backstage.io/docs/features/software-catalog/descriptor-format#kind-api\">\n Learn how to change this.\n </Link>\n </Typography>\n </div>\n }\n columns={columns}\n entities={entities as ApiEntity[]}\n />\n );\n};\n","/*\n * Copyright 2020 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 {\n ApiEntity,\n Entity,\n RELATION_PROVIDES_API,\n} from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { apiEntityColumns } from './presets';\nimport {\n CodeSnippet,\n InfoCard,\n Link,\n Progress,\n WarningPanel,\n} from '@backstage/core-components';\n\ntype Props = {\n /** @deprecated The entity is now grabbed from context instead */\n entity?: Entity;\n variant?: 'gridItem';\n};\n\nexport const ProvidedApisCard = ({ variant = 'gridItem' }: Props) => {\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: RELATION_PROVIDES_API,\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title=\"Provided APIs\">\n <Progress />\n </InfoCard>\n );\n }\n\n if (error || !entities) {\n return (\n <InfoCard variant={variant} title=\"Provided APIs\">\n <WarningPanel\n severity=\"error\"\n title=\"Could not load APIs\"\n message={<CodeSnippet text={`${error}`} language=\"text\" />}\n />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title=\"Provided APIs\"\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">\n This {entity.kind.toLocaleLowerCase('en-US')} does not provide any\n APIs.\n </Typography>\n <Typography variant=\"body2\">\n <Link to=\"https://backstage.io/docs/features/software-catalog/descriptor-format#specprovidesapis-optional\">\n Learn how to change this.\n </Link>\n </Typography>\n </div>\n }\n columns={apiEntityColumns}\n entities={entities as ApiEntity[]}\n />\n );\n};\n","/*\n * Copyright 2020 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 {\n ComponentEntity,\n Entity,\n RELATION_API_CONSUMED_BY,\n} from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n CodeSnippet,\n InfoCard,\n Link,\n Progress,\n WarningPanel,\n} from '@backstage/core-components';\n\ntype Props = {\n /** @deprecated The entity is now grabbed from context instead */\n entity?: Entity;\n variant?: 'gridItem';\n};\n\nexport const ConsumingComponentsCard = ({ variant = 'gridItem' }: Props) => {\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: RELATION_API_CONSUMED_BY,\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title=\"Consumers\">\n <Progress />\n </InfoCard>\n );\n }\n\n if (error || !entities) {\n return (\n <InfoCard variant={variant} title=\"Consumers\">\n <WarningPanel\n severity=\"error\"\n title=\"Could not load components\"\n message={<CodeSnippet text={`${error}`} language=\"text\" />}\n />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title=\"Consumers\"\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">\n No component consumes this API.\n </Typography>\n <Typography variant=\"body2\">\n <Link to=\"https://backstage.io/docs/features/software-catalog/descriptor-format#specconsumesapis-optional\">\n Learn how to change this.\n </Link>\n </Typography>\n </div>\n }\n columns={EntityTable.componentEntityColumns}\n entities={entities as ComponentEntity[]}\n />\n );\n};\n","/*\n * Copyright 2020 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 {\n ComponentEntity,\n Entity,\n RELATION_API_PROVIDED_BY,\n} from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n CodeSnippet,\n InfoCard,\n Link,\n Progress,\n WarningPanel,\n} from '@backstage/core-components';\n\ntype Props = {\n /** @deprecated The entity is now grabbed from context instead */\n entity?: Entity;\n variant?: 'gridItem';\n};\n\nexport const ProvidingComponentsCard = ({ variant = 'gridItem' }: Props) => {\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: RELATION_API_PROVIDED_BY,\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title=\"Providers\">\n <Progress />\n </InfoCard>\n );\n }\n\n if (error || !entities) {\n return (\n <InfoCard variant={variant} title=\"Providers\">\n <WarningPanel\n severity=\"error\"\n title=\"Could not load components\"\n message={<CodeSnippet text={`${error}`} language=\"text\" />}\n />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title=\"Providers\"\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">\n No component provides this API.\n </Typography>\n <Typography variant=\"body2\">\n <Link to=\"https://backstage.io/docs/features/software-catalog/descriptor-format#specprovidesapis-optional\">\n Learn how to change this.\n </Link>\n </Typography>\n </div>\n }\n columns={EntityTable.componentEntityColumns}\n entities={entities as ComponentEntity[]}\n />\n );\n};\n","/*\n * Copyright 2020 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 { ApiEntity } from '@backstage/catalog-model';\nimport { defaultDefinitionWidgets } from './components/ApiDefinitionCard';\nimport { apiDocsConfigRef } from './config';\nimport { registerComponentRouteRef, rootRoute } from './routes';\nimport {\n createApiFactory,\n createComponentExtension,\n createPlugin,\n createRoutableExtension,\n} from '@backstage/core-plugin-api';\n\nexport const apiDocsPlugin = createPlugin({\n id: 'api-docs',\n routes: {\n root: rootRoute,\n },\n apis: [\n createApiFactory({\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 externalRoutes: {\n registerApi: registerComponentRouteRef,\n },\n});\n\nexport const ApiExplorerPage = apiDocsPlugin.provide(\n createRoutableExtension({\n name: 'ApiExplorerPage',\n component: () =>\n import('./components/ApiExplorerPage').then(m => m.ApiExplorerIndexPage),\n mountPoint: rootRoute,\n }),\n);\n\nexport const EntityApiDefinitionCard = apiDocsPlugin.provide(\n createComponentExtension({\n name: 'EntityApiDefinitionCard',\n component: {\n lazy: () =>\n import('./components/ApiDefinitionCard').then(m => m.ApiDefinitionCard),\n },\n }),\n);\n\nexport const EntityConsumedApisCard = apiDocsPlugin.provide(\n createComponentExtension({\n name: 'EntityConsumedApisCard',\n component: {\n lazy: () =>\n import('./components/ApisCards').then(m => m.ConsumedApisCard),\n },\n }),\n);\n\nexport const EntityConsumingComponentsCard = apiDocsPlugin.provide(\n createComponentExtension({\n name: 'EntityConsumingComponentsCard',\n component: {\n lazy: () =>\n import('./components/ComponentsCards').then(\n m => m.ConsumingComponentsCard,\n ),\n },\n }),\n);\n\nexport const EntityProvidedApisCard = apiDocsPlugin.provide(\n createComponentExtension({\n name: 'EntityProvidedApisCard',\n component: {\n lazy: () =>\n import('./components/ApisCards').then(m => m.ProvidedApisCard),\n },\n }),\n);\n\nexport const EntityProvidingComponentsCard = apiDocsPlugin.provide(\n createComponentExtension({\n name: 'EntityProvidingComponentsCard',\n component: {\n lazy: () =>\n import('./components/ComponentsCards').then(\n m => m.ProvidingComponentsCard,\n ),\n },\n }),\n);\n\nexport const EntityHasApisCard = apiDocsPlugin.provide(\n createComponentExtension({\n name: 'EntityHasApisCard',\n component: {\n lazy: () => import('./components/ApisCards').then(m => m.HasApisCard),\n },\n }),\n);\n"],"names":["ApiExplorerPage"],"mappings":";;;;;;;;;;MAqBa,YAAY,eAAe;AAAA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vB,MAAM;AAAA,EACN,WAAW;AAAA,IACT,MAAM,MACJ,OAAO,+BAAgC,KACrC,OAAK,EAAE;AAAA;AAAA;MAMJ,oBAAoB,cAAc,QAC7C,yBAAyB;AAAA,EACvB,MAAM;AAAA,EACN,WAAW;AAAA,IACT,MAAM,MAAM,OAAO,+BAA0B,KAAK,OAAK,EAAE;AAAA;AAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-api-docs",
|
|
3
3
|
"description": "A Backstage plugin that helps represent API entities in the frontend",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.7.1-next.0",
|
|
5
5
|
"main": "dist/index.esm.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
"clean": "backstage-cli clean"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@asyncapi/react-component": "
|
|
34
|
-
"@backstage/catalog-model": "^0.9.
|
|
35
|
-
"@backstage/core-components": "^0.8.
|
|
36
|
-
"@backstage/core-plugin-api": "^0.
|
|
37
|
-
"@backstage/plugin-catalog": "^0.7.
|
|
38
|
-
"@backstage/plugin-catalog-react": "^0.6.
|
|
33
|
+
"@asyncapi/react-component": "1.0.0-next.32",
|
|
34
|
+
"@backstage/catalog-model": "^0.9.10",
|
|
35
|
+
"@backstage/core-components": "^0.8.7-next.0",
|
|
36
|
+
"@backstage/core-plugin-api": "^0.6.0",
|
|
37
|
+
"@backstage/plugin-catalog": "^0.7.11-next.0",
|
|
38
|
+
"@backstage/plugin-catalog-react": "^0.6.13-next.0",
|
|
39
39
|
"@backstage/theme": "^0.2.14",
|
|
40
40
|
"@material-ui/core": "^4.12.2",
|
|
41
41
|
"@material-ui/icons": "^4.9.1",
|
|
@@ -46,29 +46,28 @@
|
|
|
46
46
|
"react-router": "6.0.0-beta.0",
|
|
47
47
|
"react-router-dom": "6.0.0-beta.0",
|
|
48
48
|
"react-use": "^17.2.4",
|
|
49
|
-
"swagger-
|
|
50
|
-
"swagger-ui-react": "^4.0.0-rc.3"
|
|
49
|
+
"swagger-ui-react": "^4.1.3"
|
|
51
50
|
},
|
|
52
51
|
"peerDependencies": {
|
|
53
52
|
"@types/react": "^16.13.1 || ^17.0.0",
|
|
54
53
|
"react": "^16.13.1 || ^17.0.0"
|
|
55
54
|
},
|
|
56
55
|
"devDependencies": {
|
|
57
|
-
"@backstage/cli": "^0.
|
|
58
|
-
"@backstage/core-app-api": "^0.
|
|
59
|
-
"@backstage/dev-utils": "^0.2.
|
|
60
|
-
"@backstage/test-utils": "^0.2.
|
|
56
|
+
"@backstage/cli": "^0.13.1-next.0",
|
|
57
|
+
"@backstage/core-app-api": "^0.5.1",
|
|
58
|
+
"@backstage/dev-utils": "^0.2.20-next.0",
|
|
59
|
+
"@backstage/test-utils": "^0.2.3",
|
|
61
60
|
"@testing-library/jest-dom": "^5.10.1",
|
|
62
61
|
"@testing-library/react": "^11.2.5",
|
|
63
62
|
"@testing-library/user-event": "^13.1.8",
|
|
64
63
|
"@types/jest": "^26.0.7",
|
|
65
64
|
"@types/node": "^14.14.32",
|
|
66
|
-
"@types/swagger-ui-react": "^
|
|
65
|
+
"@types/swagger-ui-react": "^4.1.1",
|
|
67
66
|
"cross-fetch": "^3.0.6",
|
|
68
67
|
"msw": "^0.35.0"
|
|
69
68
|
},
|
|
70
69
|
"files": [
|
|
71
70
|
"dist"
|
|
72
71
|
],
|
|
73
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "a28838ac5c80c7332caa6ca0569d2ec85151784f"
|
|
74
73
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-02cb4cdc.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-30e4d7f8.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-32c80387.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-89d097b6.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|