@backstage-community/plugin-graphql-voyager 0.21.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @backstage-community/plugin-graphql-voyager
2
2
 
3
+ ## 0.23.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 1c5aa6d: Backstage version bump to v1.57.1
8
+
9
+ ### Patch Changes
10
+
11
+ - 1c5aa6d: Replaced deprecated Backstage core components on the GraphQL Voyager page with their Backstage UI equivalents. The page header and layout now use Backstage UI styling.
12
+
13
+ ## 0.22.0
14
+
15
+ ### Minor Changes
16
+
17
+ - cb4c949: Backstage version bump to v1.56.2
18
+
3
19
  ## 0.21.0
4
20
 
5
21
  ### Minor Changes
@@ -5,7 +5,8 @@ import Tab from '@material-ui/core/Tab';
5
5
  import Tabs from '@material-ui/core/Tabs';
6
6
  import Typography from '@material-ui/core/Typography';
7
7
  import { makeStyles } from '@material-ui/core/styles';
8
- import { Content, Progress, ErrorPanel } from '@backstage/core-components';
8
+ import { Progress, ErrorPanel } from '@backstage/core-components';
9
+ import { Box } from '@backstage/ui';
9
10
  import { Voyager } from 'graphql-voyager';
10
11
  import useAsync from 'react-use/esm/useAsync';
11
12
 
@@ -48,7 +49,7 @@ const VoyagerBrowser = (props) => {
48
49
  children: endpoints.map(({ title, id }, index) => /* @__PURE__ */ jsx(Tab, { label: title, value: index }, id))
49
50
  }
50
51
  ),
51
- /* @__PURE__ */ jsx(Content, { children: /* @__PURE__ */ jsx(VoyagerBrowserContent, { endpoint: endpoints[tabIndex] }) })
52
+ /* @__PURE__ */ jsx(Box, { p: "6", children: /* @__PURE__ */ jsx(VoyagerBrowserContent, { endpoint: endpoints[tabIndex] }) })
52
53
  ] }) });
53
54
  };
54
55
  const GraphQLVoyagerBrowser = (props) => {
@@ -1 +1 @@
1
- {"version":3,"file":"GraphQLVoyagerBrowser.esm.js","sources":["../../../src/components/GraphQLVoyagerBrowser/GraphQLVoyagerBrowser.tsx"],"sourcesContent":["/*\n * Copyright 2023 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 GraphQLVoyagerEndpoint,\n introspectionQuery,\n} from '../../lib/api/types';\nimport { useState } from 'react';\nimport Tab from '@material-ui/core/Tab';\nimport Tabs from '@material-ui/core/Tabs';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { Suspense } from 'react';\nimport { Content, ErrorPanel, Progress } from '@backstage/core-components';\nimport { Voyager } from 'graphql-voyager';\nimport useAsync from 'react-use/esm/useAsync';\n\nconst useStyles = makeStyles({\n root: {\n height: '100%',\n display: 'flex',\n flexFlow: 'column nowrap',\n },\n});\n\ntype GraphQLVoyagerBrowserProps = {\n endpoints: GraphQLVoyagerEndpoint[];\n};\n\nconst NoEndpoints = () => {\n return <Typography variant=\"h4\">No endpoints available</Typography>;\n};\n\nconst VoyagerBrowserContent = ({\n endpoint,\n}: {\n endpoint: GraphQLVoyagerEndpoint;\n}) => {\n const { id, introspection, introspectionErrorMessage, voyagerProps } =\n endpoint;\n const { value, loading, error } = useAsync(\n () => introspection(introspectionQuery),\n [endpoint],\n );\n\n if (loading) {\n return <Progress />;\n } else if (error) {\n return <ErrorPanel error={error} />;\n }\n return value.data ? (\n <Voyager key={id} introspection={value} {...voyagerProps} />\n ) : (\n <Typography variant=\"h4\" color=\"error\">\n {introspectionErrorMessage}\n </Typography>\n );\n};\n\nconst VoyagerBrowser = (props: GraphQLVoyagerBrowserProps) => {\n const { endpoints } = props;\n const [tabIndex, setTabIndex] = useState(0);\n const classes = useStyles();\n\n return (\n <div className={classes.root}>\n <Suspense fallback={<Progress />}>\n <Tabs\n value={tabIndex}\n onChange={(_, value) => setTabIndex(value)}\n indicatorColor=\"primary\"\n >\n {endpoints.map(({ title, id }, index) => (\n <Tab key={id} label={title} value={index} />\n ))}\n </Tabs>\n <Content>\n <VoyagerBrowserContent endpoint={endpoints[tabIndex]} />\n </Content>\n </Suspense>\n </div>\n );\n};\n\n/** @public */\nexport const GraphQLVoyagerBrowser = (props: GraphQLVoyagerBrowserProps) => {\n const hasEndpoints = checkEndpoints(props);\n\n if (!hasEndpoints) {\n return <NoEndpoints />;\n }\n return <VoyagerBrowser {...props} />;\n};\n\nfunction checkEndpoints(props: GraphQLVoyagerBrowserProps) {\n return props.endpoints.length;\n}\n"],"names":[],"mappings":";;;;;;;;;;;AA8BA,MAAM,YAAY,UAAA,CAAW;AAAA,EAC3B,IAAA,EAAM;AAAA,IACJ,MAAA,EAAQ,MAAA;AAAA,IACR,OAAA,EAAS,MAAA;AAAA,IACT,QAAA,EAAU;AAAA;AAEd,CAAC,CAAA;AAMD,MAAM,cAAc,MAAM;AACxB,EAAA,uBAAO,GAAA,CAAC,UAAA,EAAA,EAAW,OAAA,EAAQ,IAAA,EAAK,QAAA,EAAA,wBAAA,EAAsB,CAAA;AACxD,CAAA;AAEA,MAAM,wBAAwB,CAAC;AAAA,EAC7B;AACF,CAAA,KAEM;AACJ,EAAA,MAAM,EAAE,EAAA,EAAI,aAAA,EAAe,yBAAA,EAA2B,cAAa,GACjE,QAAA;AACF,EAAA,MAAM,EAAE,KAAA,EAAO,OAAA,EAAS,KAAA,EAAM,GAAI,QAAA;AAAA,IAChC,MAAM,cAAc,kBAAkB,CAAA;AAAA,IACtC,CAAC,QAAQ;AAAA,GACX;AAEA,EAAA,IAAI,OAAA,EAAS;AACX,IAAA,2BAAQ,QAAA,EAAA,EAAS,CAAA;AAAA,EACnB,WAAW,KAAA,EAAO;AAChB,IAAA,uBA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A,GAAwB,CAAC,KAAA,KAAsC;AAC1E,EAAA,MAAM,YAAA,GAAe,eAAe,KAAK,CAAA;AAEzC,EAAA,IAAI,CAAC,YAAA,EAAc;AACjB,IAAA,2BAAQ,WAAA,EAAA,EAAY,CAAA;AAAA,EACtB;AACA,EAAA,uBAAO,GAAA,CAAC,cAAA,EAAA,EAAgB,GAAG,KAAA,EAAO,CAAA;AACpC;AAEA,SAAS,eAAe,KAAA,EAAmC;AACzD,EAAA,OAAO,MAAM,SAAA,CAAU,MAAA;AACzB;;;;"}
1
+ {"version":3,"file":"GraphQLVoyagerBrowser.esm.js","sources":["../../../src/components/GraphQLVoyagerBrowser/GraphQLVoyagerBrowser.tsx"],"sourcesContent":["/*\n * Copyright 2023 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 GraphQLVoyagerEndpoint,\n introspectionQuery,\n} from '../../lib/api/types';\nimport { useState } from 'react';\nimport Tab from '@material-ui/core/Tab';\nimport Tabs from '@material-ui/core/Tabs';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { Suspense } from 'react';\nimport { ErrorPanel, Progress } from '@backstage/core-components';\nimport { Box } from '@backstage/ui';\nimport { Voyager } from 'graphql-voyager';\nimport useAsync from 'react-use/esm/useAsync';\n\nconst useStyles = makeStyles({\n root: {\n height: '100%',\n display: 'flex',\n flexFlow: 'column nowrap',\n },\n});\n\ntype GraphQLVoyagerBrowserProps = {\n endpoints: GraphQLVoyagerEndpoint[];\n};\n\nconst NoEndpoints = () => {\n return <Typography variant=\"h4\">No endpoints available</Typography>;\n};\n\nconst VoyagerBrowserContent = ({\n endpoint,\n}: {\n endpoint: GraphQLVoyagerEndpoint;\n}) => {\n const { id, introspection, introspectionErrorMessage, voyagerProps } =\n endpoint;\n const { value, loading, error } = useAsync(\n () => introspection(introspectionQuery),\n [endpoint],\n );\n\n if (loading) {\n return <Progress />;\n } else if (error) {\n return <ErrorPanel error={error} />;\n }\n return value.data ? (\n <Voyager key={id} introspection={value} {...voyagerProps} />\n ) : (\n <Typography variant=\"h4\" color=\"error\">\n {introspectionErrorMessage}\n </Typography>\n );\n};\n\nconst VoyagerBrowser = (props: GraphQLVoyagerBrowserProps) => {\n const { endpoints } = props;\n const [tabIndex, setTabIndex] = useState(0);\n const classes = useStyles();\n\n return (\n <div className={classes.root}>\n <Suspense fallback={<Progress />}>\n <Tabs\n value={tabIndex}\n onChange={(_, value) => setTabIndex(value)}\n indicatorColor=\"primary\"\n >\n {endpoints.map(({ title, id }, index) => (\n <Tab key={id} label={title} value={index} />\n ))}\n </Tabs>\n <Box p=\"6\">\n <VoyagerBrowserContent endpoint={endpoints[tabIndex]} />\n </Box>\n </Suspense>\n </div>\n );\n};\n\n/** @public */\nexport const GraphQLVoyagerBrowser = (props: GraphQLVoyagerBrowserProps) => {\n const hasEndpoints = checkEndpoints(props);\n\n if (!hasEndpoints) {\n return <NoEndpoints />;\n }\n return <VoyagerBrowser {...props} />;\n};\n\nfunction checkEndpoints(props: GraphQLVoyagerBrowserProps) {\n return props.endpoints.length;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;AA+BA,MAAM,YAAY,UAAA,CAAW;AAAA,EAC3B,IAAA,EAAM;AAAA,IACJ,MAAA,EAAQ,MAAA;AAAA,IACR,OAAA,EAAS,MAAA;AAAA,IACT,QAAA,EAAU;AAAA;AAEd,CAAC,CAAA;AAMD,MAAM,cAAc,MAAM;AACxB,EAAA,uBAAO,GAAA,CAAC,UAAA,EAAA,EAAW,OAAA,EAAQ,IAAA,EAAK,QAAA,EAAA,wBAAA,EAAsB,CAAA;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AAA,QACzC,cAAA,EAAe,SAAA;AAAA,QAEd,QAAA,EAAA,SAAA,CAAU,GAAA,CAAI,CAAC,EAAE,OAAO,EAAA,EAAG,EAAG,KAAA,qBAC7B,GAAA,CAAC,OAAa,KAAA,EAAO,KAAA,EAAO,KAAA,EAAO,KAAA,EAAA,EAAzB,EAAgC,CAC3C;AAAA;AAAA,KACH;AAAA,oBACA,GAAA,CAAC,GAAA,EAAA,EAAI,CAAA,EAAE,GAAA,EACL,QAAA,kBAAA,GAAA,CAAC,yBAAsB,QAAA,EAAU,SAAA,CAAU,QAAQ,CAAA,EAAG,CAAA,EACxD;AAAA,GAAA,EACF,CAAA,EACF,CAAA;AAEJ,CAAA;AAGO,MAAM,qBAAA,GAAwB,CAAC,KAAA,KAAsC;AAC1E,EAAA,MAAM,YAAA,GAAe,eAAe,KAAK,CAAA;AAEzC,EAAA,IAAI,CAAC,YAAA,EAAc;AACjB,IAAA,2BAAQ,WAAA,EAAA,EAAY,CAAA;AAAA,EACtB;AACA,EAAA,uBAAO,GAAA,CAAC,cAAA,EAAA,EAAgB,GAAG,KAAA,EAAO,CAAA;AACpC;AAEA,SAAS,eAAe,KAAA,EAAmC;AACzD,EAAA,OAAO,MAAM,SAAA,CAAU,MAAA;AACzB;;;;"}
@@ -1,5 +1,6 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { Page, Header, Content, Progress, ErrorPanel } from '@backstage/core-components';
1
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
+ import { Progress, ErrorPanel } from '@backstage/core-components';
3
+ import { Header, Container } from '@backstage/ui';
3
4
  import { useApi } from '@backstage/core-plugin-api';
4
5
  import 'graphql-voyager/dist/voyager.css';
5
6
  import { graphQlVoyagerApiRef } from '../../lib/api/types.esm.js';
@@ -20,9 +21,9 @@ const VoyagerContent = () => {
20
21
  };
21
22
  const GraphQLVoyagerPage = (props) => {
22
23
  const { title = "Welcome to Voyager!" } = props;
23
- return /* @__PURE__ */ jsxs(Page, { themeId: "tool", children: [
24
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
24
25
  /* @__PURE__ */ jsx(Header, { title }),
25
- /* @__PURE__ */ jsx(Content, { children: /* @__PURE__ */ jsx(VoyagerContent, {}) })
26
+ /* @__PURE__ */ jsx(Container, { children: /* @__PURE__ */ jsx(VoyagerContent, {}) })
26
27
  ] });
27
28
  };
28
29
 
@@ -1 +1 @@
1
- {"version":3,"file":"GraphQLVoyagerPage.esm.js","sources":["../../../src/components/GraphQLVoyagerPage/GraphQLVoyagerPage.tsx"],"sourcesContent":["/*\n * Copyright 2023 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 {\n Header,\n Page,\n Content,\n Progress,\n ErrorPanel,\n} from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\nimport 'graphql-voyager/dist/voyager.css';\nimport { graphQlVoyagerApiRef } from '../../lib/api';\nimport useAsync from 'react-use/esm/useAsync';\nimport { GraphQLVoyagerBrowser } from '../GraphQLVoyagerBrowser';\n\n/** @public */\nexport type GraphQLVoyagerPageProps = {\n title?: string;\n};\n\nconst VoyagerContent = () => {\n const graphQLVoyagerApi = useApi(graphQlVoyagerApiRef);\n\n const { value, loading, error } = useAsync(() =>\n graphQLVoyagerApi.getEndpoints(),\n );\n\n if (loading) {\n return <Progress />;\n } else if (error) {\n return <ErrorPanel error={error} />;\n }\n return <GraphQLVoyagerBrowser endpoints={value!} />;\n};\n\n/** @public */\nexport const GraphQLVoyagerPage = (props: GraphQLVoyagerPageProps) => {\n const { title = 'Welcome to Voyager!' } = props;\n\n return (\n <Page themeId=\"tool\">\n <Header title={title} />\n <Content>\n <VoyagerContent />\n </Content>\n </Page>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAiCA,MAAM,iBAAiB,MAAM;AAC3B,EAAA,MAAM,iBAAA,GAAoB,OAAO,oBAAoB,CAAA;AAErD,EAAA,MAAM,EAAE,KAAA,EAAO,OAAA,EAAS,KAAA,EAAM,GAAI,QAAA;AAAA,IAAS,MACzC,kBAAkB,YAAA;AAAa,GACjC;AAEA,EAAA,IAAI,OAAA,EAAS;AACX,IAAA,2BAAQ,QAAA,EAAA,EAAS,CAAA;AAAA,EACnB,WAAW,KAAA,EAAO;AAChB,IAAA,uBAAO,GAAA,CAAC,cAAW,KAAA,EAAc,CAAA;AAAA,EACnC;AACA,EAAA,uBAAO,GAAA,CAAC,qBAAA,EAAA,EAAsB,SAAA,EAAW,KAAA,EAAQ,CAAA;AACnD,CAAA;AAGO,MAAM,kBAAA,GAAqB,CAAC,KAAA,KAAmC;AACpE,EAAA,MAAM,EAAE,KAAA,GAAQ,qBAAA,EAAsB,GAAI,KAAA;AAE1C,EAAA,uBACE,IAAA,CAAC,IAAA,EAAA,EAAK,OAAA,EAAQ,MAAA,EACZ,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,UAAO,KAAA,EAAc,CAAA;AAAA,oBACtB,GAAA,CAAC,OAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,cAAA,EAAA,EAAe,CAAA,EAClB;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"GraphQLVoyagerPage.esm.js","sources":["../../../src/components/GraphQLVoyagerPage/GraphQLVoyagerPage.tsx"],"sourcesContent":["/*\n * Copyright 2023 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 { Progress, ErrorPanel } from '@backstage/core-components';\nimport { Container, Header } from '@backstage/ui';\nimport { useApi } from '@backstage/core-plugin-api';\nimport 'graphql-voyager/dist/voyager.css';\nimport { graphQlVoyagerApiRef } from '../../lib/api';\nimport useAsync from 'react-use/esm/useAsync';\nimport { GraphQLVoyagerBrowser } from '../GraphQLVoyagerBrowser';\n\n/** @public */\nexport type GraphQLVoyagerPageProps = {\n title?: string;\n};\n\nconst VoyagerContent = () => {\n const graphQLVoyagerApi = useApi(graphQlVoyagerApiRef);\n\n const { value, loading, error } = useAsync(() =>\n graphQLVoyagerApi.getEndpoints(),\n );\n\n if (loading) {\n return <Progress />;\n } else if (error) {\n return <ErrorPanel error={error} />;\n }\n return <GraphQLVoyagerBrowser endpoints={value!} />;\n};\n\n/** @public */\nexport const GraphQLVoyagerPage = (props: GraphQLVoyagerPageProps) => {\n const { title = 'Welcome to Voyager!' } = props;\n\n return (\n <>\n <Header title={title} />\n <Container>\n <VoyagerContent />\n </Container>\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AA4BA,MAAM,iBAAiB,MAAM;AAC3B,EAAA,MAAM,iBAAA,GAAoB,OAAO,oBAAoB,CAAA;AAErD,EAAA,MAAM,EAAE,KAAA,EAAO,OAAA,EAAS,KAAA,EAAM,GAAI,QAAA;AAAA,IAAS,MACzC,kBAAkB,YAAA;AAAa,GACjC;AAEA,EAAA,IAAI,OAAA,EAAS;AACX,IAAA,2BAAQ,QAAA,EAAA,EAAS,CAAA;AAAA,EACnB,WAAW,KAAA,EAAO;AAChB,IAAA,uBAAO,GAAA,CAAC,cAAW,KAAA,EAAc,CAAA;AAAA,EACnC;AACA,EAAA,uBAAO,GAAA,CAAC,qBAAA,EAAA,EAAsB,SAAA,EAAW,KAAA,EAAQ,CAAA;AACnD,CAAA;AAGO,MAAM,kBAAA,GAAqB,CAAC,KAAA,KAAmC;AACpE,EAAA,MAAM,EAAE,KAAA,GAAQ,qBAAA,EAAsB,GAAI,KAAA;AAE1C,EAAA,uBACE,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,UAAO,KAAA,EAAc,CAAA;AAAA,oBACtB,GAAA,CAAC,SAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,cAAA,EAAA,EAAe,CAAA,EAClB;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@backstage-community/plugin-graphql-voyager",
3
3
  "description": "Backstage plugin for GraphQL Voyager",
4
- "version": "0.21.0",
4
+ "version": "0.23.0",
5
5
  "main": "dist/index.esm.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "license": "Apache-2.0",
@@ -34,8 +34,9 @@
34
34
  "postpack": "backstage-cli package postpack"
35
35
  },
36
36
  "dependencies": {
37
- "@backstage/core-components": "^0.18.14",
38
- "@backstage/core-plugin-api": "^1.12.10",
37
+ "@backstage/core-components": "^0.18.16",
38
+ "@backstage/core-plugin-api": "^1.13.0",
39
+ "@backstage/ui": "^0.20.0",
39
40
  "@material-ui/core": "^4.12.2",
40
41
  "@types/react": "^16.13.1 || ^17.0.0 || ^18.0.0",
41
42
  "graphql-voyager": "^2.0.0",
@@ -47,8 +48,8 @@
47
48
  "react-router-dom": "6.0.0-beta.0 || ^6.3.0"
48
49
  },
49
50
  "devDependencies": {
50
- "@backstage/cli": "^0.36.6",
51
- "@backstage/test-utils": "^1.7.22",
51
+ "@backstage/cli": "^0.36.8",
52
+ "@backstage/test-utils": "^1.8.0",
52
53
  "@testing-library/jest-dom": "^6.0.0",
53
54
  "@testing-library/react": "^15.0.0",
54
55
  "@types/react-dom": "^18.2.19",