@backstage-community/plugin-apollo-explorer 0.2.4 → 0.3.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,17 @@
1
1
  # @backstage-community/plugin-apollo-explorer
2
2
 
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 9b7e2dc: Backstage version bump to v1.34.2
8
+
9
+ ## 0.2.5
10
+
11
+ ### Patch Changes
12
+
13
+ - 8a299e4: Backstage version bump to v1.32.2
14
+
3
15
  ## 0.2.4
4
16
 
5
17
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"ApolloExplorerBrowser.esm.js","sources":["../../../src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.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 React, { useState } from 'react';\nimport Divider from '@material-ui/core/Divider';\nimport Tab from '@material-ui/core/Tab';\nimport Tabs from '@material-ui/core/Tabs';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { ApolloExplorer } from '@apollo/explorer/react';\nimport { Content } from '@backstage/core-components';\nimport { HandleRequest } from '@apollo/explorer/src/helpers/postMessageRelayHelpers';\nimport { EndpointProps } from '../ApolloExplorerPage';\nimport { useApiHolder } from '@backstage/core-plugin-api';\n\nconst useStyles = makeStyles(theme => ({\n tabs: {\n background: theme.palette.background.paper,\n },\n root: {\n height: '100%',\n },\n content: {\n height: '100%',\n },\n explorer: {\n height: '95%',\n },\n}));\n\ntype Props = {\n endpoints: EndpointProps[];\n authCallback?: () => Promise<{ token: string }>;\n};\n\nexport const handleAuthRequest = ({\n authCallback,\n}: {\n authCallback: Props['authCallback'];\n}): HandleRequest => {\n const handleRequest: HandleRequest = async (endpointUrl, options) =>\n fetch(endpointUrl, {\n ...options,\n headers: {\n ...options.headers,\n ...(authCallback && {\n Authorization: `Bearer ${(await authCallback()).token}`,\n }),\n },\n });\n return handleRequest;\n};\n\nexport const ApolloExplorerBrowser = ({ endpoints }: Props) => {\n const classes = useStyles();\n const [tabIndex, setTabIndex] = useState(0);\n\n const apiHolder = useApiHolder();\n\n const getAuthCallback = (index: number) => {\n const authCallback = endpoints[index].authCallback;\n if (authCallback === undefined) return undefined;\n return () => authCallback({ apiHolder });\n };\n\n return (\n <div className={classes.root}>\n <Tabs\n classes={{ root: classes.tabs }}\n value={tabIndex}\n onChange={(_, value) => setTabIndex(value)}\n indicatorColor=\"primary\"\n >\n {endpoints.map(({ title }, index) => (\n <Tab key={index} label={title} value={index} />\n ))}\n </Tabs>\n <Divider />\n <Content className={classes.content}>\n <ApolloExplorer\n className={classes.explorer}\n graphRef={endpoints[tabIndex].graphRef}\n handleRequest={handleAuthRequest({\n authCallback: getAuthCallback(tabIndex),\n })}\n persistExplorerState={endpoints[tabIndex].persistExplorerState}\n initialState={endpoints[tabIndex].initialState}\n />\n </Content>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AA2BA,MAAM,SAAA,GAAY,WAAW,CAAU,KAAA,MAAA;AAAA,EACrC,IAAM,EAAA;AAAA,IACJ,UAAA,EAAY,KAAM,CAAA,OAAA,CAAQ,UAAW,CAAA,KAAA;AAAA,GACvC;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,MAAQ,EAAA,MAAA;AAAA,GACV;AAAA,EACA,OAAS,EAAA;AAAA,IACP,MAAQ,EAAA,MAAA;AAAA,GACV;AAAA,EACA,QAAU,EAAA;AAAA,IACR,MAAQ,EAAA,KAAA;AAAA,GACV;AACF,CAAE,CAAA,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AU,YAAY,KAAK,CAAA;AAAA,MACzC,cAAe,EAAA,SAAA;AAAA,KAAA;AAAA,IAEd,SAAU,CAAA,GAAA,CAAI,CAAC,EAAE,OAAS,EAAA,KAAA,qBACxB,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAI,KAAK,KAAO,EAAA,KAAA,EAAO,KAAO,EAAA,KAAA,EAAO,OAAO,CAC9C,CAAA;AAAA,GACH,sCACC,OAAQ,EAAA,IAAA,CAAA,sCACR,OAAQ,EAAA,EAAA,SAAA,EAAW,QAAQ,OAC1B,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,cAAA;AAAA,IAAA;AAAA,MACC,WAAW,OAAQ,CAAA,QAAA;AAAA,MACnB,QAAA,EAAU,SAAU,CAAA,QAAQ,CAAE,CAAA,QAAA;AAAA,MAC9B,eAAe,iBAAkB,CAAA;AAAA,QAC/B,YAAA,EAAc,gBAAgB,QAAQ,CAAA;AAAA,OACvC,CAAA;AAAA,MACD,oBAAA,EAAsB,SAAU,CAAA,QAAQ,CAAE,CAAA,oBAAA;AAAA,MAC1C,YAAA,EAAc,SAAU,CAAA,QAAQ,CAAE,CAAA,YAAA;AAAA,KAAA;AAAA,GAEtC,CACF,CAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"ApolloExplorerBrowser.esm.js","sources":["../../../src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.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 React, { useState } from 'react';\nimport Divider from '@material-ui/core/Divider';\nimport Tab from '@material-ui/core/Tab';\nimport Tabs from '@material-ui/core/Tabs';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { ApolloExplorer } from '@apollo/explorer/react';\nimport { Content } from '@backstage/core-components';\nimport { HandleRequest } from '@apollo/explorer/src/helpers/postMessageRelayHelpers';\nimport { EndpointProps } from '../ApolloExplorerPage';\nimport { useApiHolder } from '@backstage/core-plugin-api';\n\nconst useStyles = makeStyles(theme => ({\n tabs: {\n background: theme.palette.background.paper,\n },\n root: {\n height: '100%',\n },\n content: {\n height: '100%',\n },\n explorer: {\n height: '95%',\n },\n}));\n\ntype Props = {\n endpoints: EndpointProps[];\n authCallback?: () => Promise<{ token: string }>;\n};\n\nexport const handleAuthRequest = ({\n authCallback,\n}: {\n authCallback: Props['authCallback'];\n}): HandleRequest => {\n const handleRequest: HandleRequest = async (endpointUrl, options) =>\n fetch(endpointUrl, {\n ...options,\n headers: {\n ...options.headers,\n ...(authCallback && {\n Authorization: `Bearer ${(await authCallback()).token}`,\n }),\n },\n });\n return handleRequest;\n};\n\nexport const ApolloExplorerBrowser = ({ endpoints }: Props) => {\n const classes = useStyles();\n const [tabIndex, setTabIndex] = useState(0);\n\n const apiHolder = useApiHolder();\n\n const getAuthCallback = (index: number) => {\n const authCallback = endpoints[index].authCallback;\n if (authCallback === undefined) return undefined;\n return () => authCallback({ apiHolder });\n };\n\n return (\n <div className={classes.root}>\n <Tabs\n classes={{ root: classes.tabs }}\n value={tabIndex}\n onChange={(_, value) => setTabIndex(value)}\n indicatorColor=\"primary\"\n >\n {endpoints.map(({ title }, index) => (\n <Tab key={index} label={title} value={index} />\n ))}\n </Tabs>\n <Divider />\n <Content className={classes.content}>\n <ApolloExplorer\n className={classes.explorer}\n graphRef={endpoints[tabIndex].graphRef}\n handleRequest={handleAuthRequest({\n authCallback: getAuthCallback(tabIndex),\n })}\n persistExplorerState={endpoints[tabIndex].persistExplorerState}\n initialState={endpoints[tabIndex].initialState}\n />\n </Content>\n </div>\n );\n};\n"],"names":[],"mappings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KAAA,EAAA,EAAI,SAAW,EAAA,OAAA,CAAQ,IACtB,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,OAAS,EAAA,EAAE,IAAM,EAAA,OAAA,CAAQ,IAAK,EAAA;AAAA,MAC9B,KAAO,EAAA,QAAA;AAAA,MACP,QAAU,EAAA,CAAC,CAAG,EAAA,KAAA,KAAU,YAAY,KAAK,CAAA;AAAA,MACzC,cAAe,EAAA;AAAA,KAAA;AAAA,IAEd,SAAU,CAAA,GAAA,CAAI,CAAC,EAAE,OAAS,EAAA,KAAA,qBACxB,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAI,KAAK,KAAO,EAAA,KAAA,EAAO,KAAO,EAAA,KAAA,EAAO,OAAO,CAC9C;AAAA,GACH,sCACC,OAAQ,EAAA,IAAA,CAAA,sCACR,OAAQ,EAAA,EAAA,SAAA,EAAW,QAAQ,OAC1B,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,cAAA;AAAA,IAAA;AAAA,MACC,WAAW,OAAQ,CAAA,QAAA;AAAA,MACnB,QAAA,EAAU,SAAU,CAAA,QAAQ,CAAE,CAAA,QAAA;AAAA,MAC9B,eAAe,iBAAkB,CAAA;AAAA,QAC/B,YAAA,EAAc,gBAAgB,QAAQ;AAAA,OACvC,CAAA;AAAA,MACD,oBAAA,EAAsB,SAAU,CAAA,QAAQ,CAAE,CAAA,oBAAA;AAAA,MAC1C,YAAA,EAAc,SAAU,CAAA,QAAQ,CAAE,CAAA;AAAA;AAAA,GAEtC,CACF,CAAA;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ApolloExplorerPage.esm.js","sources":["../../../src/components/ApolloExplorerPage/ApolloExplorerPage.tsx"],"sourcesContent":["/*\n * Copyright 2022 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 { Content, Header, Page } from '@backstage/core-components';\nimport { ApolloExplorerBrowser } from '../ApolloExplorerBrowser';\nimport { JSONObject } from '@apollo/explorer/src/helpers/types';\nimport { ApiHolder } from '@backstage/core-plugin-api';\n\n/**\n * Export types to be used with {@link @backstage/apollo-explorer#ApolloExplorerPage}.\n *\n * @public\n */\nexport type EndpointProps = {\n title: string;\n graphRef: string;\n authCallback?: AuthCallback;\n persistExplorerState?: boolean;\n initialState?: {\n document?: string;\n variables?: JSONObject;\n headers?: Record<string, string>;\n displayOptions: {\n docsPanelState?: 'open' | 'closed';\n showHeadersAndEnvVars?: boolean;\n theme?: 'dark' | 'light';\n };\n };\n};\n\n/**\n * Export types to be used with {@link @backstage/apollo-explorer#ApolloExplorerPage}.\n *\n * @public\n */\nexport type AuthCallback = (options: {\n apiHolder: ApiHolder;\n}) => Promise<{ token: string }>;\n\ntype Props = {\n title?: string | undefined;\n subtitle?: string | undefined;\n endpoints: EndpointProps[];\n};\n\nexport const ApolloExplorerPage = (props: Props) => {\n const { title, subtitle, endpoints } = props;\n\n return (\n <Page themeId=\"tool\">\n <Header title={title ?? 'Apollo Explorer 👩‍🚀'} subtitle={subtitle ?? ''} />\n <Content noPadding>\n <ApolloExplorerBrowser endpoints={endpoints} />\n </Content>\n </Page>\n );\n};\n"],"names":[],"mappings":";;;;AA2Da,MAAA,kBAAA,GAAqB,CAAC,KAAiB,KAAA;AAClD,EAAA,MAAM,EAAE,KAAA,EAAO,QAAU,EAAA,SAAA,EAAc,GAAA,KAAA,CAAA;AAEvC,EACE,uBAAA,KAAA,CAAA,aAAA,CAAC,QAAK,OAAQ,EAAA,MAAA,EAAA,sCACX,MAAO,EAAA,EAAA,KAAA,EAAO,SAAS,0CAAyB,EAAA,QAAA,EAAU,YAAY,EAAI,EAAA,CAAA,sCAC1E,OAAQ,EAAA,EAAA,SAAA,EAAS,wBACf,KAAA,CAAA,aAAA,CAAA,qBAAA,EAAA,EAAsB,SAAsB,EAAA,CAC/C,CACF,CAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"ApolloExplorerPage.esm.js","sources":["../../../src/components/ApolloExplorerPage/ApolloExplorerPage.tsx"],"sourcesContent":["/*\n * Copyright 2022 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 { Content, Header, Page } from '@backstage/core-components';\nimport { ApolloExplorerBrowser } from '../ApolloExplorerBrowser';\nimport { JSONObject } from '@apollo/explorer/src/helpers/types';\nimport { ApiHolder } from '@backstage/core-plugin-api';\n\n/**\n * Export types to be used with {@link @backstage/apollo-explorer#ApolloExplorerPage}.\n *\n * @public\n */\nexport type EndpointProps = {\n title: string;\n graphRef: string;\n authCallback?: AuthCallback;\n persistExplorerState?: boolean;\n initialState?: {\n document?: string;\n variables?: JSONObject;\n headers?: Record<string, string>;\n displayOptions: {\n docsPanelState?: 'open' | 'closed';\n showHeadersAndEnvVars?: boolean;\n theme?: 'dark' | 'light';\n };\n };\n};\n\n/**\n * Export types to be used with {@link @backstage/apollo-explorer#ApolloExplorerPage}.\n *\n * @public\n */\nexport type AuthCallback = (options: {\n apiHolder: ApiHolder;\n}) => Promise<{ token: string }>;\n\ntype Props = {\n title?: string | undefined;\n subtitle?: string | undefined;\n endpoints: EndpointProps[];\n};\n\nexport const ApolloExplorerPage = (props: Props) => {\n const { title, subtitle, endpoints } = props;\n\n return (\n <Page themeId=\"tool\">\n <Header title={title ?? 'Apollo Explorer 👩‍🚀'} subtitle={subtitle ?? ''} />\n <Content noPadding>\n <ApolloExplorerBrowser endpoints={endpoints} />\n </Content>\n </Page>\n );\n};\n"],"names":[],"mappings":";;;;AA2Da,MAAA,kBAAA,GAAqB,CAAC,KAAiB,KAAA;AAClD,EAAA,MAAM,EAAE,KAAA,EAAO,QAAU,EAAA,SAAA,EAAc,GAAA,KAAA;AAEvC,EACE,uBAAA,KAAA,CAAA,aAAA,CAAC,QAAK,OAAQ,EAAA,MAAA,EAAA,sCACX,MAAO,EAAA,EAAA,KAAA,EAAO,SAAS,0CAAyB,EAAA,QAAA,EAAU,YAAY,EAAI,EAAA,CAAA,sCAC1E,OAAQ,EAAA,EAAA,SAAA,EAAS,wBACf,KAAA,CAAA,aAAA,CAAA,qBAAA,EAAA,EAAsB,SAAsB,EAAA,CAC/C,CACF,CAAA;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.esm.js","sources":["../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2022 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 createPlugin,\n createRoutableExtension,\n} from '@backstage/core-plugin-api';\n\nimport { rootRouteRef } from './routes';\n\n/**\n * Plugin that allows Apollo Explorer instances to be directly embedded into Backstage\n * @public\n */\nexport const apolloExplorerPlugin = createPlugin({\n id: 'apollo-explorer',\n routes: {\n root: rootRouteRef,\n },\n});\n\n/**\n * Main component that wraps the embedded graph(s)\n * @public\n */\nexport const ApolloExplorerPage = apolloExplorerPlugin.provide(\n createRoutableExtension({\n name: 'ApolloExplorerPage',\n component: () =>\n import('./components/ApolloExplorerPage').then(m => m.ApolloExplorerPage),\n mountPoint: rootRouteRef,\n }),\n);\n"],"names":[],"mappings":";;;AA0BO,MAAM,uBAAuB,YAAa,CAAA;AAAA,EAC/C,EAAI,EAAA,iBAAA;AAAA,EACJ,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,YAAA;AAAA,GACR;AACF,CAAC,EAAA;AAMM,MAAM,qBAAqB,oBAAqB,CAAA,OAAA;AAAA,EACrD,uBAAwB,CAAA;AAAA,IACtB,IAAM,EAAA,oBAAA;AAAA,IACN,SAAA,EAAW,MACT,OAAO,8CAAiC,EAAE,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,kBAAkB,CAAA;AAAA,IAC1E,UAAY,EAAA,YAAA;AAAA,GACb,CAAA;AACH;;;;"}
1
+ {"version":3,"file":"plugin.esm.js","sources":["../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2022 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 createPlugin,\n createRoutableExtension,\n} from '@backstage/core-plugin-api';\n\nimport { rootRouteRef } from './routes';\n\n/**\n * Plugin that allows Apollo Explorer instances to be directly embedded into Backstage\n * @public\n */\nexport const apolloExplorerPlugin = createPlugin({\n id: 'apollo-explorer',\n routes: {\n root: rootRouteRef,\n },\n});\n\n/**\n * Main component that wraps the embedded graph(s)\n * @public\n */\nexport const ApolloExplorerPage = apolloExplorerPlugin.provide(\n createRoutableExtension({\n name: 'ApolloExplorerPage',\n component: () =>\n import('./components/ApolloExplorerPage').then(m => m.ApolloExplorerPage),\n mountPoint: rootRouteRef,\n }),\n);\n"],"names":[],"mappings":";;;AA0BO,MAAM,uBAAuB,YAAa,CAAA;AAAA,EAC/C,EAAI,EAAA,iBAAA;AAAA,EACJ,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA;AAAA;AAEV,CAAC;AAMM,MAAM,qBAAqB,oBAAqB,CAAA,OAAA;AAAA,EACrD,uBAAwB,CAAA;AAAA,IACtB,IAAM,EAAA,oBAAA;AAAA,IACN,SAAA,EAAW,MACT,OAAO,8CAAiC,EAAE,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,kBAAkB,CAAA;AAAA,IAC1E,UAAY,EAAA;AAAA,GACb;AACH;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"routes.esm.js","sources":["../src/routes.ts"],"sourcesContent":["/*\n * Copyright 2022 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 { createRouteRef } from '@backstage/core-plugin-api';\n\nexport const rootRouteRef = createRouteRef({\n id: 'apollo-explorer',\n});\n"],"names":[],"mappings":";;AAiBO,MAAM,eAAe,cAAe,CAAA;AAAA,EACzC,EAAI,EAAA,iBAAA;AACN,CAAC;;;;"}
1
+ {"version":3,"file":"routes.esm.js","sources":["../src/routes.ts"],"sourcesContent":["/*\n * Copyright 2022 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 { createRouteRef } from '@backstage/core-plugin-api';\n\nexport const rootRouteRef = createRouteRef({\n id: 'apollo-explorer',\n});\n"],"names":[],"mappings":";;AAiBO,MAAM,eAAe,cAAe,CAAA;AAAA,EACzC,EAAI,EAAA;AACN,CAAC;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage-community/plugin-apollo-explorer",
3
- "version": "0.2.4",
3
+ "version": "0.3.0",
4
4
  "backstage": {
5
5
  "role": "frontend-plugin",
6
6
  "pluginId": "apollo-explorer",
@@ -37,8 +37,8 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@apollo/explorer": "^3.0.0",
40
- "@backstage/core-components": "^0.15.0",
41
- "@backstage/core-plugin-api": "^1.9.4",
40
+ "@backstage/core-components": "^0.16.2",
41
+ "@backstage/core-plugin-api": "^1.10.2",
42
42
  "@material-ui/core": "^4.12.2",
43
43
  "@material-ui/lab": "^4.0.0-alpha.61",
44
44
  "@types/react": "^16.13.1 || ^17.0.0 || ^18.0.0",
@@ -46,8 +46,8 @@
46
46
  "use-deep-compare-effect": "^1.8.1"
47
47
  },
48
48
  "devDependencies": {
49
- "@backstage/cli": "^0.27.1",
50
- "@backstage/dev-utils": "^1.1.1",
49
+ "@backstage/cli": "^0.29.4",
50
+ "@backstage/dev-utils": "^1.1.5",
51
51
  "@testing-library/dom": "^10.0.0",
52
52
  "@testing-library/jest-dom": "^6.0.0",
53
53
  "@testing-library/react": "^15.0.0",
@@ -62,5 +62,12 @@
62
62
  "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0",
63
63
  "react-router-dom": "6.0.0-beta.0 || ^6.3.0"
64
64
  },
65
+ "typesVersions": {
66
+ "*": {
67
+ "index": [
68
+ "dist/index.d.ts"
69
+ ]
70
+ }
71
+ },
65
72
  "module": "./dist/index.esm.js"
66
73
  }