Merge branch 'backstage:master' into topic/improve-azure-devops-date-handling
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Switched to dynamically determining the packages that are unsafe to repack when executing the CLI within the Backstage main repo.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Fixed the `config:check` command that was incorrectly only validating frontend configuration. Also added a `--frontend` flag to the command which maintains that behavior.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-kubernetes': patch
|
||||
---
|
||||
|
||||
fix: kubernetes plugin shall pass id token on get clusters request if possible
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
'@backstage/core-components': patch
|
||||
'@backstage/theme': patch
|
||||
---
|
||||
|
||||
Added a warning variant to `DismissableBanner` component. If you are using a
|
||||
custom theme, you will need to add the optional `palette.banner.warning` color,
|
||||
otherwise this variant will fall back to the `palette.banner.error` color.
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend-module-msgraph': patch
|
||||
---
|
||||
|
||||
Tweak logic for msgraph catalog ingesting for display names with security groups
|
||||
|
||||
Previously security groups that weren't mail enabled were imported with UUIDs, now they use the display name.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/backend-common': patch
|
||||
---
|
||||
|
||||
AWSS3UrlReader now throws a `NotModifiedError` (exported from @backstage/backend-common) when s3 returns a 304 response.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-jenkins-backend': patch
|
||||
---
|
||||
|
||||
Don't require a validation pattern for the Jenkins base URL.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/core-components': patch
|
||||
---
|
||||
|
||||
Allow for `cellStyle` property on `TableColumn` to be a function as well as `React.CSSProperties` as per the Material UI Table component
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
'@backstage/backend-common': patch
|
||||
'@backstage/cli': patch
|
||||
'@backstage/config-loader': patch
|
||||
---
|
||||
|
||||
Reading app config from a remote server
|
||||
@@ -1,23 +0,0 @@
|
||||
---
|
||||
'@backstage/core-components': patch
|
||||
---
|
||||
|
||||
Add new way to override color selection to progress bar/gauge components.
|
||||
|
||||
`Gauge`, `LinearGauge` and `GaugeCard` all accept a `getColor` prop,
|
||||
which is a function of the type:
|
||||
|
||||
```ts
|
||||
export type GaugePropsGetColor = (args: {
|
||||
palette: Palette;
|
||||
value: number;
|
||||
inverse?: boolean;
|
||||
max?: number;
|
||||
}) => string;
|
||||
```
|
||||
|
||||
Return a standard CSS color string (e.g. "red", "#f02020"), and the gauge will
|
||||
be set to that color.
|
||||
|
||||
If the prop is omitted, the default implementation is unchanged from previous
|
||||
versions.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-search-backend-module-elasticsearch': patch
|
||||
---
|
||||
|
||||
Pinning version of elastic search client to 7.13.0 to prevent breaking change towards third party ElasticSearch clusters on 7.14.0.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-ilert': patch
|
||||
---
|
||||
|
||||
Change the version of `@date-io/luxon` from 2.x to 1.x to make it compatible with material-ui-pickers
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-kafka': patch
|
||||
---
|
||||
|
||||
Use IdentityApi to provide Auth Token for KafkaBackendClient Api calls
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/test-utils': patch
|
||||
---
|
||||
|
||||
Update Keyboard deprecation with a link to the recommended successor
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder-backend': patch
|
||||
---
|
||||
|
||||
Expose some classes and interfaces public so TaskWorkers can run externally from the scaffolder API.
|
||||
@@ -1,9 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-azure-devops': patch
|
||||
'@backstage/plugin-azure-devops-backend': minor
|
||||
'@backstage/plugin-azure-devops-common': patch
|
||||
---
|
||||
|
||||
refactor(`@backstage/plugin-azure-devops`): Consume types from `@backstage/plugin-azure-devops-common`.
|
||||
Stop re-exporting types from `@backstage/plugin-azure-devops-backend`.
|
||||
Added new types to `@backstage/plugin-azure-devops-common`.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/catalog-client': patch
|
||||
---
|
||||
|
||||
Improved API documentation for catalog-client.
|
||||
@@ -1,15 +0,0 @@
|
||||
---
|
||||
'@backstage/techdocs-common': patch
|
||||
---
|
||||
|
||||
1. Techdocs publisher constructors now use parameter objects when being
|
||||
instantiated
|
||||
|
||||
2. Internal refactor of `LocalPublish` publisher to use `fromConfig` for
|
||||
creation to be aligned with other publishers; this does not impact
|
||||
`LocalPublish` usage.
|
||||
|
||||
```diff
|
||||
- const publisher = new LocalPublish(config, logger, discovery);
|
||||
+ const publisher = LocalPublish.fromConfig(config, logger, discovery);
|
||||
```
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-auth-backend': patch
|
||||
---
|
||||
|
||||
Only use settings that have a value when creating a new FirestoreKeyStore instance
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-sentry': patch
|
||||
---
|
||||
|
||||
fix: sentry-plugin can forward identity token to backend (for case when it requires authorization)
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-code-coverage': patch
|
||||
---
|
||||
|
||||
Change represented test date from epoch to something more human friendly. Round test coverage to 2 decimal places.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Make `ExitCodeError` call `super` early to avoid compiler warnings
|
||||
@@ -1,14 +0,0 @@
|
||||
---
|
||||
'@backstage/create-app': patch
|
||||
---
|
||||
|
||||
Updated the app template to no longer include the `--no-private` flag for the `create-plugin` command.
|
||||
|
||||
To apply this change to an existing application, remove the `--no-private` flag from the `create-plugin` command in the root `package.json`:
|
||||
|
||||
```diff
|
||||
"prettier:check": "prettier --check .",
|
||||
- "create-plugin": "backstage-cli create-plugin --scope internal --no-private",
|
||||
+ "create-plugin": "backstage-cli create-plugin --scope internal",
|
||||
"remove-plugin": "backstage-cli remove-plugin"
|
||||
```
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/config-loader': patch
|
||||
---
|
||||
|
||||
Bump msw to the same version as the rest
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-code-coverage': patch
|
||||
---
|
||||
|
||||
Make dates in X-Axis sort in ascending order
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/core-components': patch
|
||||
---
|
||||
|
||||
fixed route resolving (issue #7741) when user cannot select a tab in any of the tabbed pages (like the Catalog page) if it shares the same initial letters as a preceding tab. (i.e. where tab with a path of /ci is followed by a path of /ci-2, user cannot select /ci-2 as /ci will always be selected first).
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-auth-backend': patch
|
||||
---
|
||||
|
||||
Added forwarding of the `audience` option for the SAML provider, making it possible to enable `audience` verification.
|
||||
@@ -1,42 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder': patch
|
||||
'@backstage/plugin-scaffolder-backend': patch
|
||||
---
|
||||
|
||||
Adds a new endpoint for consuming logs from the Scaffolder that uses long polling instead of Server Sent Events.
|
||||
|
||||
This is useful if Backstage is accessed from an environment that doesn't support SSE correctly, which happens in combination with certain enterprise HTTP Proxy servers.
|
||||
|
||||
It is intended to switch the endpoint globally for the whole instance.
|
||||
If you want to use it, you can provide a reconfigured API to the `scaffolderApiRef`:
|
||||
|
||||
```tsx
|
||||
// packages/app/src/apis.ts
|
||||
|
||||
// ...
|
||||
import {
|
||||
scaffolderApiRef,
|
||||
ScaffolderClient,
|
||||
} from '@backstage/plugin-scaffolder';
|
||||
|
||||
export const apis: AnyApiFactory[] = [
|
||||
// ...
|
||||
|
||||
createApiFactory({
|
||||
api: scaffolderApiRef,
|
||||
deps: {
|
||||
discoveryApi: discoveryApiRef,
|
||||
identityApi: identityApiRef,
|
||||
scmIntegrationsApi: scmIntegrationsApiRef,
|
||||
},
|
||||
factory: ({ discoveryApi, identityApi, scmIntegrationsApi }) =>
|
||||
new ScaffolderClient({
|
||||
discoveryApi,
|
||||
identityApi,
|
||||
scmIntegrationsApi,
|
||||
// use long polling instead of an eventsource
|
||||
useLongPollingLogs: true,
|
||||
}),
|
||||
}),
|
||||
];
|
||||
```
|
||||
@@ -1,14 +0,0 @@
|
||||
---
|
||||
'@backstage/create-app': patch
|
||||
---
|
||||
|
||||
Removed the version pinning of the packages `graphql-language-service-interface` and `graphql-language-service-parser`. This should no longer be necessary.
|
||||
|
||||
You can apply the same change in your repository by ensuring that the following does _NOT_ appear in your root `package.json`.
|
||||
|
||||
```json
|
||||
"resolutions": {
|
||||
"graphql-language-service-interface": "2.8.2",
|
||||
"graphql-language-service-parser": "1.9.0"
|
||||
},
|
||||
```
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/core-plugin-api': minor
|
||||
---
|
||||
|
||||
Removed the unused `UserFlags` type.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend': patch
|
||||
---
|
||||
|
||||
Allow singleton and flexibly nested EntityFilters
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-react': patch
|
||||
---
|
||||
|
||||
export `loadIdentityOwnerRefs` and `loadCatalogOwnerRefs` all the way
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/core-app-api': patch
|
||||
---
|
||||
|
||||
I have added default icons for the catalog, scaffolder, techdocs, and search.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/core-components': patch
|
||||
---
|
||||
|
||||
Add Theme Overrides for Sidebar
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Bumped `@spotify/eslint-config-typescript` from `v10` to `v12`, dropping support for Node.js v12.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/techdocs-common': patch
|
||||
---
|
||||
|
||||
Default TechDocs container used at docs generation-time is now [v0.3.5](https://github.com/backstage/techdocs-container/releases/tag/v0.3.5).
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/techdocs-common': patch
|
||||
---
|
||||
|
||||
Updated to properly join URL segments under any OS for both AWS S3 and GCP
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
'@backstage/core-app-api': patch
|
||||
'@backstage/core-plugin-api': patch
|
||||
---
|
||||
|
||||
Improve API documentation for @backstage/core-plugin-api
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-azure-devops': patch
|
||||
---
|
||||
|
||||
Simplified queue time calculation in `BuildTable`.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder-backend': patch
|
||||
---
|
||||
|
||||
Fix a bug where only file mode 775 is considered an executable
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder-backend-module-cookiecutter': patch
|
||||
'@backstage/plugin-scaffolder-backend-module-rails': patch
|
||||
'@backstage/plugin-scaffolder-backend-module-yeoman': patch
|
||||
---
|
||||
|
||||
Add missing API docs to scaffolder action plugins
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/core-plugin-api': patch
|
||||
---
|
||||
|
||||
Deprecate unused ApiRef types
|
||||
@@ -57,3 +57,5 @@ jobs:
|
||||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
|
||||
- name: Update Github issues
|
||||
run: yarn ts-node scripts/snyk-github-issue-sync.ts
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -109,6 +109,25 @@ const routes = (
|
||||
);
|
||||
```
|
||||
|
||||
### Using the Search Modal
|
||||
|
||||
In `Root.tsx`, add the `SidebarSearchModal` component:
|
||||
|
||||
```bash
|
||||
import { SidebarSearchModal } from '@backstage/plugin-search';
|
||||
|
||||
export const Root = ({ children }: PropsWithChildren<{}>) => (
|
||||
<SidebarPage>
|
||||
<Sidebar>
|
||||
<SidebarLogo />
|
||||
<SidebarSearchModal />
|
||||
<SidebarDivider />
|
||||
...
|
||||
```
|
||||
|
||||
For more information about using `Root.tsx`, please see
|
||||
[the changelog](https://github.com/backstage/backstage/blob/master/packages/create-app/CHANGELOG.md#0315).
|
||||
|
||||
## Adding Search to the Backend
|
||||
|
||||
Add the following plugins into your backend app:
|
||||
|
||||
@@ -172,6 +172,7 @@ This page itself can be exported as a routable extension in the plugin:
|
||||
```ts
|
||||
export const CustomCatalogIndexPage = myPlugin.provide(
|
||||
createRoutableExtension({
|
||||
name: 'CustomCatalogIndexPage',
|
||||
component: () =>
|
||||
import('./components/CustomCatalogPage').then(m => m.CustomCatalogPage),
|
||||
mountPoint: catalogRouteRef,
|
||||
|
||||
@@ -136,6 +136,7 @@ a component:
|
||||
```ts
|
||||
export const FooPage = plugin.provide(
|
||||
createRoutableExtension({
|
||||
name: 'FooPage',
|
||||
component: () => import('./components/FooPage').then(m => m.FooPage),
|
||||
mountPoint: fooPageRouteRef,
|
||||
}),
|
||||
@@ -417,6 +418,7 @@ export const myPlugin = createPlugin({
|
||||
|
||||
export const MyPage = myPlugin.provide(
|
||||
createRoutableExtension({
|
||||
name: 'MyPage',
|
||||
component: () => import('./components/MyPage').then(m => m.MyPage),
|
||||
mountPoint: rootRouteRef,
|
||||
}),
|
||||
|
||||
@@ -65,6 +65,7 @@ export const examplePlugin = createPlugin({
|
||||
// Each extension should also be exported from your plugin package.
|
||||
export const ExamplePage = examplePlugin.provide(
|
||||
createRoutableExtension({
|
||||
name: 'ExamplePage',
|
||||
// The component needs to be lazy-loaded. It's what will actually be rendered in the end.
|
||||
component: () =>
|
||||
import('./components/ExampleComponent').then(m => m.ExampleComponent),
|
||||
|
||||
@@ -73,6 +73,7 @@ export const examplePlugin = createPlugin({
|
||||
|
||||
export const ExamplePage = examplePlugin.provide(
|
||||
createRoutableExtension({
|
||||
name: 'ExamplePage',
|
||||
component: () =>
|
||||
import('./components/ExampleComponent').then(m => m.ExampleComponent),
|
||||
mountPoint: rootRouteRef,
|
||||
|
||||
@@ -29,7 +29,7 @@ import LogoIcon from './LogoIcon';
|
||||
import { NavLink } from 'react-router-dom';
|
||||
import { GraphiQLIcon } from '@backstage/plugin-graphiql';
|
||||
import { Settings as SidebarSettings } from '@backstage/plugin-user-settings';
|
||||
import { SidebarSearch } from '@backstage/plugin-search';
|
||||
import { SidebarSearchModal } from '@backstage/plugin-search';
|
||||
import { Shortcuts } from '@backstage/plugin-shortcuts';
|
||||
import {
|
||||
Sidebar,
|
||||
@@ -79,7 +79,7 @@ export const Root = ({ children }: PropsWithChildren<{}>) => (
|
||||
<SidebarPage>
|
||||
<Sidebar>
|
||||
<SidebarLogo />
|
||||
<SidebarSearch />
|
||||
<SidebarSearchModal />
|
||||
<SidebarDivider />
|
||||
{/* Global nav, not org-specific */}
|
||||
<SidebarItem icon={HomeIcon} to="catalog" text="Home" />
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# @backstage/backend-common
|
||||
|
||||
## 0.9.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 8c4cad0bf2: AWSS3UrlReader now throws a `NotModifiedError` (exported from @backstage/backend-common) when s3 returns a 304 response.
|
||||
- 0611f3b3e2: Reading app config from a remote server
|
||||
- Updated dependencies
|
||||
- @backstage/config-loader@0.7.2
|
||||
|
||||
## 0.9.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/backend-common",
|
||||
"description": "Common functionality library for Backstage backends",
|
||||
"version": "0.9.8",
|
||||
"version": "0.9.9",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"private": false,
|
||||
@@ -31,7 +31,7 @@
|
||||
"dependencies": {
|
||||
"@backstage/cli-common": "^0.1.5",
|
||||
"@backstage/config": "^0.1.11",
|
||||
"@backstage/config-loader": "^0.7.1",
|
||||
"@backstage/config-loader": "^0.7.2",
|
||||
"@backstage/errors": "^0.1.4",
|
||||
"@backstage/integration": "^0.6.9",
|
||||
"@backstage/types": "^0.1.1",
|
||||
@@ -79,8 +79,8 @@
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.8.1",
|
||||
"@backstage/test-utils": "^0.1.20",
|
||||
"@backstage/cli": "^0.8.2",
|
||||
"@backstage/test-utils": "^0.1.21",
|
||||
"@types/archiver": "^5.1.0",
|
||||
"@types/compression": "^1.7.0",
|
||||
"@types/concat-stream": "^1.6.0",
|
||||
|
||||
@@ -1,5 +1,20 @@
|
||||
# example-backend
|
||||
|
||||
## 0.2.52
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @backstage/backend-common@0.9.9
|
||||
- @backstage/plugin-jenkins-backend@0.1.7
|
||||
- @backstage/plugin-search-backend-module-elasticsearch@0.0.5
|
||||
- @backstage/plugin-scaffolder-backend@0.15.12
|
||||
- @backstage/plugin-azure-devops-backend@0.2.0
|
||||
- @backstage/catalog-client@0.5.1
|
||||
- @backstage/plugin-auth-backend@0.4.7
|
||||
- @backstage/plugin-catalog-backend@0.17.3
|
||||
- @backstage/plugin-scaffolder-backend-module-rails@0.1.7
|
||||
|
||||
## 0.2.50
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "example-backend",
|
||||
"version": "0.2.50",
|
||||
"version": "0.2.52",
|
||||
"main": "dist/index.cjs.js",
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
@@ -24,28 +24,28 @@
|
||||
"migrate:create": "knex migrate:make -x ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/backend-common": "^0.9.7",
|
||||
"@backstage/catalog-client": "^0.5.0",
|
||||
"@backstage/backend-common": "^0.9.9",
|
||||
"@backstage/catalog-client": "^0.5.1",
|
||||
"@backstage/catalog-model": "^0.9.5",
|
||||
"@backstage/config": "^0.1.10",
|
||||
"@backstage/integration": "^0.6.8",
|
||||
"@backstage/plugin-app-backend": "^0.3.17",
|
||||
"@backstage/plugin-auth-backend": "^0.4.5",
|
||||
"@backstage/plugin-azure-devops-backend": "^0.1.3",
|
||||
"@backstage/plugin-auth-backend": "^0.4.7",
|
||||
"@backstage/plugin-azure-devops-backend": "^0.2.0",
|
||||
"@backstage/plugin-badges-backend": "^0.1.11",
|
||||
"@backstage/plugin-catalog-backend": "^0.17.1",
|
||||
"@backstage/plugin-catalog-backend": "^0.17.3",
|
||||
"@backstage/plugin-code-coverage-backend": "^0.1.14",
|
||||
"@backstage/plugin-graphql-backend": "^0.1.9",
|
||||
"@backstage/plugin-jenkins-backend": "^0.1.6",
|
||||
"@backstage/plugin-jenkins-backend": "^0.1.7",
|
||||
"@backstage/plugin-kubernetes-backend": "^0.3.18",
|
||||
"@backstage/plugin-kafka-backend": "^0.2.10",
|
||||
"@backstage/plugin-proxy-backend": "^0.2.13",
|
||||
"@backstage/plugin-rollbar-backend": "^0.1.15",
|
||||
"@backstage/plugin-scaffolder-backend": "^0.15.10",
|
||||
"@backstage/plugin-scaffolder-backend-module-rails": "^0.1.5",
|
||||
"@backstage/plugin-scaffolder-backend": "^0.15.12",
|
||||
"@backstage/plugin-scaffolder-backend-module-rails": "^0.1.7",
|
||||
"@backstage/plugin-search-backend": "^0.2.6",
|
||||
"@backstage/plugin-search-backend-node": "^0.4.2",
|
||||
"@backstage/plugin-search-backend-module-elasticsearch": "^0.0.4",
|
||||
"@backstage/plugin-search-backend-module-elasticsearch": "^0.0.5",
|
||||
"@backstage/plugin-search-backend-module-pg": "^0.2.1",
|
||||
"@backstage/plugin-techdocs-backend": "^0.10.5",
|
||||
"@backstage/plugin-tech-insights-backend": "^0.1.0",
|
||||
@@ -68,7 +68,7 @@
|
||||
"winston": "^3.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.8.0",
|
||||
"@backstage/cli": "^0.8.2",
|
||||
"@types/dockerode": "^3.2.1",
|
||||
"@types/express": "^4.17.6",
|
||||
"@types/express-serve-static-core": "^4.17.5"
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @backstage/catalog-client
|
||||
|
||||
## 0.5.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 39e92897e4: Improved API documentation for catalog-client.
|
||||
|
||||
## 0.5.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/catalog-client",
|
||||
"description": "An isomorphic client for the catalog backend",
|
||||
"version": "0.5.0",
|
||||
"version": "0.5.1",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
@@ -35,7 +35,7 @@
|
||||
"cross-fetch": "^3.0.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.8.0",
|
||||
"@backstage/cli": "^0.8.2",
|
||||
"@types/jest": "^26.0.7",
|
||||
"msw": "^0.35.0"
|
||||
},
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
# @backstage/cli
|
||||
|
||||
## 0.8.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- dd355bca46: Switched to dynamically determining the packages that are unsafe to repack when executing the CLI within the Backstage main repo.
|
||||
- b393c4d4be: Fixed the `config:check` command that was incorrectly only validating frontend configuration. Also added a `--frontend` flag to the command which maintains that behavior.
|
||||
- 0611f3b3e2: Reading app config from a remote server
|
||||
- ec64d9590c: Make `ExitCodeError` call `super` early to avoid compiler warnings
|
||||
- 8af66229e7: Bumped `@spotify/eslint-config-react` from `v10` to `v12`, dropping support for Node.js v12.
|
||||
- a197708da9: Bumped `@spotify/eslint-config-typescript` from `v10` to `v12`, dropping support for Node.js v12.
|
||||
- Updated dependencies
|
||||
- @backstage/config-loader@0.7.2
|
||||
|
||||
## 0.8.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/cli",
|
||||
"description": "CLI for developing Backstage plugins and apps",
|
||||
"version": "0.8.1",
|
||||
"version": "0.8.2",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
@@ -30,7 +30,7 @@
|
||||
"dependencies": {
|
||||
"@backstage/cli-common": "^0.1.5",
|
||||
"@backstage/config": "^0.1.11",
|
||||
"@backstage/config-loader": "^0.7.1",
|
||||
"@backstage/config-loader": "^0.7.2",
|
||||
"@backstage/errors": "^0.1.4",
|
||||
"@backstage/types": "^0.1.1",
|
||||
"@hot-loader/react-dom": "^16.13.0",
|
||||
@@ -42,7 +42,7 @@
|
||||
"@rollup/plugin-node-resolve": "^13.0.0",
|
||||
"@rollup/plugin-yaml": "^3.0.0",
|
||||
"@spotify/eslint-config-base": "^12.0.0",
|
||||
"@spotify/eslint-config-react": "^10.0.0",
|
||||
"@spotify/eslint-config-react": "^12.0.0",
|
||||
"@spotify/eslint-config-typescript": "^12.0.0",
|
||||
"@sucrase/jest-plugin": "^2.1.1",
|
||||
"@sucrase/webpack-loader": "^2.0.0",
|
||||
@@ -117,14 +117,14 @@
|
||||
"yn": "^4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/backend-common": "^0.9.8",
|
||||
"@backstage/backend-common": "^0.9.9",
|
||||
"@backstage/config": "^0.1.11",
|
||||
"@backstage/core-components": "^0.7.2",
|
||||
"@backstage/core-plugin-api": "^0.1.12",
|
||||
"@backstage/core-app-api": "^0.1.19",
|
||||
"@backstage/core-components": "^0.7.3",
|
||||
"@backstage/core-plugin-api": "^0.1.13",
|
||||
"@backstage/core-app-api": "^0.1.20",
|
||||
"@backstage/dev-utils": "^0.2.12",
|
||||
"@backstage/test-utils": "^0.1.20",
|
||||
"@backstage/theme": "^0.2.12",
|
||||
"@backstage/test-utils": "^0.1.21",
|
||||
"@backstage/theme": "^0.2.13",
|
||||
"@types/diff": "^5.0.0",
|
||||
"@types/express": "^4.17.6",
|
||||
"@types/fs-extra": "^9.0.1",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# @backstage/codemods
|
||||
|
||||
## 0.1.21
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @backstage/core-components@0.7.3
|
||||
- @backstage/core-plugin-api@0.1.13
|
||||
- @backstage/core-app-api@0.1.20
|
||||
|
||||
## 0.1.20
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/codemods",
|
||||
"description": "A collection of codemods for Backstage projects",
|
||||
"version": "0.1.20",
|
||||
"version": "0.1.21",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @backstage/config-loader
|
||||
|
||||
## 0.7.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 0611f3b3e2: Reading app config from a remote server
|
||||
- 26c5659c97: Bump msw to the same version as the rest
|
||||
|
||||
## 0.7.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/config-loader",
|
||||
"description": "Config loading functionality used by Backstage backend, and CLI",
|
||||
"version": "0.7.1",
|
||||
"version": "0.7.2",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
# @backstage/core-app-api
|
||||
|
||||
## 0.1.20
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 78c512ce8f: I have added default icons for the catalog, scaffolder, techdocs, and search.
|
||||
- 8b4284cd5c: Improve API documentation for @backstage/core-plugin-api
|
||||
- Updated dependencies
|
||||
- @backstage/core-components@0.7.3
|
||||
- @backstage/theme@0.2.13
|
||||
- @backstage/core-plugin-api@0.1.13
|
||||
|
||||
## 0.1.19
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/core-app-api",
|
||||
"description": "Core app API used by Backstage apps",
|
||||
"version": "0.1.19",
|
||||
"version": "0.1.20",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
@@ -29,10 +29,10 @@
|
||||
"clean": "backstage-cli clean"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/core-components": "^0.7.2",
|
||||
"@backstage/core-components": "^0.7.3",
|
||||
"@backstage/config": "^0.1.11",
|
||||
"@backstage/core-plugin-api": "^0.1.12",
|
||||
"@backstage/theme": "^0.2.12",
|
||||
"@backstage/core-plugin-api": "^0.1.13",
|
||||
"@backstage/theme": "^0.2.13",
|
||||
"@backstage/types": "^0.1.1",
|
||||
"@backstage/version-bridge": "^0.1.0",
|
||||
"@material-ui/core": "^4.12.2",
|
||||
@@ -46,8 +46,8 @@
|
||||
"zen-observable": "^0.8.15"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.8.1",
|
||||
"@backstage/test-utils": "^0.1.20",
|
||||
"@backstage/cli": "^0.8.2",
|
||||
"@backstage/test-utils": "^0.1.21",
|
||||
"@testing-library/jest-dom": "^5.10.1",
|
||||
"@testing-library/react": "^11.2.5",
|
||||
"@testing-library/react-hooks": "^7.0.2",
|
||||
|
||||
@@ -169,6 +169,7 @@ describe('Integration Test', () => {
|
||||
|
||||
const NavigateComponent = plugin1.provide(
|
||||
createRoutableExtension({
|
||||
name: 'NavigateComponent',
|
||||
component: () =>
|
||||
Promise.resolve((_: PropsWithChildren<{ path?: string }>) => {
|
||||
return <Navigate to="/foo" />;
|
||||
|
||||
@@ -1,5 +1,39 @@
|
||||
# @backstage/core-components
|
||||
|
||||
## 0.7.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- c11a37710a: Added a warning variant to `DismissableBanner` component. If you are using a
|
||||
custom theme, you will need to add the optional `palette.banner.warning` color,
|
||||
otherwise this variant will fall back to the `palette.banner.error` color.
|
||||
- 5826c17b7d: Allow for `cellStyle` property on `TableColumn` to be a function as well as `React.CSSProperties` as per the Material UI Table component
|
||||
- e0861b92ff: Add new way to override color selection to progress bar/gauge components.
|
||||
|
||||
`Gauge`, `LinearGauge` and `GaugeCard` all accept a `getColor` prop,
|
||||
which is a function of the type:
|
||||
|
||||
```ts
|
||||
export type GaugePropsGetColor = (args: {
|
||||
palette: Palette;
|
||||
value: number;
|
||||
inverse?: boolean;
|
||||
max?: number;
|
||||
}) => string;
|
||||
```
|
||||
|
||||
Return a standard CSS color string (e.g. "red", "#f02020"), and the gauge will
|
||||
be set to that color.
|
||||
|
||||
If the prop is omitted, the default implementation is unchanged from previous
|
||||
versions.
|
||||
|
||||
- 021986e8a3: fixed route resolving (issue #7741) when user cannot select a tab in any of the tabbed pages (like the Catalog page) if it shares the same initial letters as a preceding tab. (i.e. where tab with a path of /ci is followed by a path of /ci-2, user cannot select /ci-2 as /ci will always be selected first).
|
||||
- a39a2105ef: Add Theme Overrides for Sidebar
|
||||
- Updated dependencies
|
||||
- @backstage/theme@0.2.13
|
||||
- @backstage/core-plugin-api@0.1.13
|
||||
|
||||
## 0.7.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/core-components",
|
||||
"description": "Core components used by Backstage plugins and apps",
|
||||
"version": "0.7.2",
|
||||
"version": "0.7.3",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
@@ -30,9 +30,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/config": "^0.1.11",
|
||||
"@backstage/core-plugin-api": "^0.1.12",
|
||||
"@backstage/core-plugin-api": "^0.1.13",
|
||||
"@backstage/errors": "^0.1.4",
|
||||
"@backstage/theme": "^0.2.12",
|
||||
"@backstage/theme": "^0.2.13",
|
||||
"@material-table/core": "^3.1.0",
|
||||
"@material-ui/core": "^4.12.2",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
@@ -67,9 +67,9 @@
|
||||
"zen-observable": "^0.8.15"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/core-app-api": "^0.1.19",
|
||||
"@backstage/cli": "^0.8.1",
|
||||
"@backstage/test-utils": "^0.1.20",
|
||||
"@backstage/core-app-api": "^0.1.20",
|
||||
"@backstage/cli": "^0.8.2",
|
||||
"@backstage/test-utils": "^0.1.21",
|
||||
"@testing-library/jest-dom": "^5.10.1",
|
||||
"@testing-library/react": "^11.2.5",
|
||||
"@testing-library/react-hooks": "^7.0.2",
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# @backstage/core-plugin-api
|
||||
|
||||
## 0.1.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 4a336fd292: Deprecate use of extensions without name. Adds a warning to the developer console to prompt integrators to provide names for extensions.
|
||||
- 8b4284cd5c: Improve API documentation for @backstage/core-plugin-api
|
||||
- e059aea7b9: Deprecate unused ApiRef types
|
||||
- Updated dependencies
|
||||
- @backstage/theme@0.2.13
|
||||
|
||||
## 0.1.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -799,9 +799,6 @@ export function useElementFilter<T>(
|
||||
dependencies?: any[],
|
||||
): T;
|
||||
|
||||
// @public
|
||||
export type UserFlags = {};
|
||||
|
||||
// @public
|
||||
export function useRouteRef<Optional extends boolean, Params extends AnyParams>(
|
||||
routeRef: ExternalRouteRef<Params, Optional>,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/core-plugin-api",
|
||||
"description": "Core API used by Backstage plugins",
|
||||
"version": "0.1.12",
|
||||
"version": "0.1.13",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
@@ -30,7 +30,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/config": "^0.1.11",
|
||||
"@backstage/theme": "^0.2.12",
|
||||
"@backstage/theme": "^0.2.13",
|
||||
"@backstage/types": "^0.1.1",
|
||||
"@backstage/version-bridge": "^0.1.0",
|
||||
"@material-ui/core": "^4.12.2",
|
||||
@@ -43,9 +43,9 @@
|
||||
"zen-observable": "^0.8.15"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.8.1",
|
||||
"@backstage/core-app-api": "^0.1.19",
|
||||
"@backstage/test-utils": "^0.1.20",
|
||||
"@backstage/cli": "^0.8.2",
|
||||
"@backstage/core-app-api": "^0.1.20",
|
||||
"@backstage/test-utils": "^0.1.21",
|
||||
"@testing-library/jest-dom": "^5.10.1",
|
||||
"@testing-library/react": "^11.2.5",
|
||||
"@testing-library/react-hooks": "^7.0.2",
|
||||
|
||||
@@ -61,13 +61,6 @@ export type FeatureFlagsSaveOptions = {
|
||||
merge?: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
* User flags alias.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export type UserFlags = {};
|
||||
|
||||
/**
|
||||
* The feature flags API is used to toggle functionality to users across plugins and Backstage.
|
||||
*
|
||||
|
||||
@@ -41,6 +41,7 @@ describe('extensions', () => {
|
||||
const Component = () => <div />;
|
||||
|
||||
const extension = createReactExtension({
|
||||
name: 'Extension',
|
||||
component: {
|
||||
sync: Component,
|
||||
},
|
||||
@@ -67,6 +68,7 @@ describe('extensions', () => {
|
||||
});
|
||||
|
||||
const extension2 = createRoutableExtension({
|
||||
name: 'Extension2',
|
||||
component: () => Promise.resolve(Component),
|
||||
mountPoint: routeRef,
|
||||
});
|
||||
|
||||
@@ -55,7 +55,7 @@ export function createRoutableExtension<
|
||||
mountPoint: RouteRef;
|
||||
name?: string;
|
||||
}): Extension<T> {
|
||||
const { component, mountPoint } = options;
|
||||
const { component, mountPoint, name } = options;
|
||||
return createReactExtension({
|
||||
component: {
|
||||
lazy: () =>
|
||||
@@ -85,7 +85,7 @@ export function createRoutableExtension<
|
||||
};
|
||||
|
||||
const componentName =
|
||||
options.name ||
|
||||
name ||
|
||||
(InnerComponent as { displayName?: string }).displayName ||
|
||||
InnerComponent.name ||
|
||||
'LazyComponent';
|
||||
@@ -108,7 +108,7 @@ export function createRoutableExtension<
|
||||
data: {
|
||||
'core.mountPoint': mountPoint,
|
||||
},
|
||||
name: options.name,
|
||||
name,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -152,7 +152,14 @@ export function createReactExtension<
|
||||
data?: Record<string, unknown>;
|
||||
name?: string;
|
||||
}): Extension<T> {
|
||||
const { data = {} } = options;
|
||||
const { data = {}, name } = options;
|
||||
if (!name) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(
|
||||
'Declaring extensions without name is DEPRECATED. ' +
|
||||
'Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.',
|
||||
);
|
||||
}
|
||||
|
||||
let Component: T;
|
||||
if ('lazy' in options.component) {
|
||||
@@ -164,7 +171,7 @@ export function createReactExtension<
|
||||
Component = options.component.sync;
|
||||
}
|
||||
const componentName =
|
||||
options.name ||
|
||||
name ||
|
||||
(Component as { displayName?: string }).displayName ||
|
||||
Component.name ||
|
||||
'Component';
|
||||
@@ -186,7 +193,7 @@ export function createReactExtension<
|
||||
<AnalyticsContext
|
||||
attributes={{
|
||||
pluginId: plugin.getId(),
|
||||
...(options.name && { extension: options.name }),
|
||||
...(name && { extension: name }),
|
||||
...(mountPoint && { routeRef: mountPoint.id }),
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -1,5 +1,56 @@
|
||||
# @backstage/create-app
|
||||
|
||||
## 0.4.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 5dcea2586c: Integrated `SidebarSearchModal` component into default-app to use the `SearchModal`.
|
||||
|
||||
The `SidebarSearchModal` component can also be used in other generated apps:
|
||||
|
||||
```diff
|
||||
import {
|
||||
- SidebarSearch,
|
||||
+ SidebarSearchModal
|
||||
} from '@backstage/plugin-search';
|
||||
...
|
||||
<SidebarPage>
|
||||
<Sidebar>
|
||||
<SidebarLogo />
|
||||
- <SidebarSearch />
|
||||
+ <SidebarSearchModal />
|
||||
<SidebarDivider />
|
||||
...
|
||||
```
|
||||
|
||||
If you only want to use the `SearchModal` you can import it from `'@backstage/plugin-search'`:
|
||||
|
||||
```js
|
||||
import { SearchModal } from '@backstage/plugin-search';
|
||||
```
|
||||
|
||||
- 5725f87e4c: Updated the app template to no longer include the `--no-private` flag for the `create-plugin` command.
|
||||
|
||||
To apply this change to an existing application, remove the `--no-private` flag from the `create-plugin` command in the root `package.json`:
|
||||
|
||||
```diff
|
||||
"prettier:check": "prettier --check .",
|
||||
- "create-plugin": "backstage-cli create-plugin --scope internal --no-private",
|
||||
+ "create-plugin": "backstage-cli create-plugin --scope internal",
|
||||
"remove-plugin": "backstage-cli remove-plugin"
|
||||
```
|
||||
|
||||
- 1921f70aa7: Removed the version pinning of the packages `graphql-language-service-interface` and `graphql-language-service-parser`. This should no longer be necessary.
|
||||
|
||||
You can apply the same change in your repository by ensuring that the following does _NOT_ appear in your root `package.json`.
|
||||
|
||||
```json
|
||||
"resolutions": {
|
||||
"graphql-language-service-interface": "2.8.2",
|
||||
"graphql-language-service-parser": "1.9.0"
|
||||
},
|
||||
```
|
||||
|
||||
## 0.4.2
|
||||
|
||||
## 0.4.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/create-app",
|
||||
"description": "A CLI that helps you create your own Backstage app",
|
||||
"version": "0.4.2",
|
||||
"version": "0.4.3",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
||||
@@ -25,7 +25,7 @@ import LogoFull from './LogoFull';
|
||||
import LogoIcon from './LogoIcon';
|
||||
import { NavLink } from 'react-router-dom';
|
||||
import { Settings as SidebarSettings } from '@backstage/plugin-user-settings';
|
||||
import { SidebarSearch } from '@backstage/plugin-search';
|
||||
import { SidebarSearchModal } from '@backstage/plugin-search';
|
||||
import {
|
||||
Sidebar,
|
||||
SidebarPage,
|
||||
@@ -74,7 +74,7 @@ export const Root = ({ children }: PropsWithChildren<{}>) => (
|
||||
<SidebarPage>
|
||||
<Sidebar>
|
||||
<SidebarLogo />
|
||||
<SidebarSearch />
|
||||
<SidebarSearchModal />
|
||||
<SidebarDivider />
|
||||
{/* Global nav, not org-specific */}
|
||||
<SidebarItem icon={HomeIcon} to="catalog" text="Home" />
|
||||
|
||||
@@ -1,5 +1,26 @@
|
||||
# @backstage/techdocs-common
|
||||
|
||||
## 0.10.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- a2d4389587: 1. Techdocs publisher constructors now use parameter objects when being
|
||||
instantiated
|
||||
|
||||
2. Internal refactor of `LocalPublish` publisher to use `fromConfig` for
|
||||
creation to be aligned with other publishers; this does not impact
|
||||
`LocalPublish` usage.
|
||||
|
||||
```diff
|
||||
- const publisher = new LocalPublish(config, logger, discovery);
|
||||
+ const publisher = LocalPublish.fromConfig(config, logger, discovery);
|
||||
```
|
||||
|
||||
- 6129c89a47: Default TechDocs container used at docs generation-time is now [v0.3.5](https://github.com/backstage/techdocs-container/releases/tag/v0.3.5).
|
||||
- f3c7eec64b: Updated to properly join URL segments under any OS for both AWS S3 and GCP
|
||||
- Updated dependencies
|
||||
- @backstage/backend-common@0.9.9
|
||||
|
||||
## 0.10.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/techdocs-common",
|
||||
"description": "Common functionalities for TechDocs, to be shared between techdocs-backend plugin and techdocs-cli",
|
||||
"version": "0.10.5",
|
||||
"version": "0.10.6",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"private": false,
|
||||
@@ -38,7 +38,7 @@
|
||||
"dependencies": {
|
||||
"@azure/identity": "^1.5.0",
|
||||
"@azure/storage-blob": "^12.5.0",
|
||||
"@backstage/backend-common": "^0.9.8",
|
||||
"@backstage/backend-common": "^0.9.9",
|
||||
"@backstage/catalog-model": "^0.9.6",
|
||||
"@backstage/config": "^0.1.11",
|
||||
"@backstage/errors": "^0.1.4",
|
||||
@@ -60,7 +60,7 @@
|
||||
"winston": "^3.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.8.1",
|
||||
"@backstage/cli": "^0.8.2",
|
||||
"@types/fs-extra": "^9.0.5",
|
||||
"@types/js-yaml": "^4.0.0",
|
||||
"@types/mime-types": "^2.1.0",
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# @backstage/test-utils
|
||||
|
||||
## 0.1.21
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 71fd5cd735: Update Keyboard deprecation with a link to the recommended successor
|
||||
- Updated dependencies
|
||||
- @backstage/theme@0.2.13
|
||||
- @backstage/core-plugin-api@0.1.13
|
||||
- @backstage/core-app-api@0.1.20
|
||||
|
||||
## 0.1.20
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/test-utils",
|
||||
"description": "Utilities to test Backstage plugins and apps.",
|
||||
"version": "0.1.20",
|
||||
"version": "0.1.21",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
@@ -29,9 +29,9 @@
|
||||
"clean": "backstage-cli clean"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/core-app-api": "^0.1.19",
|
||||
"@backstage/core-plugin-api": "^0.1.12",
|
||||
"@backstage/theme": "^0.2.12",
|
||||
"@backstage/core-app-api": "^0.1.20",
|
||||
"@backstage/core-plugin-api": "^0.1.13",
|
||||
"@backstage/theme": "^0.2.13",
|
||||
"@backstage/types": "^0.1.1",
|
||||
"@material-ui/core": "^4.12.2",
|
||||
"@testing-library/jest-dom": "^5.10.1",
|
||||
@@ -45,7 +45,7 @@
|
||||
"zen-observable": "^0.8.15"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.8.1",
|
||||
"@backstage/cli": "^0.8.2",
|
||||
"@types/jest": "^26.0.7",
|
||||
"@types/node": "^14.14.32"
|
||||
},
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @backstage/theme
|
||||
|
||||
## 0.2.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- c11a37710a: Added a warning variant to `DismissableBanner` component. If you are using a
|
||||
custom theme, you will need to add the optional `palette.banner.warning` color,
|
||||
otherwise this variant will fall back to the `palette.banner.error` color.
|
||||
|
||||
## 0.2.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/theme",
|
||||
"description": "material-ui theme for use with Backstage.",
|
||||
"version": "0.2.12",
|
||||
"version": "0.2.13",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
@@ -31,7 +31,7 @@
|
||||
"@material-ui/core": "^4.12.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.8.1"
|
||||
"@backstage/cli": "^0.8.2"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/catalog-model": "^0.9.5",
|
||||
"@backstage/core-components": "^0.7.2",
|
||||
"@backstage/core-plugin-api": "^0.1.12",
|
||||
"@backstage/core-components": "^0.7.3",
|
||||
"@backstage/core-plugin-api": "^0.1.13",
|
||||
"@backstage/plugin-catalog-react": "^0.6.1",
|
||||
"@backstage/theme": "^0.2.12",
|
||||
"@backstage/theme": "^0.2.13",
|
||||
"@material-ui/core": "^4.12.2",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@material-ui/lab": "4.0.0-alpha.57",
|
||||
@@ -36,10 +36,10 @@
|
||||
"react-use": "^17.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.8.1",
|
||||
"@backstage/core-app-api": "^0.1.19",
|
||||
"@backstage/cli": "^0.8.2",
|
||||
"@backstage/core-app-api": "^0.1.20",
|
||||
"@backstage/dev-utils": "^0.2.12",
|
||||
"@backstage/test-utils": "^0.1.20",
|
||||
"@backstage/test-utils": "^0.1.21",
|
||||
"@testing-library/jest-dom": "^5.10.1",
|
||||
"@testing-library/react": "^11.2.5",
|
||||
"@testing-library/user-event": "^13.1.8",
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/config": "^0.1.5",
|
||||
"@backstage/core-components": "^0.7.2",
|
||||
"@backstage/core-plugin-api": "^0.1.12",
|
||||
"@backstage/theme": "^0.2.12",
|
||||
"@backstage/core-components": "^0.7.3",
|
||||
"@backstage/core-plugin-api": "^0.1.13",
|
||||
"@backstage/theme": "^0.2.13",
|
||||
"@material-ui/core": "^4.12.2",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@material-ui/lab": "4.0.0-alpha.57",
|
||||
@@ -34,10 +34,10 @@
|
||||
"react-use": "^17.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.8.1",
|
||||
"@backstage/core-app-api": "^0.1.19",
|
||||
"@backstage/cli": "^0.8.2",
|
||||
"@backstage/core-app-api": "^0.1.20",
|
||||
"@backstage/dev-utils": "^0.2.12",
|
||||
"@backstage/test-utils": "^0.1.20",
|
||||
"@backstage/test-utils": "^0.1.21",
|
||||
"@testing-library/jest-dom": "^5.10.1",
|
||||
"@testing-library/react": "^11.2.5",
|
||||
"@testing-library/user-event": "^13.1.8",
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
# @backstage/plugin-api-docs
|
||||
|
||||
## 0.6.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 044c38e739: Lazy load all API definition widgets. The widgets use libraries like
|
||||
`swagger-ui`, `graphiql`, and `@asyncapi/react-component` which are quite heavy
|
||||
weight. To improve initial load times, the widgets are only loaded once used.
|
||||
- Updated dependencies
|
||||
- @backstage/core-components@0.7.3
|
||||
- @backstage/theme@0.2.13
|
||||
- @backstage/core-plugin-api@0.1.13
|
||||
- @backstage/plugin-catalog-react@0.6.3
|
||||
|
||||
## 0.6.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -84,11 +84,19 @@ export const ApiTypeTitle: ({
|
||||
apiEntity: ApiEntity;
|
||||
}) => JSX.Element;
|
||||
|
||||
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
|
||||
// Warning: (ae-missing-release-tag) "AsyncApiDefinitionWidget" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export const AsyncApiDefinitionWidget: ({ definition }: Props_5) => JSX.Element;
|
||||
export const AsyncApiDefinitionWidget: (
|
||||
props: AsyncApiDefinitionWidgetProps,
|
||||
) => JSX.Element;
|
||||
|
||||
// Warning: (ae-missing-release-tag) "AsyncApiDefinitionWidgetProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export type AsyncApiDefinitionWidgetProps = {
|
||||
definition: string;
|
||||
};
|
||||
|
||||
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
|
||||
// Warning: (ae-missing-release-tag) "ConsumedApisCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
@@ -100,7 +108,7 @@ export const ConsumedApisCard: ({ variant }: Props_2) => JSX.Element;
|
||||
// Warning: (ae-missing-release-tag) "ConsumingComponentsCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export const ConsumingComponentsCard: ({ variant }: Props_6) => JSX.Element;
|
||||
export const ConsumingComponentsCard: ({ variant }: Props_5) => JSX.Element;
|
||||
|
||||
// Warning: (ae-missing-release-tag) "defaultDefinitionWidgets" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
@@ -169,20 +177,34 @@ export const EntityProvidingComponentsCard: ({
|
||||
// @public (undocumented)
|
||||
export const HasApisCard: ({ variant }: Props_3) => JSX.Element;
|
||||
|
||||
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
|
||||
// Warning: (ae-missing-release-tag) "OpenApiDefinitionWidget" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export const OpenApiDefinitionWidget: ({ definition }: Props_8) => JSX.Element;
|
||||
export const OpenApiDefinitionWidget: (
|
||||
props: OpenApiDefinitionWidgetProps,
|
||||
) => JSX.Element;
|
||||
|
||||
// Warning: (ae-missing-release-tag) "OpenApiDefinitionWidgetProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export type OpenApiDefinitionWidgetProps = {
|
||||
definition: string;
|
||||
};
|
||||
|
||||
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
|
||||
// Warning: (ae-missing-release-tag) "PlainApiDefinitionWidget" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export const PlainApiDefinitionWidget: ({
|
||||
definition,
|
||||
language,
|
||||
}: Props_9) => JSX.Element;
|
||||
export const PlainApiDefinitionWidget: (
|
||||
props: PlainApiDefinitionWidgetProps,
|
||||
) => JSX.Element;
|
||||
|
||||
// Warning: (ae-missing-release-tag) "PlainApiDefinitionWidgetProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export type PlainApiDefinitionWidgetProps = {
|
||||
definition: any;
|
||||
language: string;
|
||||
};
|
||||
|
||||
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
|
||||
// Warning: (ae-missing-release-tag) "ProvidedApisCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
@@ -194,5 +216,5 @@ export const ProvidedApisCard: ({ variant }: Props_4) => JSX.Element;
|
||||
// Warning: (ae-missing-release-tag) "ProvidingComponentsCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export const ProvidingComponentsCard: ({ variant }: Props_7) => JSX.Element;
|
||||
export const ProvidingComponentsCard: ({ variant }: Props_6) => JSX.Element;
|
||||
```
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/plugin-api-docs",
|
||||
"description": "A Backstage plugin that helps represent API entities in the frontend",
|
||||
"version": "0.6.12",
|
||||
"version": "0.6.13",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
@@ -32,11 +32,11 @@
|
||||
"dependencies": {
|
||||
"@asyncapi/react-component": "^0.23.0",
|
||||
"@backstage/catalog-model": "^0.9.5",
|
||||
"@backstage/core-components": "^0.7.2",
|
||||
"@backstage/core-plugin-api": "^0.1.12",
|
||||
"@backstage/core-components": "^0.7.3",
|
||||
"@backstage/core-plugin-api": "^0.1.13",
|
||||
"@backstage/plugin-catalog": "^0.7.2",
|
||||
"@backstage/plugin-catalog-react": "^0.6.1",
|
||||
"@backstage/theme": "^0.2.12",
|
||||
"@backstage/plugin-catalog-react": "^0.6.3",
|
||||
"@backstage/theme": "^0.2.13",
|
||||
"@material-ui/core": "^4.12.2",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@material-ui/lab": "4.0.0-alpha.57",
|
||||
@@ -53,10 +53,10 @@
|
||||
"swagger-ui-react": "^4.0.0-rc.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.8.1",
|
||||
"@backstage/core-app-api": "^0.1.19",
|
||||
"@backstage/cli": "^0.8.2",
|
||||
"@backstage/core-app-api": "^0.1.20",
|
||||
"@backstage/dev-utils": "^0.2.12",
|
||||
"@backstage/test-utils": "^0.1.20",
|
||||
"@backstage/test-utils": "^0.1.21",
|
||||
"@testing-library/jest-dom": "^5.10.1",
|
||||
"@testing-library/react": "^11.2.5",
|
||||
"@testing-library/user-event": "^13.1.8",
|
||||
|
||||
+4
-4
@@ -16,9 +16,9 @@
|
||||
|
||||
import { renderInTestApp } from '@backstage/test-utils';
|
||||
import React from 'react';
|
||||
import { AsyncApiDefinitionWidget } from './AsyncApiDefinitionWidget';
|
||||
import { AsyncApiDefinition } from './AsyncApiDefinition';
|
||||
|
||||
describe('<AsyncApiDefinitionWidget />', () => {
|
||||
describe('<AsyncApiDefinition />', () => {
|
||||
it('renders asyncapi spec', async () => {
|
||||
const definition = `
|
||||
asyncapi: 2.0.0
|
||||
@@ -40,7 +40,7 @@ components:
|
||||
type: string
|
||||
`;
|
||||
const { getByText, getAllByText } = await renderInTestApp(
|
||||
<AsyncApiDefinitionWidget definition={definition} />,
|
||||
<AsyncApiDefinition definition={definition} />,
|
||||
);
|
||||
|
||||
expect(getByText(/Account Service/i)).toBeInTheDocument();
|
||||
@@ -51,7 +51,7 @@ components:
|
||||
|
||||
it('renders error if definition is missing', async () => {
|
||||
const { getByText } = await renderInTestApp(
|
||||
<AsyncApiDefinitionWidget definition="" />,
|
||||
<AsyncApiDefinition definition="" />,
|
||||
);
|
||||
expect(getByText(/Error/i)).toBeInTheDocument();
|
||||
expect(getByText(/Document can't be null or falsey/i)).toBeInTheDocument();
|
||||
@@ -0,0 +1,145 @@
|
||||
/*
|
||||
* Copyright 2020 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import AsyncApi from '@asyncapi/react-component';
|
||||
import '@asyncapi/react-component/lib/styles/fiori.css';
|
||||
import { alpha, makeStyles } from '@material-ui/core/styles';
|
||||
import React from 'react';
|
||||
|
||||
const useStyles = makeStyles(theme => ({
|
||||
root: {
|
||||
'& .asyncapi': {
|
||||
'font-family': 'inherit',
|
||||
background: 'none',
|
||||
},
|
||||
'& h2': {
|
||||
...theme.typography.h6,
|
||||
},
|
||||
'& .text-teal': {
|
||||
color: theme.palette.primary.main,
|
||||
},
|
||||
'& button': {
|
||||
...theme.typography.button,
|
||||
background: 'none',
|
||||
boxSizing: 'border-box',
|
||||
minWidth: 64,
|
||||
borderRadius: theme.shape.borderRadius,
|
||||
transition: theme.transitions.create(
|
||||
['background-color', 'box-shadow', 'border'],
|
||||
{
|
||||
duration: theme.transitions.duration.short,
|
||||
},
|
||||
),
|
||||
padding: '5px 15px',
|
||||
color: theme.palette.primary.main,
|
||||
border: `1px solid ${alpha(theme.palette.primary.main, 0.5)}`,
|
||||
'&:hover': {
|
||||
textDecoration: 'none',
|
||||
'&.Mui-disabled': {
|
||||
backgroundColor: 'transparent',
|
||||
},
|
||||
border: `1px solid ${theme.palette.primary.main}`,
|
||||
backgroundColor: alpha(
|
||||
theme.palette.primary.main,
|
||||
theme.palette.action.hoverOpacity,
|
||||
),
|
||||
// Reset on touch devices, it doesn't add specificity
|
||||
'@media (hover: none)': {
|
||||
backgroundColor: 'transparent',
|
||||
},
|
||||
},
|
||||
'&.Mui-disabled': {
|
||||
color: theme.palette.action.disabled,
|
||||
},
|
||||
},
|
||||
'& .asyncapi__collapse-button:hover': {
|
||||
color: theme.palette.primary.main,
|
||||
},
|
||||
'& button.asyncapi__toggle-button': {
|
||||
'min-width': 'inherit',
|
||||
},
|
||||
'& .asyncapi__info-list li': {
|
||||
'border-color': theme.palette.primary.main,
|
||||
'&:hover': {
|
||||
color: theme.palette.text.primary,
|
||||
'border-color': theme.palette.primary.main,
|
||||
'background-color': theme.palette.primary.main,
|
||||
},
|
||||
},
|
||||
'& .asyncapi__info-list li a': {
|
||||
color: theme.palette.primary.main,
|
||||
'&:hover': {
|
||||
color: theme.palette.getContrastText(theme.palette.primary.main),
|
||||
},
|
||||
},
|
||||
'& .asyncapi__enum': {
|
||||
color: theme.palette.secondary.main,
|
||||
},
|
||||
'& .asyncapi__info, .asyncapi__channel, .asyncapi__channels > div, .asyncapi__schema, .asyncapi__channel-operations-list .asyncapi__messages-list-item .asyncapi__message, .asyncapi__message, .asyncapi__server, .asyncapi__servers > div, .asyncapi__messages > div, .asyncapi__schemas > div':
|
||||
{
|
||||
'background-color': 'inherit',
|
||||
},
|
||||
'& .asyncapi__channel-parameters-header, .asyncapi__channel-operations-header, .asyncapi__channel-operation-oneOf-subscribe-header, .asyncapi__channel-operation-oneOf-publish-header, .asyncapi__channel-operation-message-header, .asyncapi__message-header, .asyncapi__message-header-title, .asyncapi__message-header-title > h3, .asyncapi__bindings, .asyncapi__bindings-header, .asyncapi__bindings-header > h4':
|
||||
{
|
||||
'background-color': 'inherit',
|
||||
color: theme.palette.text.primary,
|
||||
},
|
||||
'& .asyncapi__additional-properties-notice': {
|
||||
color: theme.palette.text.hint,
|
||||
},
|
||||
'& .asyncapi__code, .asyncapi__code-pre': {
|
||||
background: theme.palette.background.default,
|
||||
},
|
||||
'& .asyncapi__schema-example-header-title': {
|
||||
color: theme.palette.text.secondary,
|
||||
},
|
||||
'& .asyncapi__message-headers-header, .asyncapi__message-payload-header, .asyncapi__server-variables-header, .asyncapi__server-security-header':
|
||||
{
|
||||
'background-color': 'inherit',
|
||||
color: theme.palette.text.secondary,
|
||||
},
|
||||
'& .asyncapi__table-header': {
|
||||
background: theme.palette.background.default,
|
||||
},
|
||||
'& .asyncapi__table-body': {
|
||||
color: theme.palette.text.primary,
|
||||
},
|
||||
'& .asyncapi__server-security-flow': {
|
||||
background: theme.palette.background.default,
|
||||
border: 'none',
|
||||
},
|
||||
'& .asyncapi__server-security-flows-list a': {
|
||||
color: theme.palette.primary.main,
|
||||
},
|
||||
'& .asyncapi__table-row--nested': {
|
||||
color: theme.palette.text.secondary,
|
||||
},
|
||||
},
|
||||
}));
|
||||
|
||||
type Props = {
|
||||
definition: string;
|
||||
};
|
||||
|
||||
export const AsyncApiDefinition = ({ definition }: Props) => {
|
||||
const classes = useStyles();
|
||||
|
||||
return (
|
||||
<div className={classes.root}>
|
||||
<AsyncApi schema={definition} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
+16
-121
@@ -14,132 +14,27 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import AsyncApi from '@asyncapi/react-component';
|
||||
import '@asyncapi/react-component/lib/styles/fiori.css';
|
||||
import { fade, makeStyles } from '@material-ui/core/styles';
|
||||
import React from 'react';
|
||||
import { Progress } from '@backstage/core-components';
|
||||
import React, { Suspense } from 'react';
|
||||
|
||||
const useStyles = makeStyles(theme => ({
|
||||
root: {
|
||||
'& .asyncapi': {
|
||||
'font-family': 'inherit',
|
||||
background: 'none',
|
||||
},
|
||||
'& h2': {
|
||||
...theme.typography.h6,
|
||||
},
|
||||
'& .text-teal': {
|
||||
color: theme.palette.primary.main,
|
||||
},
|
||||
'& button': {
|
||||
...theme.typography.button,
|
||||
background: 'none',
|
||||
boxSizing: 'border-box',
|
||||
minWidth: 64,
|
||||
borderRadius: theme.shape.borderRadius,
|
||||
transition: theme.transitions.create(
|
||||
['background-color', 'box-shadow', 'border'],
|
||||
{
|
||||
duration: theme.transitions.duration.short,
|
||||
},
|
||||
),
|
||||
padding: '5px 15px',
|
||||
color: theme.palette.primary.main,
|
||||
border: `1px solid ${fade(theme.palette.primary.main, 0.5)}`,
|
||||
'&:hover': {
|
||||
textDecoration: 'none',
|
||||
'&.Mui-disabled': {
|
||||
backgroundColor: 'transparent',
|
||||
},
|
||||
border: `1px solid ${theme.palette.primary.main}`,
|
||||
backgroundColor: fade(
|
||||
theme.palette.primary.main,
|
||||
theme.palette.action.hoverOpacity,
|
||||
),
|
||||
// Reset on touch devices, it doesn't add specificity
|
||||
'@media (hover: none)': {
|
||||
backgroundColor: 'transparent',
|
||||
},
|
||||
},
|
||||
'&.Mui-disabled': {
|
||||
color: theme.palette.action.disabled,
|
||||
},
|
||||
},
|
||||
'& .asyncapi__collapse-button:hover': {
|
||||
color: theme.palette.primary.main,
|
||||
},
|
||||
'& button.asyncapi__toggle-button': {
|
||||
'min-width': 'inherit',
|
||||
},
|
||||
'& .asyncapi__info-list li': {
|
||||
'border-color': theme.palette.primary.main,
|
||||
'&:hover': {
|
||||
color: theme.palette.text.primary,
|
||||
'border-color': theme.palette.primary.main,
|
||||
'background-color': theme.palette.primary.main,
|
||||
},
|
||||
},
|
||||
'& .asyncapi__info-list li a': {
|
||||
color: theme.palette.primary.main,
|
||||
'&:hover': {
|
||||
color: theme.palette.getContrastText(theme.palette.primary.main),
|
||||
},
|
||||
},
|
||||
'& .asyncapi__enum': {
|
||||
color: theme.palette.secondary.main,
|
||||
},
|
||||
'& .asyncapi__info, .asyncapi__channel, .asyncapi__channels > div, .asyncapi__schema, .asyncapi__channel-operations-list .asyncapi__messages-list-item .asyncapi__message, .asyncapi__message, .asyncapi__server, .asyncapi__servers > div, .asyncapi__messages > div, .asyncapi__schemas > div':
|
||||
{
|
||||
'background-color': 'inherit',
|
||||
},
|
||||
'& .asyncapi__channel-parameters-header, .asyncapi__channel-operations-header, .asyncapi__channel-operation-oneOf-subscribe-header, .asyncapi__channel-operation-oneOf-publish-header, .asyncapi__channel-operation-message-header, .asyncapi__message-header, .asyncapi__message-header-title, .asyncapi__message-header-title > h3, .asyncapi__bindings, .asyncapi__bindings-header, .asyncapi__bindings-header > h4':
|
||||
{
|
||||
'background-color': 'inherit',
|
||||
color: theme.palette.text.primary,
|
||||
},
|
||||
'& .asyncapi__additional-properties-notice': {
|
||||
color: theme.palette.text.hint,
|
||||
},
|
||||
'& .asyncapi__code, .asyncapi__code-pre': {
|
||||
background: theme.palette.background.default,
|
||||
},
|
||||
'& .asyncapi__schema-example-header-title': {
|
||||
color: theme.palette.text.secondary,
|
||||
},
|
||||
'& .asyncapi__message-headers-header, .asyncapi__message-payload-header, .asyncapi__server-variables-header, .asyncapi__server-security-header':
|
||||
{
|
||||
'background-color': 'inherit',
|
||||
color: theme.palette.text.secondary,
|
||||
},
|
||||
'& .asyncapi__table-header': {
|
||||
background: theme.palette.background.default,
|
||||
},
|
||||
'& .asyncapi__table-body': {
|
||||
color: theme.palette.text.primary,
|
||||
},
|
||||
'& .asyncapi__server-security-flow': {
|
||||
background: theme.palette.background.default,
|
||||
border: 'none',
|
||||
},
|
||||
'& .asyncapi__server-security-flows-list a': {
|
||||
color: theme.palette.primary.main,
|
||||
},
|
||||
'& .asyncapi__table-row--nested': {
|
||||
color: theme.palette.text.secondary,
|
||||
},
|
||||
},
|
||||
}));
|
||||
// The asyncapi component and related CSS has a significant size, only load it
|
||||
// if the element is actually used.
|
||||
const LazyAsyncApiDefinition = React.lazy(() =>
|
||||
import('./AsyncApiDefinition').then(m => ({
|
||||
default: m.AsyncApiDefinition,
|
||||
})),
|
||||
);
|
||||
|
||||
type Props = {
|
||||
export type AsyncApiDefinitionWidgetProps = {
|
||||
definition: string;
|
||||
};
|
||||
|
||||
export const AsyncApiDefinitionWidget = ({ definition }: Props) => {
|
||||
const classes = useStyles();
|
||||
|
||||
export const AsyncApiDefinitionWidget = (
|
||||
props: AsyncApiDefinitionWidgetProps,
|
||||
) => {
|
||||
return (
|
||||
<div className={classes.root}>
|
||||
<AsyncApi schema={definition} />
|
||||
</div>
|
||||
<Suspense fallback={<Progress />}>
|
||||
<LazyAsyncApiDefinition {...props} />
|
||||
</Suspense>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -15,3 +15,4 @@
|
||||
*/
|
||||
|
||||
export { AsyncApiDefinitionWidget } from './AsyncApiDefinitionWidget';
|
||||
export type { AsyncApiDefinitionWidgetProps } from './AsyncApiDefinitionWidget';
|
||||
|
||||
+3
-3
@@ -16,9 +16,9 @@
|
||||
|
||||
import { renderInTestApp } from '@backstage/test-utils';
|
||||
import React from 'react';
|
||||
import { GraphQlDefinitionWidget } from './GraphQlDefinitionWidget';
|
||||
import { GraphQlDefinition } from './GraphQlDefinition';
|
||||
|
||||
describe('<GraphQlDefinitionWidget />', () => {
|
||||
describe('<GraphQlDefinition />', () => {
|
||||
it('renders graphql schema', async () => {
|
||||
const definition = `
|
||||
"""Hello World!"""
|
||||
@@ -53,7 +53,7 @@ type Film {
|
||||
};
|
||||
|
||||
const { getByText } = await renderInTestApp(
|
||||
<GraphQlDefinitionWidget definition={definition} />,
|
||||
<GraphQlDefinition definition={definition} />,
|
||||
);
|
||||
|
||||
expect(getByText(/Film/i)).toBeInTheDocument();
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright 2020 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { BackstageTheme } from '@backstage/theme';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import GraphiQL from 'graphiql';
|
||||
import 'graphiql/graphiql.css';
|
||||
import { buildSchema } from 'graphql';
|
||||
import React from 'react';
|
||||
|
||||
const useStyles = makeStyles<BackstageTheme>(() => ({
|
||||
root: {
|
||||
height: '100%',
|
||||
display: 'flex',
|
||||
flexFlow: 'column nowrap',
|
||||
},
|
||||
graphiQlWrapper: {
|
||||
flex: 1,
|
||||
'@global': {
|
||||
'.graphiql-container': {
|
||||
boxSizing: 'initial',
|
||||
height: '100%',
|
||||
minHeight: '600px',
|
||||
flex: '1 1 auto',
|
||||
},
|
||||
},
|
||||
},
|
||||
}));
|
||||
|
||||
type Props = {
|
||||
definition: string;
|
||||
};
|
||||
|
||||
export const GraphQlDefinition = ({ definition }: Props) => {
|
||||
const classes = useStyles();
|
||||
const schema = buildSchema(definition);
|
||||
|
||||
return (
|
||||
<div className={classes.root}>
|
||||
<div className={classes.graphiQlWrapper}>
|
||||
<GraphiQL
|
||||
fetcher={() => Promise.resolve(null) as any}
|
||||
schema={schema}
|
||||
docExplorerOpen
|
||||
defaultSecondaryEditorOpen={false}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
+14
-41
@@ -14,54 +14,27 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { BackstageTheme } from '@backstage/theme';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import 'graphiql/graphiql.css';
|
||||
import { buildSchema } from 'graphql';
|
||||
import React, { Suspense } from 'react';
|
||||
import { Progress } from '@backstage/core-components';
|
||||
import React, { Suspense } from 'react';
|
||||
|
||||
const GraphiQL = React.lazy(() => import('graphiql'));
|
||||
// The graphql component, graphql and related CSS has a significant size, only
|
||||
// load it if the element is actually used.
|
||||
const LazyGraphQlDefinition = React.lazy(() =>
|
||||
import('./GraphQlDefinition').then(m => ({
|
||||
default: m.GraphQlDefinition,
|
||||
})),
|
||||
);
|
||||
|
||||
const useStyles = makeStyles<BackstageTheme>(() => ({
|
||||
root: {
|
||||
height: '100%',
|
||||
display: 'flex',
|
||||
flexFlow: 'column nowrap',
|
||||
},
|
||||
graphiQlWrapper: {
|
||||
flex: 1,
|
||||
'@global': {
|
||||
'.graphiql-container': {
|
||||
boxSizing: 'initial',
|
||||
height: '100%',
|
||||
minHeight: '600px',
|
||||
flex: '1 1 auto',
|
||||
},
|
||||
},
|
||||
},
|
||||
}));
|
||||
|
||||
type Props = {
|
||||
definition: any;
|
||||
export type GraphQlDefinitionWidgetProps = {
|
||||
definition: string;
|
||||
};
|
||||
|
||||
export const GraphQlDefinitionWidget = ({ definition }: Props) => {
|
||||
const classes = useStyles();
|
||||
const schema = buildSchema(definition);
|
||||
|
||||
export const GraphQlDefinitionWidget = (
|
||||
props: GraphQlDefinitionWidgetProps,
|
||||
) => {
|
||||
return (
|
||||
<Suspense fallback={<Progress />}>
|
||||
<div className={classes.root}>
|
||||
<div className={classes.graphiQlWrapper}>
|
||||
<GraphiQL
|
||||
fetcher={() => Promise.resolve(null) as any}
|
||||
schema={schema}
|
||||
docExplorerOpen
|
||||
defaultSecondaryEditorOpen={false}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<LazyGraphQlDefinition {...props} />
|
||||
</Suspense>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -15,3 +15,4 @@
|
||||
*/
|
||||
|
||||
export { GraphQlDefinitionWidget } from './GraphQlDefinitionWidget';
|
||||
export type { GraphQlDefinitionWidgetProps } from './GraphQlDefinitionWidget';
|
||||
|
||||
+4
-4
@@ -17,9 +17,9 @@
|
||||
import { renderInTestApp } from '@backstage/test-utils';
|
||||
import { waitFor } from '@testing-library/react';
|
||||
import React from 'react';
|
||||
import { OpenApiDefinitionWidget } from './OpenApiDefinitionWidget';
|
||||
import { OpenApiDefinition } from './OpenApiDefinition';
|
||||
|
||||
describe('<OpenApiDefinitionWidget />', () => {
|
||||
describe('<OpenApiDefinition />', () => {
|
||||
it('renders openapi spec', async () => {
|
||||
const definition = `
|
||||
openapi: "3.0.0"
|
||||
@@ -39,7 +39,7 @@ paths:
|
||||
description: Success
|
||||
`;
|
||||
const { getByText } = await renderInTestApp(
|
||||
<OpenApiDefinitionWidget definition={definition} />,
|
||||
<OpenApiDefinition definition={definition} />,
|
||||
);
|
||||
|
||||
// swagger-ui loads the documentation asynchronously
|
||||
@@ -51,7 +51,7 @@ paths:
|
||||
|
||||
it('renders error if definition is missing', async () => {
|
||||
const { getByText } = await renderInTestApp(
|
||||
<OpenApiDefinitionWidget definition="" />,
|
||||
<OpenApiDefinition definition="" />,
|
||||
);
|
||||
expect(getByText(/No API definition provided/i)).toBeInTheDocument();
|
||||
});
|
||||
@@ -0,0 +1,132 @@
|
||||
/*
|
||||
* Copyright 2020 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import SwaggerUI from 'swagger-ui-react';
|
||||
import 'swagger-ui-react/swagger-ui.css';
|
||||
|
||||
const useStyles = makeStyles(theme => ({
|
||||
root: {
|
||||
'& .swagger-ui': {
|
||||
fontFamily: 'inherit',
|
||||
color: theme.palette.text.primary,
|
||||
|
||||
[`& .info h1,
|
||||
.info h2,
|
||||
.info h3,
|
||||
.info h4,
|
||||
.info h5,
|
||||
.info h6`]: {
|
||||
fontFamily: 'inherit',
|
||||
color: theme.palette.text.primary,
|
||||
},
|
||||
[`& .scheme-container`]: {
|
||||
backgroundColor: theme.palette.background.default,
|
||||
},
|
||||
[`& .opblock-tag,
|
||||
.opblock-tag small,
|
||||
table thead tr td,
|
||||
table thead tr th`]: {
|
||||
fontFamily: 'inherit',
|
||||
color: theme.palette.text.primary,
|
||||
borderColor: theme.palette.divider,
|
||||
},
|
||||
[`& section.models,
|
||||
section.models.is-open h4`]: {
|
||||
borderColor: theme.palette.divider,
|
||||
},
|
||||
[`& .opblock .opblock-summary-description,
|
||||
.parameter__type,
|
||||
table.headers td,
|
||||
.model-title,
|
||||
.model .property.primitive,
|
||||
section h3`]: {
|
||||
fontFamily: 'inherit',
|
||||
color: theme.palette.text.secondary,
|
||||
},
|
||||
[`& .opblock .opblock-summary-operation-id,
|
||||
.opblock .opblock-summary-path,
|
||||
.opblock .opblock-summary-path__deprecated,
|
||||
.opblock .opblock-section-header h4,
|
||||
.parameter__name,
|
||||
.response-col_status,
|
||||
.response-col_links,
|
||||
.responses-inner h4,
|
||||
.responses-inner h5,
|
||||
.opblock-section-header .btn,
|
||||
.tab li,
|
||||
.info li,
|
||||
.info p,
|
||||
.info table,
|
||||
section.models h4,
|
||||
.info .title,
|
||||
table.model tr.description,
|
||||
.property-row`]: {
|
||||
fontFamily: 'inherit',
|
||||
color: theme.palette.text.primary,
|
||||
},
|
||||
[`& .opblock .opblock-section-header,
|
||||
.model-box,
|
||||
section.models .model-container`]: {
|
||||
background: theme.palette.background.default,
|
||||
},
|
||||
[`& .prop-format,
|
||||
.parameter__in`]: {
|
||||
color: theme.palette.text.disabled,
|
||||
},
|
||||
[`& .opblock-description-wrapper p,
|
||||
.opblock-external-docs-wrapper p,
|
||||
.opblock-title_normal p,
|
||||
.response-control-media-type__accept-message,
|
||||
.opblock .opblock-section-header>label,
|
||||
.scheme-container .schemes>label,
|
||||
.info .base-url,
|
||||
.model`]: {
|
||||
color: theme.palette.text.hint,
|
||||
},
|
||||
[`& .parameter__name.required:after`]: {
|
||||
color: theme.palette.warning.dark,
|
||||
},
|
||||
[`& .prop-type`]: {
|
||||
color: theme.palette.primary.main,
|
||||
},
|
||||
},
|
||||
},
|
||||
}));
|
||||
|
||||
export type OpenApiDefinitionProps = {
|
||||
definition: string;
|
||||
};
|
||||
|
||||
export const OpenApiDefinition = ({ definition }: OpenApiDefinitionProps) => {
|
||||
const classes = useStyles();
|
||||
|
||||
// Due to a bug in the swagger-ui-react component, the component needs
|
||||
// to be created without content first.
|
||||
const [def, setDef] = useState('');
|
||||
|
||||
useEffect(() => {
|
||||
const timer = setTimeout(() => setDef(definition), 0);
|
||||
return () => clearTimeout(timer);
|
||||
}, [definition, setDef]);
|
||||
|
||||
return (
|
||||
<div className={classes.root}>
|
||||
<SwaggerUI spec={def} deepLinking />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
+16
-70
@@ -14,81 +14,27 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import SwaggerUI from 'swagger-ui-react';
|
||||
import 'swagger-ui-react/swagger-ui.css';
|
||||
import { Progress } from '@backstage/core-components';
|
||||
import React, { Suspense } from 'react';
|
||||
|
||||
// TODO: Schemas
|
||||
// The swagger-ui component and related CSS has a significant size, only load it
|
||||
// if the element is actually used.
|
||||
const LazyOpenApiDefinition = React.lazy(() =>
|
||||
import('./OpenApiDefinition').then(m => ({
|
||||
default: m.OpenApiDefinition,
|
||||
})),
|
||||
);
|
||||
|
||||
const useStyles = makeStyles(theme => ({
|
||||
root: {
|
||||
'& .swagger-ui, .info h1, .info h2, .info h3, .info h4, .info h': {
|
||||
'font-family': 'inherit',
|
||||
color: theme.palette.text.primary,
|
||||
},
|
||||
'& .scheme-container': {
|
||||
'background-color': theme.palette.background.default,
|
||||
},
|
||||
'& .opblock-tag, .opblock-tag small, table thead tr td, table thead tr th':
|
||||
{
|
||||
color: theme.palette.text.primary,
|
||||
'border-color': theme.palette.divider,
|
||||
},
|
||||
'& section.models, section.models.is-open h4': {
|
||||
'border-color': theme.palette.divider,
|
||||
},
|
||||
'& .opblock .opblock-summary-description, .parameter__type, table.headers td, .model-title, .model .property.primitive, section h3':
|
||||
{
|
||||
color: theme.palette.text.secondary,
|
||||
},
|
||||
'& .opblock .opblock-summary-operation-id, .opblock .opblock-summary-path, .opblock .opblock-summary-path__deprecated, .opblock .opblock-section-header h4, .parameter__name, .response-col_status, .response-col_links, .responses-inner h4, .swagger-ui .responses-inner h5, .opblock-section-header .btn, .tab li, .info li, .info p, .info table, section.models h4, .info .title, table.model tr.description, .property-row':
|
||||
{
|
||||
color: theme.palette.text.primary,
|
||||
},
|
||||
'& .opblock .opblock-section-header, .model-box, section.models .model-container':
|
||||
{
|
||||
background: theme.palette.background.default,
|
||||
},
|
||||
'& .prop-format, .parameter__in': {
|
||||
color: theme.palette.text.disabled,
|
||||
},
|
||||
'& ': {
|
||||
color: theme.palette.text.primary,
|
||||
'border-color': theme.palette.divider,
|
||||
},
|
||||
'& .opblock-description-wrapper p, .opblock-external-docs-wrapper p, .opblock-title_normal p, .response-control-media-type__accept-message, .opblock .opblock-section-header>label, .scheme-container .schemes>label, .info .base-url, .model':
|
||||
{
|
||||
color: theme.palette.text.hint,
|
||||
},
|
||||
'& .parameter__name.required:after': {
|
||||
color: theme.palette.warning.dark,
|
||||
},
|
||||
'& .prop-type': {
|
||||
color: theme.palette.primary.main,
|
||||
},
|
||||
},
|
||||
}));
|
||||
|
||||
type Props = {
|
||||
export type OpenApiDefinitionWidgetProps = {
|
||||
definition: string;
|
||||
};
|
||||
|
||||
export const OpenApiDefinitionWidget = ({ definition }: Props) => {
|
||||
const classes = useStyles();
|
||||
|
||||
// Due to a bug in the swagger-ui-react component, the component needs
|
||||
// to be created without content first.
|
||||
const [def, setDef] = useState('');
|
||||
|
||||
useEffect(() => {
|
||||
const timer = setTimeout(() => setDef(definition), 0);
|
||||
return () => clearTimeout(timer);
|
||||
}, [definition, setDef]);
|
||||
|
||||
export const OpenApiDefinitionWidget = (
|
||||
props: OpenApiDefinitionWidgetProps,
|
||||
) => {
|
||||
return (
|
||||
<div className={classes.root}>
|
||||
<SwaggerUI spec={def} deepLinking />
|
||||
</div>
|
||||
<Suspense fallback={<Progress />}>
|
||||
<LazyOpenApiDefinition {...props} />
|
||||
</Suspense>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -15,3 +15,4 @@
|
||||
*/
|
||||
|
||||
export { OpenApiDefinitionWidget } from './OpenApiDefinitionWidget';
|
||||
export type { OpenApiDefinitionWidgetProps } from './OpenApiDefinitionWidget';
|
||||
|
||||
+9
-3
@@ -17,13 +17,19 @@
|
||||
import React from 'react';
|
||||
import { CodeSnippet } from '@backstage/core-components';
|
||||
|
||||
type Props = {
|
||||
export type PlainApiDefinitionWidgetProps = {
|
||||
definition: any;
|
||||
language: string;
|
||||
};
|
||||
|
||||
export const PlainApiDefinitionWidget = ({ definition, language }: Props) => {
|
||||
export const PlainApiDefinitionWidget = (
|
||||
props: PlainApiDefinitionWidgetProps,
|
||||
) => {
|
||||
return (
|
||||
<CodeSnippet text={definition} language={language} showCopyCodeButton />
|
||||
<CodeSnippet
|
||||
text={props.definition}
|
||||
language={props.language}
|
||||
showCopyCodeButton
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -15,3 +15,4 @@
|
||||
*/
|
||||
|
||||
export { PlainApiDefinitionWidget } from './PlainApiDefinitionWidget';
|
||||
export type { PlainApiDefinitionWidgetProps } from './PlainApiDefinitionWidget';
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user