Merge branch 'master' into mobile-sidebar

Signed-off-by: Philipp Hugenroth <philipph@spotify.com>
This commit is contained in:
Philipp Hugenroth
2021-11-11 15:58:37 +01:00
210 changed files with 2186 additions and 1164 deletions
-5
View File
@@ -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.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-kubernetes': patch
---
fix: kubernetes plugin shall pass id token on get clusters request if possible
-8
View File
@@ -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.
-7
View File
@@ -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.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/backend-common': patch
---
AWSS3UrlReader now throws a `NotModifiedError` (exported from @backstage/backend-common) when s3 returns a 304 response.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-jenkins-backend': patch
---
Don't require a validation pattern for the Jenkins base URL.
-5
View File
@@ -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
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/backend-common': patch
'@backstage/cli': patch
'@backstage/config-loader': patch
---
Reading app config from a remote server
-5
View File
@@ -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.
-5
View File
@@ -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
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-kafka': patch
---
Use IdentityApi to provide Auth Token for KafkaBackendClient Api calls
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/test-utils': patch
---
Update Keyboard deprecation with a link to the recommended successor
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-scaffolder-backend': patch
---
Expose some classes and interfaces public so TaskWorkers can run externally from the scaffolder API.
-9
View File
@@ -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`.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/catalog-client': patch
---
Improved API documentation for catalog-client.
-15
View File
@@ -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);
```
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-auth-backend': patch
---
Only use settings that have a value when creating a new FirestoreKeyStore instance
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-sentry': patch
---
fix: sentry-plugin can forward identity token to backend (for case when it requires authorization)
-5
View File
@@ -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.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/cli': patch
---
Make `ExitCodeError` call `super` early to avoid compiler warnings
-14
View File
@@ -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"
```
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/config-loader': patch
---
Bump msw to the same version as the rest
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-code-coverage': patch
---
Make dates in X-Axis sort in ascending order
-5
View File
@@ -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).
-5
View File
@@ -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.
-42
View File
@@ -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,
}),
}),
];
```
-14
View File
@@ -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"
},
```
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog-backend': patch
---
Allow singleton and flexibly nested EntityFilters
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog-react': patch
---
export `loadIdentityOwnerRefs` and `loadCatalogOwnerRefs` all the way
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/core-app-api': patch
---
I have added default icons for the catalog, scaffolder, techdocs, and search.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/core-components': patch
---
Add Theme Overrides for Sidebar
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/cli': patch
---
Bumped `@spotify/eslint-config-typescript` from `v10` to `v12`, dropping support for Node.js v12.
-5
View File
@@ -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).
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/techdocs-common': patch
---
Updated to properly join URL segments under any OS for both AWS S3 and GCP
-6
View File
@@ -1,6 +0,0 @@
---
'@backstage/core-app-api': patch
'@backstage/core-plugin-api': patch
---
Improve API documentation for @backstage/core-plugin-api
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-azure-devops': patch
---
Simplified queue time calculation in `BuildTable`.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-scaffolder-backend': patch
---
Fix a bug where only file mode 775 is considered an executable
-7
View File
@@ -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
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/core-plugin-api': patch
---
Deprecate unused ApiRef types
@@ -7,8 +7,42 @@ on:
jobs:
sync:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
# Beginning of yarn setup, keep in sync between all workflows, see ci.yml
- name: use node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/ # Needed for auth
- name: cache all node_modules
id: cache-modules
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-v${{ matrix.node-version }}-node_modules-${{ hashFiles('yarn.lock', '**/package.json') }}
- name: find location of global yarn cache
id: yarn-cache
if: steps.cache-modules.outputs.cache-hit != 'true'
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: cache global yarn cache
uses: actions/cache@v2
if: steps.cache-modules.outputs.cache-hit != 'true'
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: yarn install
run: yarn install --frozen-lockfile
# End of yarn setup
- name: Create Snyk report
uses: snyk/actions/node@master
continue-on-error: true # Snyk CLI exits with error when vulnerabilities are found
@@ -23,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 }}
+19
View File
@@ -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,
+2 -1
View File
@@ -512,7 +512,8 @@ Usage: backstage-cli config:check [options]
Options:
--package &lt;name&gt; Only load config schema that applies to the given package
--lax Do not require environment variables to be set
--lax Do not require environment variables to be set
--frontend Only validate the frontend configuration
--config &lt;path&gt; Config files to load instead of app-config.yaml (default: [])
-h, --help display help for command
```
+2
View File
@@ -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,
}),
+1
View File
@@ -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),
+1
View File
@@ -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,
+4 -1
View File
@@ -151,7 +151,10 @@
{
"type": "subcategory",
"label": "GitLab",
"ids": ["integrations/gitlab/locations"]
"ids": [
"integrations/gitlab/locations",
"integrations/gitlab/discovery"
]
},
{
"type": "subcategory",
+1
View File
@@ -100,6 +100,7 @@ nav:
- Org Data: 'integrations/github/org.md'
- GitLab:
- Locations: 'integrations/gitlab/locations.md'
- Discovery: 'integrations/gitlab/discovery.md'
- Google GCS:
- Locations: 'integrations/google-cloud-storage/locations.md'
- LDAP:
+2 -2
View File
@@ -26,7 +26,7 @@ import {
SidebarSpace,
} from '@backstage/core-components';
import { GraphiQLIcon } from '@backstage/plugin-graphiql';
import { SidebarSearch } from '@backstage/plugin-search';
import { SidebarSearchModal } from '@backstage/plugin-search';
import { Shortcuts } from '@backstage/plugin-shortcuts';
import {
Settings as SidebarSettings,
@@ -86,7 +86,7 @@ export const Root = ({ children }: PropsWithChildren<{}>) => (
<Sidebar>
<SidebarLogo />
<SidebarGroup label="Search" icon={<SearchIcon />} to="/search">
<SidebarSearch />
<SidebarSearchModal />
</SidebarGroup>
<SidebarDivider />
<SidebarGroup priority={0} label="Menu" icon={<MenuIcon />}>
+9
View File
@@ -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
+4 -4
View File
@@ -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",
+15
View File
@@ -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
+11 -11
View File
@@ -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"
+6
View File
@@ -1,5 +1,11 @@
# @backstage/catalog-client
## 0.5.1
### Patch Changes
- 39e92897e4: Improved API documentation for catalog-client.
## 0.5.0
### Minor Changes
+2 -2
View File
@@ -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"
},
+13
View File
@@ -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
+9 -9
View File
@@ -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",
@@ -25,6 +25,7 @@ export default async (cmd: Command) => {
args: cmd.config,
fromPackage: cmd.package,
mockEnv: cmd.lax,
fullVisibility: !cmd.frontend,
});
const visibility = getVisibilityOption(cmd);
const data = serializeConfigData(appConfigs, schema, visibility);
@@ -22,5 +22,6 @@ export default async (cmd: Command) => {
args: cmd.config,
fromPackage: cmd.package,
mockEnv: cmd.lax,
fullVisibility: !cmd.frontend,
});
};
+1
View File
@@ -172,6 +172,7 @@ export function registerCommands(program: CommanderStatic) {
'Only load config schema that applies to the given package',
)
.option('--lax', 'Do not require environment variables to be set')
.option('--frontend', 'Only validate the frontend configuration')
.option(...configOption)
.description(
'Validate that the given configuration loads and matches schema',
+4 -1
View File
@@ -28,6 +28,7 @@ type Options = {
fromPackage?: string;
mockEnv?: boolean;
withFilteredKeys?: boolean;
fullVisibility?: boolean;
};
export async function loadCliConfig(options: Options) {
@@ -70,7 +71,9 @@ export async function loadCliConfig(options: Options) {
try {
const frontendAppConfigs = schema.process(appConfigs, {
visibility: ['frontend'],
visibility: options.fullVisibility
? ['frontend', 'backend', 'secret']
: ['frontend'],
withFilteredKeys: options.withFilteredKeys,
});
const frontendConfig = ConfigReader.fromConfigs(frontendAppConfigs);
+9
View File
@@ -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 -1
View File
@@ -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",
+7
View File
@@ -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 -1
View File
@@ -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",
+11
View File
@@ -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
+6 -6
View File
@@ -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" />;
+34
View File
@@ -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
+32 -12
View File
@@ -7,6 +7,7 @@
import { ApiRef } from '@backstage/core-plugin-api';
import { BackstageIdentityApi } from '@backstage/core-plugin-api';
import { BackstagePalette } from '@backstage/theme';
import { BackstageTheme } from '@backstage/theme';
import { BottomNavigationActionProps } from '@material-ui/core/BottomNavigationAction';
import { ButtonProps as ButtonProps_2 } from '@material-ui/core/Button';
@@ -101,7 +102,7 @@ export type BottomLinkProps = {
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
export function Breadcrumbs(props: Props_21): JSX.Element;
export function Breadcrumbs(props: Props_20): JSX.Element;
// @public (undocumented)
export type BreadcrumbsClickableTextClassKey = 'root';
@@ -158,7 +159,7 @@ export interface CodeSnippetProps {
// Warning: (ae-missing-release-tag) "Content" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function Content(props: PropsWithChildren<Props_14>): JSX.Element;
export function Content(props: PropsWithChildren<Props_13>): JSX.Element;
// Warning: (ae-forgotten-export) The symbol "ContentHeaderProps" needs to be exported by the entry point index.d.ts
//
@@ -369,10 +370,8 @@ export function FeatureCalloutCircular(
// @public (undocumented)
export type FiltersContainerClassKey = 'root' | 'title';
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
export function Gauge(props: Props_11): JSX.Element;
export function Gauge(props: GaugeProps): JSX.Element;
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
//
@@ -385,6 +384,27 @@ export type GaugeCardClassKey = 'root';
// @public (undocumented)
export type GaugeClassKey = 'root' | 'overlay' | 'circle' | 'colorUnknown';
// @public (undocumented)
export type GaugeProps = {
value: number;
fractional?: boolean;
inverse?: boolean;
unit?: string;
max?: number;
getColor?: GaugePropsGetColor;
};
// @public (undocumented)
export type GaugePropsGetColor = (args: GaugePropsGetColorOptions) => string;
// @public (undocumented)
export type GaugePropsGetColorOptions = {
palette: BackstagePalette;
value: number;
inverse?: boolean;
max?: number;
};
// @public (undocumented)
export function GitHubIcon(props: IconComponentProps): JSX.Element;
@@ -394,7 +414,7 @@ export function GroupIcon(props: IconComponentProps): JSX.Element;
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
export function Header(props: PropsWithChildren<Props_15>): JSX.Element;
export function Header(props: PropsWithChildren<Props_14>): JSX.Element;
// @public (undocumented)
export type HeaderClassKey =
@@ -485,7 +505,7 @@ export type IconLinkVerticalProps = {
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
export function InfoCard(props: Props_16): JSX.Element;
export function InfoCard(props: Props_15): JSX.Element;
// @public (undocumented)
export type InfoCardClassKey =
@@ -566,7 +586,7 @@ export type LifecycleClassKey = 'alpha' | 'beta';
// Warning: (ae-missing-release-tag) "LinearGauge" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function LinearGauge(props: Props_12): JSX.Element | null;
export function LinearGauge(props: Props_11): JSX.Element | null;
// Warning: (ae-missing-release-tag) "LinkType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
@@ -674,7 +694,7 @@ export type OverflowTooltipClassKey = 'container';
// Warning: (ae-missing-release-tag) "Page" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function Page(props: PropsWithChildren<Props_17>): JSX.Element;
export function Page(props: PropsWithChildren<Props_16>): JSX.Element;
// Warning: (ae-missing-release-tag) "PageClassKey" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
@@ -1986,7 +2006,7 @@ export const SidebarSpacer: React_2.ComponentType<
// Warning: (ae-missing-release-tag) "SignInPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function SignInPage(props: Props_19): JSX.Element;
export function SignInPage(props: Props_18): JSX.Element;
// Warning: (ae-missing-release-tag) "SignInPageClassKey" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
@@ -2075,7 +2095,7 @@ export function StatusWarning(props: PropsWithChildren<{}>): JSX.Element;
// Warning: (ae-missing-release-tag) "StructuredMetadataTable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function StructuredMetadataTable(props: Props_13): JSX.Element;
export function StructuredMetadataTable(props: Props_12): JSX.Element;
// Warning: (ae-missing-release-tag) "StructuredMetadataTableListClassKey" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
@@ -2157,7 +2177,7 @@ export type TabBarClassKey = 'indicator' | 'flexContainer' | 'root';
// Warning: (ae-missing-release-tag) "TabbedCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function TabbedCard(props: PropsWithChildren<Props_20>): JSX.Element;
export function TabbedCard(props: PropsWithChildren<Props_19>): JSX.Element;
// Warning: (ae-missing-release-tag) "TabbedCardClassKey" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
+6 -6
View File
@@ -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",
@@ -53,3 +53,9 @@ export const AbsoluteProgress = () => (
<Gauge value={89.2} fractional={false} unit="m/s" />
</div>
);
export const StaticColor = () => (
<div style={containerStyle}>
<Gauge getColor={() => '#f0f'} value={0.5} />
</div>
);
@@ -56,16 +56,26 @@ describe('<Gauge />', () => {
};
it('colors the progress correctly', () => {
expect(getProgressColor(palette, 'Not a Number' as any)).toBe('#ddd');
expect(getProgressColor(palette, 10)).toBe(error);
expect(getProgressColor(palette, 50)).toBe(warning);
expect(getProgressColor(palette, 90)).toBe(ok);
expect(getProgressColor({ palette, value: 'Not a Number' as any })).toBe(
'#ddd',
);
expect(getProgressColor({ palette, value: 10 })).toBe(error);
expect(getProgressColor({ palette, value: 50 })).toBe(warning);
expect(getProgressColor({ palette, value: 90 })).toBe(ok);
});
it('colors the inverse progress correctly', () => {
expect(getProgressColor(palette, 'Not a Number' as any)).toBe('#ddd');
expect(getProgressColor(palette, 10, true)).toBe(ok);
expect(getProgressColor(palette, 50, true)).toBe(warning);
expect(getProgressColor(palette, 90, true)).toBe(error);
expect(
getProgressColor({
palette,
value: 'Not a Number' as any,
inverse: true,
}),
).toBe('#ddd');
expect(getProgressColor({ palette, value: 10, inverse: true })).toBe(ok);
expect(getProgressColor({ palette, value: 50, inverse: true })).toBe(
warning,
);
expect(getProgressColor({ palette, value: 90, inverse: true })).toBe(error);
});
});
@@ -15,7 +15,7 @@
*/
import { makeStyles, useTheme } from '@material-ui/core/styles';
import { BackstageTheme } from '@backstage/theme';
import { BackstagePalette, BackstageTheme } from '@backstage/theme';
import { Circle } from 'rc-progress';
import React from 'react';
@@ -46,32 +46,45 @@ const useStyles = makeStyles<BackstageTheme>(
{ name: 'BackstageGauge' },
);
type Props = {
/** @public */
export type GaugeProps = {
value: number;
fractional?: boolean;
inverse?: boolean;
unit?: string;
max?: number;
getColor?: GaugePropsGetColor;
};
const defaultProps = {
/** @public */
export type GaugePropsGetColorOptions = {
palette: BackstagePalette;
value: number;
inverse?: boolean;
max?: number;
};
/** @public */
export type GaugePropsGetColor = (args: GaugePropsGetColorOptions) => string;
const defaultGaugeProps = {
fractional: true,
inverse: false,
unit: '%',
max: 100,
};
export function getProgressColor(
palette: BackstageTheme['palette'],
value: number,
inverse?: boolean,
max?: number,
) {
export const getProgressColor: GaugePropsGetColor = ({
palette,
value,
inverse,
max,
}) => {
if (isNaN(value)) {
return '#ddd';
}
const actualMax = max ? max : defaultProps.max;
const actualMax = max ? max : defaultGaugeProps.max;
const actualValue = inverse ? actualMax - value : value;
if (actualValue < actualMax / 3) {
@@ -81,14 +94,15 @@ export function getProgressColor(
}
return palette.status.ok;
}
};
/** @public */
export function Gauge(props: Props) {
export function Gauge(props: GaugeProps) {
const { getColor = getProgressColor } = props;
const classes = useStyles(props);
const theme = useTheme<BackstageTheme>();
const { palette } = useTheme<BackstageTheme>();
const { value, fractional, inverse, unit, max } = {
...defaultProps,
...defaultGaugeProps,
...props,
};
@@ -102,7 +116,7 @@ export function Gauge(props: Props) {
percent={asPercentage}
strokeWidth={12}
trailWidth={12}
strokeColor={getProgressColor(theme.palette, asActual, inverse, max)}
strokeColor={getColor({ palette, value: asActual, inverse, max })}
className={classes.circle}
/>
<div className={classes.overlay}>
@@ -97,3 +97,24 @@ export const LinkInFooter = () => (
</Grid>
</Wrapper>
);
export const StaticColor = () => (
<Wrapper>
<Grid item>
<GaugeCard getColor={() => '#f00'} title="Red" progress={0.5} />
</Grid>
<Grid item>
<GaugeCard getColor={() => '#0f0'} title="Green" progress={0.5} />
</Grid>
<Grid item>
<GaugeCard getColor={() => '#00f'} title="Blue" progress={0.5} />
</Grid>
<Grid item>
<GaugeCard
getColor={({ palette }) => palette.status.error}
title="palette.status.error"
progress={0.5}
/>
</Grid>
</Wrapper>
);
@@ -18,7 +18,7 @@ import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import { InfoCard, InfoCardVariants } from '../../layout/InfoCard';
import { BottomLinkProps } from '../../layout/BottomLink';
import { Gauge } from './Gauge';
import { Gauge, GaugePropsGetColor } from './Gauge';
type Props = {
title: string;
@@ -28,6 +28,7 @@ type Props = {
progress: number;
inverse?: boolean;
deepLink?: BottomLinkProps;
getColor?: GaugePropsGetColor;
};
/** @public */
@@ -46,7 +47,14 @@ const useStyles = makeStyles(
/** @public */
export function GaugeCard(props: Props) {
const classes = useStyles(props);
const { title, subheader, progress, inverse, deepLink, variant } = props;
const { title, subheader, progress, inverse, deepLink, variant, getColor } =
props;
const gaugeProps = {
inverse,
getColor,
value: progress,
};
return (
<div className={classes.root}>
@@ -56,7 +64,7 @@ export function GaugeCard(props: Props) {
deepLink={deepLink}
variant={variant}
>
<Gauge value={progress} inverse={inverse} />
<Gauge {...gaugeProps} />
</InfoCard>
</div>
);
@@ -41,3 +41,9 @@ export const LowProgress = () => (
<LinearGauge value={0.2} />
</div>
);
export const StaticColor = () => (
<div style={containerStyle}>
<LinearGauge getColor={() => '#f0f'} value={0.5} />
</div>
);
@@ -20,18 +20,19 @@ import Tooltip from '@material-ui/core/Tooltip';
// @ts-ignore
import { Line } from 'rc-progress';
import { BackstageTheme } from '@backstage/theme';
import { getProgressColor } from './Gauge';
import { getProgressColor, GaugePropsGetColor } from './Gauge';
type Props = {
/**
* Progress value between 0.0 - 1.0.
*/
value: number;
getColor?: GaugePropsGetColor;
};
export function LinearGauge(props: Props) {
const { value } = props;
const theme = useTheme<BackstageTheme>();
const { value, getColor = getProgressColor } = props;
const { palette } = useTheme<BackstageTheme>();
if (isNaN(value)) {
return null;
}
@@ -39,7 +40,12 @@ export function LinearGauge(props: Props) {
if (percent > 100) {
percent = 100;
}
const strokeColor = getProgressColor(theme.palette, percent, false, 100);
const strokeColor = getColor({
palette,
value: percent,
inverse: false,
max: 100,
});
return (
<Tooltip title={`${percent}%`}>
<span>
@@ -17,5 +17,10 @@
export { GaugeCard } from './GaugeCard';
export type { GaugeCardClassKey } from './GaugeCard';
export { Gauge } from './Gauge';
export type {
GaugeProps,
GaugePropsGetColor,
GaugePropsGetColorOptions,
} from './Gauge';
export type { GaugeClassKey } from './Gauge';
export { LinearGauge } from './LinearGauge';
+10
View File
@@ -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
+5 -5
View File
@@ -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",
@@ -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 }),
}}
>
+51
View File
@@ -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 -1
View File
@@ -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"
@@ -23,13 +23,10 @@ import {
SidebarItem,
SidebarPage,
SidebarScrollWrapper,
SidebarSpace,
SidebarSpace
} from '@backstage/core-components';
import { SidebarSearch } from '@backstage/plugin-search';
import {
Settings as SidebarSettings,
UserSettingsSignInAvatar,
} from '@backstage/plugin-user-settings';
import { SidebarSearchModal } from '@backstage/plugin-search';
import { Settings as SidebarSettings, UserSettingsSignInAvatar } from '@backstage/plugin-user-settings';
import { Link, makeStyles } from '@material-ui/core';
import CreateComponentIcon from '@material-ui/icons/AddCircleOutline';
import ExtensionIcon from '@material-ui/icons/Extension';
@@ -81,7 +78,7 @@ export const Root = ({ children }: PropsWithChildren<{}>) => (
<Sidebar>
<SidebarLogo />
<SidebarGroup label="Search" icon={<SearchIcon />} to="/search">
<SidebarSearch />
<SidebarSearchModal />
</SidebarGroup>
<SidebarDivider />
<SidebarGroup priority={0} label="Menu" icon={<MenuIcon />}>
+21
View File
@@ -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
+3 -3
View File
@@ -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",
+10
View File
@@ -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
+5 -5
View File
@@ -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"
},
+8
View File
@@ -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
+2 -2
View File
@@ -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"
+6 -6
View File
@@ -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",
+6 -6
View File
@@ -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",
+13
View File
@@ -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
+33 -11
View File
@@ -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;
```
+8 -8
View File
@@ -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",
@@ -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>
);
};
@@ -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>
);
};

Some files were not shown because too many files have changed in this diff Show More