Merge remote-tracking branch 'origin/master' into orkohunter/techdocs-publish-to-cloud-storage
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-jenkins': patch
|
||||
---
|
||||
|
||||
Avoid loading data from Jenkins twice. Don't load data when navigating through the pages as all data from all pages is already loaded.
|
||||
@@ -1,23 +0,0 @@
|
||||
---
|
||||
'@backstage/core-api': patch
|
||||
'@backstage/dev-utils': patch
|
||||
---
|
||||
|
||||
Update ApiFactory type to correctly infer API type and disallow mismatched implementations.
|
||||
|
||||
This fixes for example the following code:
|
||||
|
||||
```ts
|
||||
interface MyApi {
|
||||
myMethod(): void
|
||||
}
|
||||
|
||||
const myApiRef = createApiRef<MyApi>({...});
|
||||
|
||||
createApiFactory({
|
||||
api: myApiRef,
|
||||
deps: {},
|
||||
// This should've caused an error, since the empty object does not fully implement MyApi
|
||||
factory: () => ({}),
|
||||
})
|
||||
```
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend': patch
|
||||
---
|
||||
|
||||
Add support for Github Enterprise in GitHubOrgReaderProcessor so you can properly ingest users of a GHE organization.
|
||||
@@ -1,65 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-sentry': minor
|
||||
'@backstage/plugin-sentry-backend': minor
|
||||
---
|
||||
|
||||
The plugin uses the `proxy-backend` instead of a custom `sentry-backend`.
|
||||
It requires a proxy configuration:
|
||||
|
||||
`app-config.yaml`:
|
||||
|
||||
```yaml
|
||||
proxy:
|
||||
'/sentry/api':
|
||||
target: https://sentry.io/api/
|
||||
allowedMethods: ['GET']
|
||||
headers:
|
||||
Authorization:
|
||||
$env: SENTRY_TOKEN # export SENTRY_TOKEN="Bearer <your-sentry-token>"
|
||||
```
|
||||
|
||||
The `MockApiBackend` is no longer configured by the `NODE_ENV` variable.
|
||||
Instead, the mock backend can be used with an api-override:
|
||||
|
||||
`packages/app/src/apis.ts`:
|
||||
|
||||
```ts
|
||||
import { createApiFactory } from '@backstage/core';
|
||||
import { MockSentryApi, sentryApiRef } from '@backstage/plugin-sentry';
|
||||
|
||||
export const apis = [
|
||||
// ...
|
||||
|
||||
createApiFactory(sentryApiRef, new MockSentryApi()),
|
||||
];
|
||||
```
|
||||
|
||||
If you already use the Sentry backend, you must remove it from the backend:
|
||||
|
||||
Delete `packages/backend/src/plugins/sentry.ts`.
|
||||
|
||||
```diff
|
||||
# packages/backend/package.json
|
||||
|
||||
...
|
||||
"@backstage/plugin-scaffolder-backend": "^0.3.2",
|
||||
- "@backstage/plugin-sentry-backend": "^0.1.3",
|
||||
"@backstage/plugin-techdocs-backend": "^0.3.0",
|
||||
...
|
||||
```
|
||||
|
||||
```diff
|
||||
// packages/backend/src/index.html
|
||||
|
||||
const apiRouter = Router();
|
||||
apiRouter.use('/catalog', await catalog(catalogEnv));
|
||||
apiRouter.use('/rollbar', await rollbar(rollbarEnv));
|
||||
apiRouter.use('/scaffolder', await scaffolder(scaffolderEnv));
|
||||
- apiRouter.use('/sentry', await sentry(sentryEnv));
|
||||
apiRouter.use('/auth', await auth(authEnv));
|
||||
apiRouter.use('/techdocs', await techdocs(techdocsEnv));
|
||||
apiRouter.use('/kubernetes', await kubernetes(kubernetesEnv));
|
||||
apiRouter.use('/proxy', await proxy(proxyEnv));
|
||||
apiRouter.use('/graphql', await graphql(graphqlEnv));
|
||||
apiRouter.use(notFoundHandler());
|
||||
```
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-cost-insights': minor
|
||||
---
|
||||
|
||||
Add support for multiple types of entity cost breakdown.
|
||||
|
||||
This change is backwards-incompatible with plugin-cost-insights 0.3.x; the `entities` field on Entity returned in product cost queries changed from `Entity[]` to `Record<string, Entity[]`.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-cost-insights': minor
|
||||
---
|
||||
|
||||
Remove calendar MoM period option and fix quarter end date logic
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Update experimental backend bundle command to only output archives to `dist/` instead of a full workspace mirror in `dist-workspace/`.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Fixes a big in the bundling logic that caused `node_modules` inside local monorepo packages to be transformed.
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-circleci': patch
|
||||
'@backstage/plugin-jenkins': patch
|
||||
---
|
||||
|
||||
Refactor to support ADR004 module exporting.
|
||||
|
||||
For more information, see https://backstage.io/docs/architecture-decisions/adrs-adr004.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend': patch
|
||||
---
|
||||
|
||||
refreshAllLocations uses a child logger of the HigherOrderOperation with a meta `component` : `catalog-all-locations-refresh`
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend': patch
|
||||
---
|
||||
|
||||
Batch the fetching of relations
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-cost-insights': patch
|
||||
---
|
||||
|
||||
fix react-hooks/exhaustive-deps error
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-catalog': patch
|
||||
'@backstage/plugin-pagerduty': patch
|
||||
---
|
||||
|
||||
Added pagerduty plugin to example app
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-import': patch
|
||||
---
|
||||
|
||||
Align plugin ID and fix variable typo
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-import': patch
|
||||
---
|
||||
|
||||
Add register existing component instructions
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/catalog-model': patch
|
||||
---
|
||||
|
||||
Ignore relations when comparing entities. This stops the refresh loop from rewriting entities over and over.
|
||||
@@ -1,13 +0,0 @@
|
||||
---
|
||||
'@backstage/create-app': patch
|
||||
---
|
||||
|
||||
Add `"files": ["dist"]` to both app and backend packages. This ensures that packaged versions of these packages do not contain unnecessary files.
|
||||
|
||||
To apply this change to an existing app, add the following to `packages/app/package.json` and `packages/backend/package.json`:
|
||||
|
||||
```json
|
||||
"files": [
|
||||
"dist"
|
||||
]
|
||||
```
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
'@backstage/backend-common': patch
|
||||
'@backstage/integration': patch
|
||||
---
|
||||
|
||||
Move the core url and auth logic to integration for the four major providers
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/integration': patch
|
||||
---
|
||||
|
||||
Add the basics of cross-integration concerns
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Fix config schema for `.app.listen`
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-search': patch
|
||||
---
|
||||
|
||||
change default size for pageSize in search result view
|
||||
@@ -1,11 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-jenkins': patch
|
||||
---
|
||||
|
||||
Improve loading speed of the CI/CD page.
|
||||
Only request the necessary fields from Jenkins to keep the request size low.
|
||||
In addition everything is loaded in a single request, instead of requesting
|
||||
each job and build individually. As this (and also the previous behavior) can
|
||||
lead to a big amount of data, this limits the amount of jobs to 50.
|
||||
For each job, only the latest build is loaded. Loading the full build history
|
||||
of a job can lead to excessive load on the Jenkins instance.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/core': patch
|
||||
---
|
||||
|
||||
Fix React warning of descendant paragraph tag
|
||||
@@ -1,83 +0,0 @@
|
||||
---
|
||||
'@backstage/backend-common': minor
|
||||
---
|
||||
|
||||
Removes the Prometheus integration from `backend-common`.
|
||||
|
||||
Rational behind this change is to keep the metrics integration of Backstage
|
||||
generic. Instead of directly relying on Prometheus, Backstage will expose
|
||||
metrics in a generic way. Integrators can then export the metrics in their
|
||||
desired format. For example using Prometheus.
|
||||
|
||||
To keep the existing behavior, you need to integrate Prometheus in your
|
||||
backend:
|
||||
|
||||
First, add a dependency on `express-prom-bundle` and `prom-client` to your backend.
|
||||
|
||||
```diff
|
||||
// packages/backend/package.json
|
||||
"dependencies": {
|
||||
+ "express-prom-bundle": "^6.1.0",
|
||||
+ "prom-client": "^12.0.0",
|
||||
```
|
||||
|
||||
Then, add a handler for metrics and a simple instrumentation for the endpoints.
|
||||
|
||||
```typescript
|
||||
// packages/backend/src/metrics.ts
|
||||
import { useHotCleanup } from '@backstage/backend-common';
|
||||
import { RequestHandler } from 'express';
|
||||
import promBundle from 'express-prom-bundle';
|
||||
import prom from 'prom-client';
|
||||
import * as url from 'url';
|
||||
|
||||
const rootRegEx = new RegExp('^/([^/]*)/.*');
|
||||
const apiRegEx = new RegExp('^/api/([^/]*)/.*');
|
||||
|
||||
export function normalizePath(req: any): string {
|
||||
const path = url.parse(req.originalUrl || req.url).pathname || '/';
|
||||
|
||||
// Capture /api/ and the plugin name
|
||||
if (apiRegEx.test(path)) {
|
||||
return path.replace(apiRegEx, '/api/$1');
|
||||
}
|
||||
|
||||
// Only the first path segment at root level
|
||||
return path.replace(rootRegEx, '/$1');
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a /metrics endpoint, register default runtime metrics and instrument the router.
|
||||
*/
|
||||
export function metricsHandler(): RequestHandler {
|
||||
// We can only initialize the metrics once and have to clean them up between hot reloads
|
||||
useHotCleanup(module, () => prom.register.clear());
|
||||
|
||||
return promBundle({
|
||||
includeMethod: true,
|
||||
includePath: true,
|
||||
// Using includePath alone is problematic, as it will include path labels with high
|
||||
// cardinality (e.g. path params). Instead we would have to template them. However, this
|
||||
// is difficult, as every backend plugin might use different routes. Instead we only take
|
||||
// the first directory of the path, to have at least an idea how each plugin performs:
|
||||
normalizePath,
|
||||
promClient: { collectDefaultMetrics: {} },
|
||||
});
|
||||
}
|
||||
```
|
||||
|
||||
Last, extend your router configuration with the `metricsHandler`:
|
||||
|
||||
```diff
|
||||
+import { metricsHandler } from './metrics';
|
||||
|
||||
...
|
||||
|
||||
const service = createServiceBuilder(module)
|
||||
.loadConfig(config)
|
||||
.addRouter('', await healthcheck(healthcheckEnv))
|
||||
+ .addRouter('', metricsHandler())
|
||||
.addRouter('/api', apiRouter);
|
||||
```
|
||||
|
||||
Your Prometheus metrics will be available at the `/metrics` endpoint.
|
||||
@@ -1,9 +0,0 @@
|
||||
---
|
||||
'@backstage/core-api': patch
|
||||
---
|
||||
|
||||
Deprecated the `ConcreteRoute`, `MutableRouteRef`, `AbsoluteRouteRef` types and added a new `RouteRef` type as replacement.
|
||||
|
||||
Deprecated and disabled the `createSubRoute` method of `AbsoluteRouteRef`.
|
||||
|
||||
Add an as of yet unused `params` option to `createRouteRef`.
|
||||
@@ -1,13 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-api-docs': minor
|
||||
---
|
||||
|
||||
Stop exposing a custom router from the `api-docs` plugin. Instead, use the
|
||||
widgets exported by the plugin to compose your custom entity pages.
|
||||
|
||||
Instead of displaying the API definitions directly in the API tab of the
|
||||
component, it now contains tables linking to the API entities. This also adds
|
||||
new widgets to display relationships (bot provides & consumes relationships)
|
||||
between components and APIs.
|
||||
|
||||
See the changelog of `create-app` for a migration guide.
|
||||
@@ -1,136 +0,0 @@
|
||||
---
|
||||
'@backstage/create-app': patch
|
||||
---
|
||||
|
||||
Adjust template to the latest changes in the `api-docs` plugin.
|
||||
|
||||
## Template Changes
|
||||
|
||||
While updating to the latest `api-docs` plugin, the following changes are
|
||||
necessary for the `create-app` template in your
|
||||
`app/src/components/catalog/EntityPage.tsx`. This adds:
|
||||
|
||||
- A custom entity page for API entities
|
||||
- Changes the API tab to include the new `ConsumedApisCard` and
|
||||
`ProvidedApisCard` that link to the API entity.
|
||||
|
||||
```diff
|
||||
import {
|
||||
+ ApiDefinitionCard,
|
||||
- Router as ApiDocsRouter,
|
||||
+ ConsumedApisCard,
|
||||
+ ProvidedApisCard,
|
||||
+ ConsumedApisCard,
|
||||
+ ConsumingComponentsCard,
|
||||
+ ProvidedApisCard,
|
||||
+ ProvidingComponentsCard
|
||||
} from '@backstage/plugin-api-docs';
|
||||
|
||||
...
|
||||
|
||||
+const ComponentApisContent = ({ entity }: { entity: Entity }) => (
|
||||
+ <Grid container spacing={3} alignItems="stretch">
|
||||
+ <Grid item md={6}>
|
||||
+ <ProvidedApisCard entity={entity} />
|
||||
+ </Grid>
|
||||
+ <Grid item md={6}>
|
||||
+ <ConsumedApisCard entity={entity} />
|
||||
+ </Grid>
|
||||
+ </Grid>
|
||||
+);
|
||||
|
||||
const ServiceEntityPage = ({ entity }: { entity: Entity }) => (
|
||||
<EntityPageLayout>
|
||||
<EntityPageLayout.Content
|
||||
path="/"
|
||||
title="Overview"
|
||||
element={<OverviewContent entity={entity} />}
|
||||
/>
|
||||
<EntityPageLayout.Content
|
||||
path="/ci-cd/*"
|
||||
title="CI/CD"
|
||||
element={<CICDSwitcher entity={entity} />}
|
||||
/>
|
||||
<EntityPageLayout.Content
|
||||
path="/api/*"
|
||||
title="API"
|
||||
- element={<ApiDocsRouter entity={entity} />}
|
||||
+ element={<ComponentApisContent entity={entity} />}
|
||||
/>
|
||||
...
|
||||
|
||||
-export const EntityPage = () => {
|
||||
- const { entity } = useEntity();
|
||||
- switch (entity?.spec?.type) {
|
||||
- case 'service':
|
||||
- return <ServiceEntityPage entity={entity} />;
|
||||
- case 'website':
|
||||
- return <WebsiteEntityPage entity={entity} />;
|
||||
- default:
|
||||
- return <DefaultEntityPage entity={entity} />;
|
||||
- }
|
||||
-};
|
||||
|
||||
+export const ComponentEntityPage = ({ entity }: { entity: Entity }) => {
|
||||
+ switch (entity?.spec?.type) {
|
||||
+ case 'service':
|
||||
+ return <ServiceEntityPage entity={entity} />;
|
||||
+ case 'website':
|
||||
+ return <WebsiteEntityPage entity={entity} />;
|
||||
+ default:
|
||||
+ return <DefaultEntityPage entity={entity} />;
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
+const ApiOverviewContent = ({ entity }: { entity: Entity }) => (
|
||||
+ <Grid container spacing={3}>
|
||||
+ <Grid item md={6}>
|
||||
+ <AboutCard entity={entity} />
|
||||
+ </Grid>
|
||||
+ <Grid container item md={12}>
|
||||
+ <Grid item md={6}>
|
||||
+ <ProvidingComponentsCard entity={entity} />
|
||||
+ </Grid>
|
||||
+ <Grid item md={6}>
|
||||
+ <ConsumingComponentsCard entity={entity} />
|
||||
+ </Grid>
|
||||
+ </Grid>
|
||||
+ </Grid>
|
||||
+);
|
||||
+
|
||||
+const ApiDefinitionContent = ({ entity }: { entity: ApiEntity }) => (
|
||||
+ <Grid container spacing={3}>
|
||||
+ <Grid item xs={12}>
|
||||
+ <ApiDefinitionCard apiEntity={entity} />
|
||||
+ </Grid>
|
||||
+ </Grid>
|
||||
+);
|
||||
+
|
||||
+const ApiEntityPage = ({ entity }: { entity: Entity }) => (
|
||||
+ <EntityPageLayout>
|
||||
+ <EntityPageLayout.Content
|
||||
+ path="/*"
|
||||
+ title="Overview"
|
||||
+ element={<ApiOverviewContent entity={entity} />}
|
||||
+ />
|
||||
+ <EntityPageLayout.Content
|
||||
+ path="/definition/*"
|
||||
+ title="Definition"
|
||||
+ element={<ApiDefinitionContent entity={entity as ApiEntity} />}
|
||||
+ />
|
||||
+ </EntityPageLayout>
|
||||
+);
|
||||
+
|
||||
+export const EntityPage = () => {
|
||||
+ const { entity } = useEntity();
|
||||
+
|
||||
+ switch (entity?.kind?.toLowerCase()) {
|
||||
+ case 'component':
|
||||
+ return <ComponentEntityPage entity={entity} />;
|
||||
+ case 'api':
|
||||
+ return <ApiEntityPage entity={entity} />;
|
||||
+ default:
|
||||
+ return <DefaultEntityPage entity={entity} />;
|
||||
+ }
|
||||
+};
|
||||
```
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
'example-backend': patch
|
||||
'@backstage/plugin-scaffolder-backend': patch
|
||||
'@backstage/plugin-techdocs-backend': patch
|
||||
'@backstage/create-app': patch
|
||||
---
|
||||
|
||||
Unify `dockerode` library and type dependency versions
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
'@backstage/catalog-model': minor
|
||||
'@backstage/plugin-catalog-backend': minor
|
||||
---
|
||||
|
||||
Remove the deprecated fields `ancestors` and `descendants` from the `Group` entity.
|
||||
|
||||
See https://github.com/backstage/backstage/issues/3049 and the PRs linked from it for details.
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs': minor
|
||||
---
|
||||
|
||||
Removed modifyCss transformer and moved the css to injectCss transformer
|
||||
Fixed issue where some internal doc links would cause a reload of the page
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/theme': patch
|
||||
---
|
||||
|
||||
Add a little more padding in dense tables
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/core': patch
|
||||
---
|
||||
|
||||
Export the `defaultConfigLoader` implementation
|
||||
@@ -1,14 +0,0 @@
|
||||
---
|
||||
'@backstage/core': minor
|
||||
---
|
||||
|
||||
Introducing a new optional property within `app-config.yaml` called `auth.environment` to have configurable environment value for `auth.providers`
|
||||
|
||||
**Default Value:** 'development'
|
||||
|
||||
**Optional Values:** 'production' | 'development'
|
||||
|
||||
**Migration-steps:**
|
||||
|
||||
- To override the default value, one could simply introduce the new property `environment` within the `auth` section of the `config.yaml`
|
||||
- re-run the build to reflect the changed configs
|
||||
+1
-1
@@ -137,7 +137,7 @@ catalog:
|
||||
$env: GITHUB_TOKEN
|
||||
#### Example for how to add your GitHub Enterprise instance using the API:
|
||||
# - target: https://ghe.example.net
|
||||
# apiBaseUrl: https://ghe.example.net/api/v3
|
||||
# apiBaseUrl: https://ghe.example.net/api
|
||||
# token:
|
||||
# $env: GHE_TOKEN
|
||||
ldapOrg:
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
ExampleComponent.tsx reference
|
||||
|
||||
```tsx
|
||||
import React, { FC } from 'react';
|
||||
import React from 'react';
|
||||
import { Typography, Grid } from '@material-ui/core';
|
||||
import {
|
||||
InfoCard,
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
import { useApi } from '@backstage/core-api';
|
||||
import ExampleFetchComponent from '../ExampleFetchComponent';
|
||||
|
||||
const ExampleComponent: FC<{}> = () => {
|
||||
const ExampleComponent = () => {
|
||||
const identityApi = useApi(identityApiRef);
|
||||
const userId = identityApi.getUserId();
|
||||
const profile = identityApi.getProfile();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
ExampleFetchComponent.tsx reference
|
||||
|
||||
```tsx
|
||||
import React, { FC } from 'react';
|
||||
import React from 'react';
|
||||
import { useAsync } from 'react-use';
|
||||
import Alert from '@material-ui/lab/Alert';
|
||||
import {
|
||||
@@ -57,7 +57,7 @@ type DenseTableProps = {
|
||||
viewer: Viewer;
|
||||
};
|
||||
|
||||
export const DenseTable: FC<DenseTableProps> = ({ viewer }) => {
|
||||
export const DenseTable = ({ viewer }: DenseTableProps) => {
|
||||
const columns: TableColumn[] = [
|
||||
{ title: 'Name', field: 'name' },
|
||||
{ title: 'Created', field: 'createdAt' },
|
||||
@@ -76,7 +76,7 @@ export const DenseTable: FC<DenseTableProps> = ({ viewer }) => {
|
||||
);
|
||||
};
|
||||
|
||||
const ExampleFetchComponent: FC<{}> = () => {
|
||||
const ExampleFetchComponent = () => {
|
||||
const auth = useApi(githubAuthApiRef);
|
||||
|
||||
const { value, loading, error } = useAsync(async (): Promise<any> => {
|
||||
|
||||
@@ -33,10 +33,10 @@ hook exported by `@backstage/core`, or the `withApis` HOC if you prefer class
|
||||
components. For example, the `ErrorApi` can be accessed like this:
|
||||
|
||||
```tsx
|
||||
import React, { FC } from 'react';
|
||||
import React from 'react';
|
||||
import { useApi, errorApiRef } from '@backstage/core';
|
||||
|
||||
export const MyComponent: FC<{}> = () => {
|
||||
export const MyComponent = () => {
|
||||
const errorApi = useApi(errorApiRef);
|
||||
|
||||
// Signal to the app that something went wrong, and display the error to the user.
|
||||
|
||||
@@ -39,28 +39,28 @@ TL;DR:
|
||||
|
||||
## Packages
|
||||
|
||||
### [`example-app`](https://github.com/backstage/backstage/tree/master/packages/app/)
|
||||
### `example-app` [GitHub](https://github.com/backstage/backstage/tree/master/packages/app/)
|
||||
|
||||
This is the `packages/app` package, and it serves as an example as well as
|
||||
utility for local development in the main Backstage repo.
|
||||
|
||||
Stability: `N/A`
|
||||
|
||||
### [`example-backend`](https://github.com/backstage/backstage/tree/master/packages/backend/)
|
||||
### `example-backend` [GitHub](https://github.com/backstage/backstage/tree/master/packages/backend/)
|
||||
|
||||
This is the `packages/backend` package, and it serves as an example as well as
|
||||
utility for local development in the main Backstage repo.
|
||||
|
||||
Stability: `N/A`
|
||||
|
||||
### [`backend-common`](https://github.com/backstage/backstage/tree/master/packages/backend-common/)
|
||||
### `backend-common` [GitHub](https://github.com/backstage/backstage/tree/master/packages/backend-common/)
|
||||
|
||||
A collection of common helpers to be used by both backend plugins, and for
|
||||
constructing backend packages.
|
||||
|
||||
Stability: `1`
|
||||
|
||||
### [`catalog-client`](https://github.com/backstage/backstage/tree/master/packages/catalog-client/)
|
||||
### `catalog-client` [GitHub](https://github.com/backstage/backstage/tree/master/packages/catalog-client/)
|
||||
|
||||
An HTTP client for interacting with the catalog backend. Usable both in frontend
|
||||
and Backend.
|
||||
@@ -68,7 +68,7 @@ and Backend.
|
||||
Stability: `0`. This is a very new addition and we have some immediate changes
|
||||
planned.
|
||||
|
||||
### [`catalog-model`](https://github.com/backstage/backstage/tree/master/packages/catalog-model/)
|
||||
### `catalog-model` [GitHub](https://github.com/backstage/backstage/tree/master/packages/catalog-model/)
|
||||
|
||||
Contains the core catalog model, and utilities for working with entities. Usable
|
||||
both in frontend and Backend.
|
||||
@@ -77,7 +77,7 @@ Stability: `2`. The catalog model is evolving, but because of the broad usage we
|
||||
|
||||
want to ensure some stability.
|
||||
|
||||
### [`cli`](https://github.com/backstage/backstage/tree/master/packages/cli/)
|
||||
### `cli` [GitHub](https://github.com/backstage/backstage/tree/master/packages/cli/)
|
||||
|
||||
The main toolchain used for Backstage development. The various CLI commands and
|
||||
options passed to those commands, as well as the environment variables read by
|
||||
@@ -87,27 +87,27 @@ unless it is likely to affect external tooling.
|
||||
|
||||
Stability: `2`
|
||||
|
||||
### [`cli-common`](https://github.com/backstage/backstage/tree/master/packages/cli-common/)
|
||||
### `cli-common` [GitHub](https://github.com/backstage/backstage/tree/master/packages/cli-common/)
|
||||
|
||||
Lightweight utilities used by the various Backstage CLIs, not intended for
|
||||
external use.
|
||||
|
||||
Stability: `N/A`
|
||||
|
||||
### [`config`](https://github.com/backstage/backstage/tree/master/packages/config/)
|
||||
### `config` [GitHub](https://github.com/backstage/backstage/tree/master/packages/config/)
|
||||
|
||||
Provides the logic and interfaces for reading static configuration.
|
||||
|
||||
Stability: `2`
|
||||
|
||||
### [`config-loader`](https://github.com/backstage/backstage/tree/master/packages/config-loader/)
|
||||
### `config-loader` [GitHub](https://github.com/backstage/backstage/tree/master/packages/config-loader/)
|
||||
|
||||
Used to load in static configuration, mainly for use by the CLI and
|
||||
@backstage/backend-common.
|
||||
|
||||
Stability: `1`. Mainly intended for internal use.
|
||||
|
||||
### [`core`](https://github.com/backstage/backstage/tree/master/packages/core/)
|
||||
### `core` [GitHub](https://github.com/backstage/backstage/tree/master/packages/core/)
|
||||
|
||||
#### Section: React Components
|
||||
|
||||
@@ -147,51 +147,62 @@ ErrorApi, IdentityApi, the auth APIs, etc.
|
||||
Stability: `1`. Most changes to the core utility APIs will not lead to
|
||||
widespread breaking changes since most apps rely on the default implementations.
|
||||
|
||||
### [`core-api`](https://github.com/backstage/backstage/tree/master/packages/core-api/)
|
||||
### `core-api` [GitHub](https://github.com/backstage/backstage/tree/master/packages/core-api/)
|
||||
|
||||
The non-visual parts of @backstage/core. Everything in this packages is
|
||||
re-exported from @backstage/core, and this package should not be used directly.
|
||||
|
||||
Stability: See @backstage/core
|
||||
|
||||
### [`create-app`](https://github.com/backstage/backstage/tree/master/packages/create-app/)
|
||||
### `create-app` [GitHub](https://github.com/backstage/backstage/tree/master/packages/create-app/)
|
||||
|
||||
The CLI used to scaffold new Backstage projects.
|
||||
|
||||
Stability: `2`
|
||||
|
||||
### [`dev-utils`](https://github.com/backstage/backstage/tree/master/packages/dev-utils/)
|
||||
### `dev-utils` [GitHub](https://github.com/backstage/backstage/tree/master/packages/dev-utils/)
|
||||
|
||||
Provides utilities for developing plugins in isolation.
|
||||
|
||||
Stability: `0`. This package is largely broken and needs updates.
|
||||
|
||||
### [`docgen`](https://github.com/backstage/backstage/tree/master/packages/docgen/)
|
||||
### `docgen` [GitHub](https://github.com/backstage/backstage/tree/master/packages/docgen/)
|
||||
|
||||
Internal CLI utility for generating API Documentation.
|
||||
|
||||
Stability: `N/A`
|
||||
|
||||
### [`e2e-test`](https://github.com/backstage/backstage/tree/master/packages/e2e-test/)
|
||||
### `e2e-test` [GitHub](https://github.com/backstage/backstage/tree/master/packages/e2e-test/)
|
||||
|
||||
Internal CLI utility for running e2e tests.
|
||||
|
||||
Stability: `N/A`
|
||||
|
||||
### [`storybook`](https://github.com/backstage/backstage/tree/master/packages/storybook/)
|
||||
### `integration` [GitHub](https://github.com/backstage/backstage/tree/master/packages/integration/)
|
||||
|
||||
Provides shared utilities for managing integrations towards different types of
|
||||
third party systems. This package is currently internal and its functionality
|
||||
will likely be exposed via separate APIs in the future.
|
||||
|
||||
Some of the functionality in this package is not available elsewhere yes, so if
|
||||
it's necessary it can be used, but there will be breaking changes.
|
||||
|
||||
Stability: `0`
|
||||
|
||||
### `storybook` [GitHub](https://github.com/backstage/backstage/tree/master/packages/storybook/)
|
||||
|
||||
Internal storybook build for publishing stories to
|
||||
https://backstage.io/storybook
|
||||
|
||||
Stability: `N/A`
|
||||
|
||||
### [`test-utils`](https://github.com/backstage/backstage/tree/master/packages/test-utils/)
|
||||
### `test-utils` [GitHub](https://github.com/backstage/backstage/tree/master/packages/test-utils/)
|
||||
|
||||
Utilities for writing tests for Backstage plugins and apps.
|
||||
|
||||
Stability: `2`
|
||||
|
||||
### [`test-utils-core`](https://github.com/backstage/backstage/tree/master/packages/test-utils-core/)
|
||||
### `test-utils-core` [GitHub](https://github.com/backstage/backstage/tree/master/packages/test-utils-core/)
|
||||
|
||||
Internal testing utilities that are separated out for usage in
|
||||
@backstage/core-api. All exports are re-exported by @backstage/test-utils. This
|
||||
@@ -199,7 +210,7 @@ package should not be depended on directly.
|
||||
|
||||
Stability: See @backstage/test-utils
|
||||
|
||||
### [`theme`](https://github.com/backstage/backstage/tree/master/packages/theme/)
|
||||
### `theme` [GitHub](https://github.com/backstage/backstage/tree/master/packages/theme/)
|
||||
|
||||
The core Backstage MUI theme along with customization utilities.
|
||||
|
||||
@@ -229,21 +240,21 @@ Any plugin that is not listed below is untracked and can generally be considered
|
||||
unstable with a score of `0`. Open a Pull Request if you want your plugin to be
|
||||
added!
|
||||
|
||||
### [`api-docs`](https://github.com/backstage/backstage/tree/master/plugins/api-docs/)
|
||||
### `api-docs` [GitHub](https://github.com/backstage/backstage/tree/master/plugins/api-docs/)
|
||||
|
||||
Components to discover and display API entities as an extension to the catalog
|
||||
plugin.
|
||||
|
||||
Stability: `0`
|
||||
|
||||
### [`app-backend`](https://github.com/backstage/backstage/tree/master/plugins/app-backend/)
|
||||
### `app-backend` [GitHub](https://github.com/backstage/backstage/tree/master/plugins/app-backend/)
|
||||
|
||||
A backend plugin that can be used to serve the frontend app and inject
|
||||
configuration.
|
||||
|
||||
Stability: `2`
|
||||
|
||||
### [`auth-backend`](https://github.com/backstage/backstage/tree/master/plugins/auth-backend/)
|
||||
### `auth-backend` [GitHub](https://github.com/backstage/backstage/tree/master/plugins/auth-backend/)
|
||||
|
||||
A backend plugin that implements the backend portion of the various
|
||||
authentication flows used in Backstage.
|
||||
@@ -256,7 +267,7 @@ Stability: `2`
|
||||
|
||||
Stability: `1`
|
||||
|
||||
### [`catalog`](https://github.com/backstage/backstage/tree/master/plugins/catalog/)
|
||||
### `catalog` [GitHub](https://github.com/backstage/backstage/tree/master/plugins/catalog/)
|
||||
|
||||
The frontend plugin for the catalog, with the table and building blocks for the
|
||||
entity pages.
|
||||
@@ -264,7 +275,7 @@ entity pages.
|
||||
Stability: `1`. We're planning some work to overhaul how entity pages are
|
||||
constructed.
|
||||
|
||||
### [`catalog-backend`](https://github.com/backstage/backstage/tree/master/plugins/catalog-backend/)
|
||||
### `catalog-backend` [GitHub](https://github.com/backstage/backstage/tree/master/plugins/catalog-backend/)
|
||||
|
||||
The backend API for the catalog, also exposes the processing subsystem for
|
||||
customization of the catalog. Powers the @backstage/plugin-catalog frontend
|
||||
@@ -278,53 +289,53 @@ Stability: `1`. There are plans to remove and rework some endpoints.
|
||||
|
||||
Stability: `1`. There are plans to rework parts of the Processor interface.
|
||||
|
||||
### [`catalog-graphql`](https://github.com/backstage/backstage/tree/master/plugins/catalog-graphql/)
|
||||
### `catalog-graphql` [GitHub](https://github.com/backstage/backstage/tree/master/plugins/catalog-graphql/)
|
||||
|
||||
Provides the catalog schema and resolvers for the graphql backend.
|
||||
|
||||
Stability: `0`. Under heavy development and subject to change.
|
||||
|
||||
### [`explore`](https://github.com/backstage/backstage/tree/master/plugins/explore/)
|
||||
### `explore` [GitHub](https://github.com/backstage/backstage/tree/master/plugins/explore/)
|
||||
|
||||
A frontend plugin that introduces the concept of exploring internal and external
|
||||
tooling in an organization.
|
||||
|
||||
Stability: `0`. Only an example at the moment and not customizable.
|
||||
|
||||
### [`graphiql`](https://github.com/backstage/backstage/tree/master/plugins/graphiql/)
|
||||
### `graphiql` [GitHub](https://github.com/backstage/backstage/tree/master/plugins/graphiql/)
|
||||
|
||||
Integrates GraphiQL as a tool to browse GraphQL API endpoints inside Backstage.
|
||||
|
||||
Stability: `1`
|
||||
|
||||
### [`graphql`](https://github.com/backstage/backstage/tree/master/plugins/graphql/)
|
||||
### `graphql` [GitHub](https://github.com/backstage/backstage/tree/master/plugins/graphql/)
|
||||
|
||||
A backend plugin that provides
|
||||
|
||||
Stability: `0`. Under heavy development and subject to change.
|
||||
|
||||
### [`kubernetes`](https://github.com/backstage/backstage/tree/master/plugins/kubernetes/)
|
||||
### `kubernetes` [GitHub](https://github.com/backstage/backstage/tree/master/plugins/kubernetes/)
|
||||
|
||||
The frontend component of the Kubernetes plugin, used to browse and visualize
|
||||
Kubernetes resources.
|
||||
|
||||
Stability: `1`.
|
||||
|
||||
### [`kubernetes-backend`](https://github.com/backstage/backstage/tree/master/plugins/kubernetes-backend/)
|
||||
### `kubernetes-backend` [GitHub](https://github.com/backstage/backstage/tree/master/plugins/kubernetes-backend/)
|
||||
|
||||
The backend component of the Kubernetes plugin, used to fetch Kubernetes
|
||||
resources from clusters and associate them with entities in the Catalog.
|
||||
|
||||
Stability: `1`.
|
||||
|
||||
### [`proxy-backend`](https://github.com/backstage/backstage/tree/master/plugins/proxy-backend/)
|
||||
### `proxy-backend` [GitHub](https://github.com/backstage/backstage/tree/master/plugins/proxy-backend/)
|
||||
|
||||
A backend plugin used to set up proxying to other endpoints based on static
|
||||
configuration.
|
||||
|
||||
Stability: `1`
|
||||
|
||||
### [`register-component`](https://github.com/backstage/backstage/tree/master/plugins/register-component/)
|
||||
### `register-component` [GitHub](https://github.com/backstage/backstage/tree/master/plugins/register-component/)
|
||||
|
||||
A frontend plugin that allows the user to register entity locations in the
|
||||
catalog.
|
||||
@@ -332,14 +343,14 @@ catalog.
|
||||
Stability: `0`. This plugin is likely to be replaced by a generic entity import
|
||||
plugin instead.
|
||||
|
||||
### [`scaffolder`](https://github.com/backstage/backstage/tree/master/plugins/scaffolder/)
|
||||
### `scaffolder` [GitHub](https://github.com/backstage/backstage/tree/master/plugins/scaffolder/)
|
||||
|
||||
The frontend scaffolder plugin where one can browse templates and initiate
|
||||
scaffolding jobs.
|
||||
|
||||
Stability: `1`
|
||||
|
||||
### [`scaffolder-backend`](https://github.com/backstage/backstage/tree/master/plugins/scaffolder-backend/)
|
||||
### `scaffolder-backend` [GitHub](https://github.com/backstage/backstage/tree/master/plugins/scaffolder-backend/)
|
||||
|
||||
The backend scaffolder plugin that provides an implementation for templates in
|
||||
the catalog.
|
||||
@@ -347,35 +358,35 @@ the catalog.
|
||||
Stability: `1`. There is planned work to rework the scaffolder in
|
||||
https://github.com/backstage/backstage/issues/2771.
|
||||
|
||||
### [`tech-radar`](https://github.com/backstage/backstage/tree/master/plugins/tech-radar/)
|
||||
### `tech-radar` [GitHub](https://github.com/backstage/backstage/tree/master/plugins/tech-radar/)
|
||||
|
||||
Visualize the your company's official guidelines of different areas of software
|
||||
development.
|
||||
|
||||
Stability: `0`
|
||||
|
||||
### [`techdocs`](https://github.com/backstage/backstage/tree/master/plugins/techdocs/)
|
||||
### `techdocs` [GitHub](https://github.com/backstage/backstage/tree/master/plugins/techdocs/)
|
||||
|
||||
The frontend component of the TechDocs plugin, used to browse technical
|
||||
documentation of entities.
|
||||
|
||||
Stability: `1`
|
||||
|
||||
### [`techdocs-backend`](https://github.com/backstage/backstage/tree/master/plugins/techdocs-backend/)
|
||||
### `techdocs-backend` [GitHub](https://github.com/backstage/backstage/tree/master/plugins/techdocs-backend/)
|
||||
|
||||
The backend component of the TechDocs plugin, used to transform and serve
|
||||
TechDocs.
|
||||
|
||||
Stability: `0`
|
||||
|
||||
### [`user-settings`](https://github.com/backstage/backstage/tree/master/plugins/user-settings/)
|
||||
### `user-settings` [GitHub](https://github.com/backstage/backstage/tree/master/plugins/user-settings/)
|
||||
|
||||
A frontend plugin that provides a page where the user can tweak various
|
||||
settings.
|
||||
|
||||
Stability: `1`
|
||||
|
||||
### [`welcome`](https://github.com/backstage/backstage/tree/master/plugins/welcome/)
|
||||
### `welcome` [GitHub](https://github.com/backstage/backstage/tree/master/plugins/welcome/)
|
||||
|
||||
A plugin that can be used to welcome the user to Backstage.
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ To inspect the state of a feature flag inside your plugin, you can use the
|
||||
`FeatureFlagsApi`, accessed via the `featureFlagsApiRef`. For example:
|
||||
|
||||
```tsx
|
||||
import React, { FC } from 'react';
|
||||
import React from 'react';
|
||||
import { Button } from '@material-ui/core';
|
||||
import { featureFlagsApiRef, useApi } from '@backstage/core';
|
||||
|
||||
|
||||
@@ -81,13 +81,13 @@ import { useApi } from '@backstage/core-api';
|
||||
_from inline:_
|
||||
|
||||
```tsx
|
||||
const ExampleComponent: FC<{}> = () => ( ... )
|
||||
const ExampleComponent = () => ( ... )
|
||||
```
|
||||
|
||||
_to block:_
|
||||
|
||||
```tsx
|
||||
const ExampleComponent: FC<{}> = () => {
|
||||
const ExampleComponent = () => {
|
||||
|
||||
return (
|
||||
...
|
||||
@@ -135,7 +135,7 @@ changes, let's start by wiping this component clean.
|
||||
1. Replace everything in the file with the following:
|
||||
|
||||
```tsx
|
||||
import React, { FC } from 'react';
|
||||
import React from 'react';
|
||||
import { useAsync } from 'react-use';
|
||||
import Alert from '@material-ui/lab/Alert';
|
||||
import {
|
||||
@@ -147,7 +147,7 @@ import {
|
||||
import { useApi } from '@backstage/core-api';
|
||||
import { graphql } from '@octokit/graphql';
|
||||
|
||||
const ExampleFetchComponent: FC<{}> = () => {
|
||||
const ExampleFetchComponent = () => {
|
||||
return <div>Nothing to see yet</div>;
|
||||
};
|
||||
|
||||
@@ -223,7 +223,7 @@ type DenseTableProps = {
|
||||
viewer: Viewer;
|
||||
};
|
||||
|
||||
export const DenseTable: FC<DenseTableProps> = ({ viewer }) => {
|
||||
export const DenseTable = ({ viewer }: DenseTableProps) => {
|
||||
const columns: TableColumn[] = [
|
||||
{ title: 'Name', field: 'name' },
|
||||
{ title: 'Created', field: 'createdAt' },
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
---
|
||||
title: Kubernetes
|
||||
author: Spotify
|
||||
authorUrl: https://github.com/spotify
|
||||
category: Kubernetes
|
||||
description: Surfaces components in a Kubernetes container orchestration environment into the Backstage catalog.
|
||||
documentation: https://github.com/backstage/backstage/tree/master/plugins/kubernetes
|
||||
iconUrl: https://raw.githubusercontent.com/cncf/artwork/master/projects/kubernetes/icon/color/kubernetes-icon-color.png
|
||||
npmPackageName: '@backstage/plugin-kubernetes'
|
||||
tags:
|
||||
- kubernetes
|
||||
- k8s
|
||||
+1
-1
@@ -24,7 +24,7 @@
|
||||
"docker-build": "yarn tsc && yarn workspace example-backend build-image",
|
||||
"create-plugin": "backstage-cli create-plugin --scope backstage --no-private",
|
||||
"remove-plugin": "backstage-cli remove-plugin",
|
||||
"release": "changeset version && yarn prettier --write '{packages,plugins}/*/{package.json,CHANGELOG.md}'",
|
||||
"release": "changeset version && yarn prettier --write '{packages,plugins}/*/{package.json,CHANGELOG.md}' && yarn install --frozen-lockfile",
|
||||
"prettier:check": "prettier --check .",
|
||||
"lerna": "lerna",
|
||||
"storybook": "yarn workspace storybook start",
|
||||
|
||||
@@ -1,5 +1,66 @@
|
||||
# example-app
|
||||
|
||||
## 0.2.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [b2a07d2dc]
|
||||
- Updated dependencies [075d3dc5a]
|
||||
- Updated dependencies [e3071a0d4]
|
||||
- Updated dependencies [d6e8099ed]
|
||||
- Updated dependencies [88ef11b45]
|
||||
- Updated dependencies [06dbe707b]
|
||||
- Updated dependencies [2527628e1]
|
||||
- Updated dependencies [011708102]
|
||||
- Updated dependencies [04efbbdd2]
|
||||
- Updated dependencies [90458fed6]
|
||||
- Updated dependencies [6011b7d3e]
|
||||
- Updated dependencies [79418ddb6]
|
||||
- Updated dependencies [d2938af4c]
|
||||
- Updated dependencies [61897fb2c]
|
||||
- Updated dependencies [e1f4e24ef]
|
||||
- Updated dependencies [6a0d7a9fb]
|
||||
- Updated dependencies [0f8877168]
|
||||
- Updated dependencies [1c69d4716]
|
||||
- Updated dependencies [246799c7f]
|
||||
- Updated dependencies [83b6e0c1f]
|
||||
- Updated dependencies [87a33d2fe]
|
||||
- Updated dependencies [1665ae8bb]
|
||||
- Updated dependencies [04f26f88d]
|
||||
- Updated dependencies [ff243ce96]
|
||||
- Updated dependencies [2b71db211]
|
||||
- @backstage/plugin-jenkins@0.3.3
|
||||
- @backstage/plugin-sentry@0.3.0
|
||||
- @backstage/plugin-cost-insights@0.5.0
|
||||
- @backstage/cli@0.4.1
|
||||
- @backstage/core@0.4.0
|
||||
- @backstage/plugin-circleci@0.2.4
|
||||
- @backstage/plugin-catalog@0.2.6
|
||||
- @backstage/plugin-pagerduty@0.2.2
|
||||
- @backstage/plugin-catalog-import@0.3.1
|
||||
- @backstage/test-utils@0.1.5
|
||||
- @backstage/plugin-search@0.2.3
|
||||
- @backstage/plugin-api-docs@0.4.0
|
||||
- @backstage/catalog-model@0.5.0
|
||||
- @backstage/plugin-techdocs@0.4.0
|
||||
- @backstage/theme@0.2.2
|
||||
- @backstage/plugin-org@0.3.1
|
||||
- @backstage/plugin-cloudbuild@0.2.4
|
||||
- @backstage/plugin-explore@0.2.2
|
||||
- @backstage/plugin-gcp-projects@0.2.2
|
||||
- @backstage/plugin-github-actions@0.2.4
|
||||
- @backstage/plugin-gitops-profiles@0.2.2
|
||||
- @backstage/plugin-graphiql@0.2.2
|
||||
- @backstage/plugin-kubernetes@0.3.2
|
||||
- @backstage/plugin-lighthouse@0.2.5
|
||||
- @backstage/plugin-newrelic@0.2.2
|
||||
- @backstage/plugin-register-component@0.2.4
|
||||
- @backstage/plugin-rollbar@0.2.6
|
||||
- @backstage/plugin-scaffolder@0.3.3
|
||||
- @backstage/plugin-tech-radar@0.3.1
|
||||
- @backstage/plugin-user-settings@0.2.3
|
||||
- @backstage/plugin-welcome@0.2.3
|
||||
|
||||
## 0.2.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
+32
-32
@@ -1,40 +1,40 @@
|
||||
{
|
||||
"name": "example-app",
|
||||
"version": "0.2.5",
|
||||
"version": "0.2.6",
|
||||
"private": true,
|
||||
"bundled": true,
|
||||
"dependencies": {
|
||||
"@backstage/catalog-model": "^0.4.0",
|
||||
"@backstage/cli": "^0.4.0",
|
||||
"@backstage/core": "^0.3.2",
|
||||
"@backstage/plugin-api-docs": "^0.3.1",
|
||||
"@backstage/plugin-catalog": "^0.2.5",
|
||||
"@backstage/plugin-catalog-import": "^0.3.0",
|
||||
"@backstage/plugin-circleci": "^0.2.3",
|
||||
"@backstage/plugin-cloudbuild": "^0.2.3",
|
||||
"@backstage/plugin-cost-insights": "^0.4.2",
|
||||
"@backstage/plugin-explore": "^0.2.1",
|
||||
"@backstage/plugin-gcp-projects": "^0.2.1",
|
||||
"@backstage/plugin-github-actions": "^0.2.3",
|
||||
"@backstage/plugin-gitops-profiles": "^0.2.1",
|
||||
"@backstage/plugin-graphiql": "^0.2.1",
|
||||
"@backstage/plugin-org": "^0.3.0",
|
||||
"@backstage/plugin-jenkins": "^0.3.2",
|
||||
"@backstage/plugin-kubernetes": "^0.3.1",
|
||||
"@backstage/plugin-lighthouse": "^0.2.4",
|
||||
"@backstage/plugin-newrelic": "^0.2.1",
|
||||
"@backstage/plugin-pagerduty": "0.2.1",
|
||||
"@backstage/plugin-register-component": "^0.2.3",
|
||||
"@backstage/plugin-rollbar": "^0.2.5",
|
||||
"@backstage/plugin-scaffolder": "^0.3.2",
|
||||
"@backstage/plugin-sentry": "^0.2.4",
|
||||
"@backstage/plugin-search": "^0.2.2",
|
||||
"@backstage/plugin-tech-radar": "^0.3.0",
|
||||
"@backstage/plugin-techdocs": "^0.3.1",
|
||||
"@backstage/plugin-user-settings": "^0.2.2",
|
||||
"@backstage/plugin-welcome": "^0.2.2",
|
||||
"@backstage/test-utils": "^0.1.4",
|
||||
"@backstage/theme": "^0.2.1",
|
||||
"@backstage/catalog-model": "^0.5.0",
|
||||
"@backstage/cli": "^0.4.1",
|
||||
"@backstage/core": "^0.4.0",
|
||||
"@backstage/plugin-api-docs": "^0.4.0",
|
||||
"@backstage/plugin-catalog": "^0.2.6",
|
||||
"@backstage/plugin-catalog-import": "^0.3.1",
|
||||
"@backstage/plugin-circleci": "^0.2.4",
|
||||
"@backstage/plugin-cloudbuild": "^0.2.4",
|
||||
"@backstage/plugin-cost-insights": "^0.5.0",
|
||||
"@backstage/plugin-explore": "^0.2.2",
|
||||
"@backstage/plugin-gcp-projects": "^0.2.2",
|
||||
"@backstage/plugin-github-actions": "^0.2.4",
|
||||
"@backstage/plugin-gitops-profiles": "^0.2.2",
|
||||
"@backstage/plugin-graphiql": "^0.2.2",
|
||||
"@backstage/plugin-org": "^0.3.1",
|
||||
"@backstage/plugin-jenkins": "^0.3.3",
|
||||
"@backstage/plugin-kubernetes": "^0.3.2",
|
||||
"@backstage/plugin-lighthouse": "^0.2.5",
|
||||
"@backstage/plugin-newrelic": "^0.2.2",
|
||||
"@backstage/plugin-pagerduty": "0.2.2",
|
||||
"@backstage/plugin-register-component": "^0.2.4",
|
||||
"@backstage/plugin-rollbar": "^0.2.6",
|
||||
"@backstage/plugin-scaffolder": "^0.3.3",
|
||||
"@backstage/plugin-sentry": "^0.3.0",
|
||||
"@backstage/plugin-search": "^0.2.3",
|
||||
"@backstage/plugin-tech-radar": "^0.3.1",
|
||||
"@backstage/plugin-techdocs": "^0.4.0",
|
||||
"@backstage/plugin-user-settings": "^0.2.3",
|
||||
"@backstage/plugin-welcome": "^0.2.3",
|
||||
"@backstage/test-utils": "^0.1.5",
|
||||
"@backstage/theme": "^0.2.2",
|
||||
"@material-ui/core": "^4.11.0",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@octokit/rest": "^18.0.0",
|
||||
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
SignInPage,
|
||||
createRouteRef,
|
||||
} from '@backstage/core';
|
||||
import React, { FC } from 'react';
|
||||
import React from 'react';
|
||||
import Root from './components/Root';
|
||||
import * as plugins from './plugins';
|
||||
import { apis } from './apis';
|
||||
@@ -92,7 +92,7 @@ const AppRoutes = () => (
|
||||
</Routes>
|
||||
);
|
||||
|
||||
const App: FC<{}> = () => (
|
||||
const App = () => (
|
||||
<AppProvider>
|
||||
<AlertDisplay />
|
||||
<OAuthRequestDialog />
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { FC } from 'react';
|
||||
import React from 'react';
|
||||
import { makeStyles } from '@material-ui/core';
|
||||
|
||||
const useStyles = makeStyles({
|
||||
@@ -26,7 +26,7 @@ const useStyles = makeStyles({
|
||||
fill: '#7df3e1',
|
||||
},
|
||||
});
|
||||
const LogoFull: FC<{}> = () => {
|
||||
const LogoFull = () => {
|
||||
const classes = useStyles();
|
||||
|
||||
return (
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { FC } from 'react';
|
||||
import React from 'react';
|
||||
import { makeStyles } from '@material-ui/core';
|
||||
|
||||
const useStyles = makeStyles({
|
||||
@@ -27,7 +27,7 @@ const useStyles = makeStyles({
|
||||
},
|
||||
});
|
||||
|
||||
const LogoIcon: FC<{}> = () => {
|
||||
const LogoIcon = () => {
|
||||
const classes = useStyles();
|
||||
|
||||
return (
|
||||
|
||||
@@ -14,8 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { FC, useContext } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import React, { useContext, PropsWithChildren } from 'react';
|
||||
import { Link, makeStyles } from '@material-ui/core';
|
||||
import HomeIcon from '@material-ui/icons/Home';
|
||||
import ExtensionIcon from '@material-ui/icons/Extension';
|
||||
@@ -55,7 +54,7 @@ const useSidebarLogoStyles = makeStyles({
|
||||
},
|
||||
});
|
||||
|
||||
const SidebarLogo: FC<{}> = () => {
|
||||
const SidebarLogo = () => {
|
||||
const classes = useSidebarLogoStyles();
|
||||
const { isOpen } = useContext(SidebarContext);
|
||||
|
||||
@@ -73,7 +72,7 @@ const SidebarLogo: FC<{}> = () => {
|
||||
);
|
||||
};
|
||||
|
||||
const Root: FC<{}> = ({ children }) => (
|
||||
const Root = ({ children }: PropsWithChildren<{}>) => (
|
||||
<SidebarPage>
|
||||
<Sidebar>
|
||||
<SidebarLogo />
|
||||
@@ -102,8 +101,4 @@ const Root: FC<{}> = ({ children }) => (
|
||||
</SidebarPage>
|
||||
);
|
||||
|
||||
Root.propTypes = {
|
||||
children: PropTypes.node,
|
||||
};
|
||||
|
||||
export default Root;
|
||||
|
||||
@@ -1,5 +1,99 @@
|
||||
# @backstage/backend-common
|
||||
|
||||
## 0.4.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 12bbd748c: Removes the Prometheus integration from `backend-common`.
|
||||
|
||||
Rational behind this change is to keep the metrics integration of Backstage
|
||||
generic. Instead of directly relying on Prometheus, Backstage will expose
|
||||
metrics in a generic way. Integrators can then export the metrics in their
|
||||
desired format. For example using Prometheus.
|
||||
|
||||
To keep the existing behavior, you need to integrate Prometheus in your
|
||||
backend:
|
||||
|
||||
First, add a dependency on `express-prom-bundle` and `prom-client` to your backend.
|
||||
|
||||
```diff
|
||||
// packages/backend/package.json
|
||||
"dependencies": {
|
||||
+ "express-prom-bundle": "^6.1.0",
|
||||
+ "prom-client": "^12.0.0",
|
||||
```
|
||||
|
||||
Then, add a handler for metrics and a simple instrumentation for the endpoints.
|
||||
|
||||
```typescript
|
||||
// packages/backend/src/metrics.ts
|
||||
import { useHotCleanup } from '@backstage/backend-common';
|
||||
import { RequestHandler } from 'express';
|
||||
import promBundle from 'express-prom-bundle';
|
||||
import prom from 'prom-client';
|
||||
import * as url from 'url';
|
||||
|
||||
const rootRegEx = new RegExp('^/([^/]*)/.*');
|
||||
const apiRegEx = new RegExp('^/api/([^/]*)/.*');
|
||||
|
||||
export function normalizePath(req: any): string {
|
||||
const path = url.parse(req.originalUrl || req.url).pathname || '/';
|
||||
|
||||
// Capture /api/ and the plugin name
|
||||
if (apiRegEx.test(path)) {
|
||||
return path.replace(apiRegEx, '/api/$1');
|
||||
}
|
||||
|
||||
// Only the first path segment at root level
|
||||
return path.replace(rootRegEx, '/$1');
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a /metrics endpoint, register default runtime metrics and instrument the router.
|
||||
*/
|
||||
export function metricsHandler(): RequestHandler {
|
||||
// We can only initialize the metrics once and have to clean them up between hot reloads
|
||||
useHotCleanup(module, () => prom.register.clear());
|
||||
|
||||
return promBundle({
|
||||
includeMethod: true,
|
||||
includePath: true,
|
||||
// Using includePath alone is problematic, as it will include path labels with high
|
||||
// cardinality (e.g. path params). Instead we would have to template them. However, this
|
||||
// is difficult, as every backend plugin might use different routes. Instead we only take
|
||||
// the first directory of the path, to have at least an idea how each plugin performs:
|
||||
normalizePath,
|
||||
promClient: { collectDefaultMetrics: {} },
|
||||
});
|
||||
}
|
||||
```
|
||||
|
||||
Last, extend your router configuration with the `metricsHandler`:
|
||||
|
||||
```diff
|
||||
+import { metricsHandler } from './metrics';
|
||||
|
||||
...
|
||||
|
||||
const service = createServiceBuilder(module)
|
||||
.loadConfig(config)
|
||||
.addRouter('', await healthcheck(healthcheckEnv))
|
||||
+ .addRouter('', metricsHandler())
|
||||
.addRouter('/api', apiRouter);
|
||||
```
|
||||
|
||||
Your Prometheus metrics will be available at the `/metrics` endpoint.
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 38e24db00: Move the core url and auth logic to integration for the four major providers
|
||||
- Updated dependencies [38e24db00]
|
||||
- Updated dependencies [b8ecf6f48]
|
||||
- Updated dependencies [e3bd9fc2f]
|
||||
- Updated dependencies [e3bd9fc2f]
|
||||
- @backstage/integration@0.1.3
|
||||
- @backstage/config@0.1.2
|
||||
|
||||
## 0.3.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/backend-common",
|
||||
"description": "Common functionality library for Backstage backends",
|
||||
"version": "0.3.3",
|
||||
"version": "0.4.0",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"private": false,
|
||||
@@ -30,9 +30,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/cli-common": "^0.1.1",
|
||||
"@backstage/config": "^0.1.1",
|
||||
"@backstage/config": "^0.1.2",
|
||||
"@backstage/config-loader": "^0.4.0",
|
||||
"@backstage/integration": "^0.1.2",
|
||||
"@backstage/integration": "^0.1.3",
|
||||
"@types/cors": "^2.8.6",
|
||||
"@types/express": "^4.17.6",
|
||||
"archiver": "^5.0.2",
|
||||
@@ -65,8 +65,8 @@
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.4.0",
|
||||
"@backstage/test-utils": "^0.1.4",
|
||||
"@backstage/cli": "^0.4.1",
|
||||
"@backstage/test-utils": "^0.1.5",
|
||||
"@types/archiver": "^3.1.1",
|
||||
"@types/compression": "^1.7.0",
|
||||
"@types/concat-stream": "^1.6.0",
|
||||
|
||||
@@ -1,5 +1,34 @@
|
||||
# example-backend
|
||||
|
||||
## 0.2.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 1e22f8e0b: Unify `dockerode` library and type dependency versions
|
||||
- Updated dependencies [6e8bb3ac0]
|
||||
- Updated dependencies [e708679d7]
|
||||
- Updated dependencies [047c018c9]
|
||||
- Updated dependencies [38e24db00]
|
||||
- Updated dependencies [e3bd9fc2f]
|
||||
- Updated dependencies [12bbd748c]
|
||||
- Updated dependencies [38d63fbe1]
|
||||
- Updated dependencies [1e22f8e0b]
|
||||
- Updated dependencies [83b6e0c1f]
|
||||
- Updated dependencies [e3bd9fc2f]
|
||||
- @backstage/plugin-catalog-backend@0.4.0
|
||||
- @backstage/backend-common@0.4.0
|
||||
- @backstage/config@0.1.2
|
||||
- @backstage/plugin-scaffolder-backend@0.3.4
|
||||
- @backstage/plugin-techdocs-backend@0.3.2
|
||||
- @backstage/catalog-model@0.5.0
|
||||
- example-app@0.2.6
|
||||
- @backstage/plugin-app-backend@0.3.3
|
||||
- @backstage/plugin-auth-backend@0.2.6
|
||||
- @backstage/plugin-graphql-backend@0.1.4
|
||||
- @backstage/plugin-kubernetes-backend@0.2.2
|
||||
- @backstage/plugin-proxy-backend@0.2.3
|
||||
- @backstage/plugin-rollbar-backend@0.1.5
|
||||
|
||||
## 0.2.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "example-backend",
|
||||
"version": "0.2.5",
|
||||
"version": "0.2.6",
|
||||
"main": "dist/index.cjs.js",
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
@@ -27,23 +27,23 @@
|
||||
"migrate:create": "knex migrate:make -x ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/backend-common": "^0.3.3",
|
||||
"@backstage/catalog-model": "^0.4.0",
|
||||
"@backstage/config": "^0.1.1",
|
||||
"@backstage/plugin-app-backend": "^0.3.2",
|
||||
"@backstage/plugin-auth-backend": "^0.2.5",
|
||||
"@backstage/plugin-catalog-backend": "^0.3.0",
|
||||
"@backstage/plugin-graphql-backend": "^0.1.3",
|
||||
"@backstage/plugin-kubernetes-backend": "^0.2.1",
|
||||
"@backstage/plugin-proxy-backend": "^0.2.2",
|
||||
"@backstage/plugin-rollbar-backend": "^0.1.4",
|
||||
"@backstage/plugin-scaffolder-backend": "^0.3.3",
|
||||
"@backstage/plugin-techdocs-backend": "^0.3.1",
|
||||
"@backstage/backend-common": "^0.4.0",
|
||||
"@backstage/catalog-model": "^0.5.0",
|
||||
"@backstage/config": "^0.1.2",
|
||||
"@backstage/plugin-app-backend": "^0.3.3",
|
||||
"@backstage/plugin-auth-backend": "^0.2.6",
|
||||
"@backstage/plugin-catalog-backend": "^0.4.0",
|
||||
"@backstage/plugin-graphql-backend": "^0.1.4",
|
||||
"@backstage/plugin-kubernetes-backend": "^0.2.2",
|
||||
"@backstage/plugin-proxy-backend": "^0.2.3",
|
||||
"@backstage/plugin-rollbar-backend": "^0.1.5",
|
||||
"@backstage/plugin-scaffolder-backend": "^0.3.4",
|
||||
"@backstage/plugin-techdocs-backend": "^0.3.2",
|
||||
"@gitbeaker/node": "^25.2.0",
|
||||
"@octokit/rest": "^18.0.0",
|
||||
"azure-devops-node-api": "^10.1.1",
|
||||
"dockerode": "^3.2.1",
|
||||
"example-app": "^0.2.5",
|
||||
"example-app": "^0.2.6",
|
||||
"express": "^4.17.1",
|
||||
"express-promise-router": "^3.0.3",
|
||||
"knex": "^0.21.6",
|
||||
@@ -53,7 +53,7 @@
|
||||
"winston": "^3.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.4.0",
|
||||
"@backstage/cli": "^0.4.1",
|
||||
"@types/dockerode": "^3.2.1",
|
||||
"@types/express": "^4.17.6",
|
||||
"@types/express-serve-static-core": "^4.17.5",
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# @backstage/catalog-client
|
||||
|
||||
## 0.3.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [e3bd9fc2f]
|
||||
- Updated dependencies [83b6e0c1f]
|
||||
- Updated dependencies [e3bd9fc2f]
|
||||
- @backstage/config@0.1.2
|
||||
- @backstage/catalog-model@0.5.0
|
||||
|
||||
## 0.3.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@backstage/catalog-client",
|
||||
"version": "0.3.2",
|
||||
"version": "0.3.3",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
@@ -29,12 +29,12 @@
|
||||
"clean": "backstage-cli clean"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/catalog-model": "^0.4.0",
|
||||
"@backstage/config": "^0.1.1",
|
||||
"@backstage/catalog-model": "^0.5.0",
|
||||
"@backstage/config": "^0.1.2",
|
||||
"cross-fetch": "^3.0.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.4.0",
|
||||
"@backstage/cli": "^0.4.1",
|
||||
"@types/jest": "^26.0.7",
|
||||
"msw": "^0.21.2"
|
||||
},
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# @backstage/catalog-model
|
||||
|
||||
## 0.5.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 83b6e0c1f: Remove the deprecated fields `ancestors` and `descendants` from the `Group` entity.
|
||||
|
||||
See https://github.com/backstage/backstage/issues/3049 and the PRs linked from it for details.
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [e3bd9fc2f]
|
||||
- Updated dependencies [e3bd9fc2f]
|
||||
- @backstage/config@0.1.2
|
||||
|
||||
## 0.4.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@backstage/catalog-model",
|
||||
"version": "0.4.0",
|
||||
"version": "0.5.0",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
@@ -29,7 +29,7 @@
|
||||
"clean": "backstage-cli clean"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/config": "^0.1.1",
|
||||
"@backstage/config": "^0.1.2",
|
||||
"@types/json-schema": "^7.0.5",
|
||||
"@types/yup": "^0.29.8",
|
||||
"json-schema": "^0.2.5",
|
||||
@@ -38,7 +38,7 @@
|
||||
"yup": "^0.29.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.4.0",
|
||||
"@backstage/cli": "^0.4.1",
|
||||
"@types/express": "^4.17.6",
|
||||
"@types/jest": "^26.0.7",
|
||||
"@types/lodash": "^4.14.151",
|
||||
|
||||
@@ -46,6 +46,10 @@ export function generateEntityEtag(): string {
|
||||
* are added or existing annotations were changed (since they are effectively
|
||||
* merged when doing updates).
|
||||
*
|
||||
* Note that this comparison does NOT take state, relations or similar into
|
||||
* account. It only compares the actual input entity data, i.e. metadata and
|
||||
* spec.
|
||||
*
|
||||
* @param previous The old state of the entity
|
||||
* @param next The new state of the entity
|
||||
*/
|
||||
@@ -76,6 +80,10 @@ export function entityHasChanges(previous: Entity, next: Entity): boolean {
|
||||
delete e1.metadata.annotations;
|
||||
delete e2.metadata.annotations;
|
||||
|
||||
// Remove things that we explicitly do not compare
|
||||
delete e1.relations;
|
||||
delete e2.relations;
|
||||
|
||||
return !lodash.isEqual(e1, e2);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
# @backstage/cli
|
||||
|
||||
## 0.4.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 06dbe707b: Update experimental backend bundle command to only output archives to `dist/` instead of a full workspace mirror in `dist-workspace/`.
|
||||
- 011708102: Fixes a big in the bundling logic that caused `node_modules` inside local monorepo packages to be transformed.
|
||||
- 61897fb2c: Fix config schema for `.app.listen`
|
||||
- Updated dependencies [e3bd9fc2f]
|
||||
- Updated dependencies [e3bd9fc2f]
|
||||
- @backstage/config@0.1.2
|
||||
|
||||
## 0.4.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/cli",
|
||||
"description": "CLI for developing Backstage plugins and apps",
|
||||
"version": "0.4.0",
|
||||
"version": "0.4.1",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
@@ -29,7 +29,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/cli-common": "^0.1.1",
|
||||
"@backstage/config": "^0.1.1",
|
||||
"@backstage/config": "^0.1.2",
|
||||
"@backstage/config-loader": "^0.4.0",
|
||||
"@hot-loader/react-dom": "^16.13.0",
|
||||
"@lerna/package-graph": "^3.18.5",
|
||||
@@ -111,12 +111,12 @@
|
||||
"yn": "^4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/backend-common": "^0.3.3",
|
||||
"@backstage/config": "^0.1.1",
|
||||
"@backstage/core": "^0.3.2",
|
||||
"@backstage/dev-utils": "^0.1.5",
|
||||
"@backstage/test-utils": "^0.1.4",
|
||||
"@backstage/theme": "^0.2.1",
|
||||
"@backstage/backend-common": "^0.4.0",
|
||||
"@backstage/config": "^0.1.2",
|
||||
"@backstage/core": "^0.4.0",
|
||||
"@backstage/dev-utils": "^0.1.6",
|
||||
"@backstage/test-utils": "^0.1.5",
|
||||
"@backstage/theme": "^0.2.2",
|
||||
"@types/diff": "^4.0.2",
|
||||
"@types/fs-extra": "^9.0.1",
|
||||
"@types/html-webpack-plugin": "^3.2.2",
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
import React, { FC } from 'react';
|
||||
import React from 'react';
|
||||
import { Typography, Grid } from '@material-ui/core';
|
||||
import {
|
||||
InfoCard,
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
} from '@backstage/core';
|
||||
import ExampleFetchComponent from '../ExampleFetchComponent';
|
||||
|
||||
const ExampleComponent: FC<{}> = () => (
|
||||
const ExampleComponent = () => (
|
||||
<Page themeId="tool">
|
||||
<Header title="Welcome to {{ id }}!" subtitle="Optional subtitle">
|
||||
<HeaderLabel label="Owner" value="Team X" />
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
import React, { FC } from 'react';
|
||||
import React from 'react';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import { Table, TableColumn, Progress } from '@backstage/core';
|
||||
import Alert from '@material-ui/lab/Alert';
|
||||
@@ -38,7 +38,7 @@ type DenseTableProps = {
|
||||
users: User[];
|
||||
};
|
||||
|
||||
export const DenseTable: FC<DenseTableProps> = ({ users }) => {
|
||||
export const DenseTable = ({ users }: DenseTableProps) => {
|
||||
const classes = useStyles();
|
||||
|
||||
const columns: TableColumn[] = [
|
||||
@@ -73,7 +73,7 @@ export const DenseTable: FC<DenseTableProps> = ({ users }) => {
|
||||
);
|
||||
};
|
||||
|
||||
const ExampleFetchComponent: FC<{}> = () => {
|
||||
const ExampleFetchComponent = () => {
|
||||
const { value, loading, error } = useAsync(async (): Promise<User[]> => {
|
||||
const response = await fetch('https://randomuser.me/api/?results=20');
|
||||
const data = await response.json();
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# @backstage/config
|
||||
|
||||
## 0.1.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- e3bd9fc2f: Fix unneeded defensive code
|
||||
- e3bd9fc2f: Fix useless conditional
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/config",
|
||||
"description": "Config API used by Backstage core, backend, and CLI",
|
||||
"version": "0.1.1",
|
||||
"version": "0.1.2",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
|
||||
@@ -272,23 +272,17 @@ export class ConfigReader implements Config {
|
||||
if (value === undefined) {
|
||||
return this.fallback?.readConfigValue(key, validate);
|
||||
}
|
||||
if (value !== undefined) {
|
||||
const result = validate(value);
|
||||
if (result !== true) {
|
||||
const {
|
||||
key: keyName = key,
|
||||
value: theValue = value,
|
||||
const result = validate(value);
|
||||
if (result !== true) {
|
||||
const { key: keyName = key, value: theValue = value, expected } = result;
|
||||
throw new TypeError(
|
||||
errors.type(
|
||||
this.fullKey(keyName),
|
||||
this.context,
|
||||
typeOf(theValue),
|
||||
expected,
|
||||
} = result;
|
||||
throw new TypeError(
|
||||
errors.type(
|
||||
this.fullKey(keyName),
|
||||
this.context,
|
||||
typeOf(theValue),
|
||||
expected,
|
||||
),
|
||||
);
|
||||
}
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
return value as T;
|
||||
|
||||
@@ -1,5 +1,42 @@
|
||||
# @backstage/core-api
|
||||
|
||||
## 0.2.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- b6557c098: Update ApiFactory type to correctly infer API type and disallow mismatched implementations.
|
||||
|
||||
This fixes for example the following code:
|
||||
|
||||
```ts
|
||||
interface MyApi {
|
||||
myMethod(): void
|
||||
}
|
||||
|
||||
const myApiRef = createApiRef<MyApi>({...});
|
||||
|
||||
createApiFactory({
|
||||
api: myApiRef,
|
||||
deps: {},
|
||||
// This should've caused an error, since the empty object does not fully implement MyApi
|
||||
factory: () => ({}),
|
||||
})
|
||||
```
|
||||
|
||||
- d8d5a17da: Deprecated the `ConcreteRoute`, `MutableRouteRef`, `AbsoluteRouteRef` types and added a new `RouteRef` type as replacement.
|
||||
|
||||
Deprecated and disabled the `createSubRoute` method of `AbsoluteRouteRef`.
|
||||
|
||||
Add an as of yet unused `params` option to `createRouteRef`.
|
||||
|
||||
- Updated dependencies [e3bd9fc2f]
|
||||
- Updated dependencies [e1f4e24ef]
|
||||
- Updated dependencies [1665ae8bb]
|
||||
- Updated dependencies [e3bd9fc2f]
|
||||
- @backstage/config@0.1.2
|
||||
- @backstage/test-utils@0.1.5
|
||||
- @backstage/theme@0.2.2
|
||||
|
||||
## 0.2.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/core-api",
|
||||
"description": "Internal Core API used by Backstage plugins and apps",
|
||||
"version": "0.2.4",
|
||||
"version": "0.2.5",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
@@ -29,12 +29,13 @@
|
||||
"clean": "backstage-cli clean"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/config": "^0.1.1",
|
||||
"@backstage/test-utils": "^0.1.4",
|
||||
"@backstage/theme": "^0.2.1",
|
||||
"@backstage/config": "^0.1.2",
|
||||
"@backstage/test-utils": "^0.1.5",
|
||||
"@backstage/theme": "^0.2.2",
|
||||
"@material-ui/core": "^4.11.0",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@types/react": "^16.9",
|
||||
"@types/prop-types": "^15.7.3",
|
||||
"prop-types": "^15.7.2",
|
||||
"react": "^16.12.0",
|
||||
"react-router-dom": "6.0.0-beta.0",
|
||||
@@ -42,7 +43,7 @@
|
||||
"zen-observable": "^0.8.15"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.4.0",
|
||||
"@backstage/cli": "^0.4.1",
|
||||
"@backstage/test-utils-core": "^0.1.1",
|
||||
"@testing-library/jest-dom": "^5.10.1",
|
||||
"@testing-library/react": "^10.4.1",
|
||||
|
||||
@@ -14,7 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { FC, createContext, useContext, ReactNode } from 'react';
|
||||
import React, {
|
||||
createContext,
|
||||
useContext,
|
||||
ReactNode,
|
||||
PropsWithChildren,
|
||||
} from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { ApiRef, ApiHolder, TypesToApiRefs } from './types';
|
||||
import { ApiAggregator } from './ApiAggregator';
|
||||
@@ -26,7 +31,10 @@ type ApiProviderProps = {
|
||||
|
||||
const Context = createContext<ApiHolder | undefined>(undefined);
|
||||
|
||||
export const ApiProvider: FC<ApiProviderProps> = ({ apis, children }) => {
|
||||
export const ApiProvider = ({
|
||||
apis,
|
||||
children,
|
||||
}: PropsWithChildren<ApiProviderProps>) => {
|
||||
const parentHolder = useContext(Context);
|
||||
const holder = parentHolder ? new ApiAggregator(apis, parentHolder) : apis;
|
||||
|
||||
@@ -62,7 +70,7 @@ export function withApis<T>(apis: TypesToApiRefs<T>) {
|
||||
return function withApisWrapper<P extends T>(
|
||||
WrappedComponent: React.ComponentType<P>,
|
||||
) {
|
||||
const Hoc: FC<Omit<P, keyof T>> = props => {
|
||||
const Hoc = (props: PropsWithChildren<Omit<P, keyof T>>) => {
|
||||
const apiHolder = useContext(Context);
|
||||
|
||||
if (!apiHolder) {
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
*/
|
||||
import React, {
|
||||
ComponentType,
|
||||
FC,
|
||||
useMemo,
|
||||
useState,
|
||||
ReactElement,
|
||||
PropsWithChildren,
|
||||
} from 'react';
|
||||
import { Route, Routes, Navigate } from 'react-router-dom';
|
||||
import { AppContextProvider } from './AppContext';
|
||||
@@ -196,7 +196,7 @@ export class PrivateAppImpl implements BackstageApp {
|
||||
}
|
||||
|
||||
getProvider(): ComponentType<{}> {
|
||||
const Provider: FC<{}> = ({ children }) => {
|
||||
const Provider = ({ children }: PropsWithChildren<{}>) => {
|
||||
const appThemeApi = useMemo(
|
||||
() => AppThemeSelector.createWithStorage(this.themes),
|
||||
[],
|
||||
@@ -233,10 +233,13 @@ export class PrivateAppImpl implements BackstageApp {
|
||||
} = this.components;
|
||||
|
||||
// This wraps the sign-in page and waits for sign-in to be completed before rendering the app
|
||||
const SignInPageWrapper: FC<{
|
||||
const SignInPageWrapper = ({
|
||||
component: Component,
|
||||
children,
|
||||
}: {
|
||||
component: ComponentType<SignInPageProps>;
|
||||
children: ReactElement;
|
||||
}> = ({ component: Component, children }) => {
|
||||
}) => {
|
||||
const [result, setResult] = useState<SignInResult>();
|
||||
|
||||
if (result) {
|
||||
@@ -247,7 +250,7 @@ export class PrivateAppImpl implements BackstageApp {
|
||||
return <Component onResult={setResult} />;
|
||||
};
|
||||
|
||||
const AppRouter: FC<{}> = ({ children }) => {
|
||||
const AppRouter = ({ children }: PropsWithChildren<{}>) => {
|
||||
const configApi = useApi(configApiRef);
|
||||
|
||||
let { pathname } = new URL(
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { createContext, useContext, FC } from 'react';
|
||||
import React, { createContext, PropsWithChildren, useContext } from 'react';
|
||||
import { BackstageApp } from './types';
|
||||
|
||||
const Context = createContext<BackstageApp | undefined>(undefined);
|
||||
@@ -23,7 +23,10 @@ type Props = {
|
||||
app: BackstageApp;
|
||||
};
|
||||
|
||||
export const AppContextProvider: FC<Props> = ({ app, children }) => (
|
||||
export const AppContextProvider = ({
|
||||
app,
|
||||
children,
|
||||
}: PropsWithChildren<Props>) => (
|
||||
<Context.Provider value={app} children={children} />
|
||||
);
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { FC, useMemo, useEffect, useState } from 'react';
|
||||
import React, { useMemo, useEffect, useState, PropsWithChildren } from 'react';
|
||||
import { ThemeProvider, CssBaseline } from '@material-ui/core';
|
||||
import { useApi, appThemeApiRef, AppTheme } from '../apis';
|
||||
import { useObservable } from 'react-use';
|
||||
@@ -68,7 +68,7 @@ const useShouldPreferDarkTheme = () => {
|
||||
return shouldPreferDark;
|
||||
};
|
||||
|
||||
export const AppThemeProvider: FC<{}> = ({ children }) => {
|
||||
export function AppThemeProvider({ children }: PropsWithChildren<{}>) {
|
||||
const appThemeApi = useApi(appThemeApiRef);
|
||||
const themeId = useObservable(
|
||||
appThemeApi.activeThemeId$(),
|
||||
@@ -94,4 +94,4 @@ export const AppThemeProvider: FC<{}> = ({ children }) => {
|
||||
<CssBaseline>{children}</CssBaseline>
|
||||
</ThemeProvider>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
import { SvgIconProps } from '@material-ui/core';
|
||||
import PeopleIcon from '@material-ui/icons/People';
|
||||
import PersonIcon from '@material-ui/icons/Person';
|
||||
import React, { FC } from 'react';
|
||||
import React from 'react';
|
||||
import { useApp } from '../app/AppContext';
|
||||
import { IconComponent, SystemIconKey, SystemIcons } from './types';
|
||||
|
||||
@@ -27,7 +27,7 @@ export const defaultSystemIcons: SystemIcons = {
|
||||
};
|
||||
|
||||
const overridableSystemIcon = (key: SystemIconKey): IconComponent => {
|
||||
const Component: FC<SvgIconProps> = props => {
|
||||
const Component = (props: SvgIconProps) => {
|
||||
const app = useApp();
|
||||
const Icon = app.getSystemIcon(key);
|
||||
return <Icon {...props} />;
|
||||
|
||||
@@ -1,5 +1,34 @@
|
||||
# @backstage/core
|
||||
|
||||
## 0.4.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- ff243ce96: Introducing a new optional property within `app-config.yaml` called `auth.environment` to have configurable environment value for `auth.providers`
|
||||
|
||||
**Default Value:** 'development'
|
||||
|
||||
**Optional Values:** 'production' | 'development'
|
||||
|
||||
**Migration-steps:**
|
||||
|
||||
- To override the default value, one could simply introduce the new property `environment` within the `auth` section of the `config.yaml`
|
||||
- re-run the build to reflect the changed configs
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 2527628e1: Link `component` prop now accepts any element type.
|
||||
- 1c69d4716: Fix React warning of descendant paragraph tag
|
||||
- 04f26f88d: Export the `defaultConfigLoader` implementation
|
||||
- Updated dependencies [b6557c098]
|
||||
- Updated dependencies [e3bd9fc2f]
|
||||
- Updated dependencies [d8d5a17da]
|
||||
- Updated dependencies [1665ae8bb]
|
||||
- Updated dependencies [e3bd9fc2f]
|
||||
- @backstage/core-api@0.2.5
|
||||
- @backstage/config@0.1.2
|
||||
- @backstage/theme@0.2.2
|
||||
|
||||
## 0.3.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/core",
|
||||
"description": "Core API used by Backstage plugins and apps",
|
||||
"version": "0.3.2",
|
||||
"version": "0.4.0",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
@@ -29,15 +29,16 @@
|
||||
"clean": "backstage-cli clean"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/config": "^0.1.1",
|
||||
"@backstage/core-api": "^0.2.4",
|
||||
"@backstage/theme": "^0.2.1",
|
||||
"@backstage/config": "^0.1.2",
|
||||
"@backstage/core-api": "^0.2.5",
|
||||
"@backstage/theme": "^0.2.2",
|
||||
"@material-ui/core": "^4.11.0",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@material-ui/lab": "4.0.0-alpha.45",
|
||||
"@types/dagre": "^0.7.44",
|
||||
"@types/react": "^16.9",
|
||||
"@types/react-sparklines": "^1.7.0",
|
||||
"@types/prop-types": "^15.7.3",
|
||||
"classnames": "^2.2.6",
|
||||
"clsx": "^1.1.0",
|
||||
"d3-selection": "^2.0.0",
|
||||
@@ -64,8 +65,8 @@
|
||||
"zen-observable": "^0.8.15"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.4.0",
|
||||
"@backstage/test-utils": "^0.1.4",
|
||||
"@backstage/cli": "^0.4.1",
|
||||
"@backstage/test-utils": "^0.1.5",
|
||||
"@testing-library/jest-dom": "^5.10.1",
|
||||
"@testing-library/react": "^10.4.1",
|
||||
"@testing-library/user-event": "^12.0.7",
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { FC } from 'react';
|
||||
import React from 'react';
|
||||
import privateExports, {
|
||||
AppOptions,
|
||||
defaultSystemIcons,
|
||||
@@ -93,7 +93,7 @@ export function createApp(options?: AppOptions) {
|
||||
const DefaultNotFoundPage = () => (
|
||||
<ErrorPage status="404" statusMessage="PAGE NOT FOUND" />
|
||||
);
|
||||
const DefaultBootErrorPage: FC<BootErrorPageProps> = ({ step, error }) => {
|
||||
const DefaultBootErrorPage = ({ step, error }: BootErrorPageProps) => {
|
||||
let message = '';
|
||||
if (step === 'load-config') {
|
||||
message = `The configuration failed to load, someone should have a look at this error: ${error.message}`;
|
||||
|
||||
@@ -14,16 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { FC, useEffect, useState } from 'react';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { Snackbar, IconButton } from '@material-ui/core';
|
||||
import CloseIcon from '@material-ui/icons/Close';
|
||||
import { Alert } from '@material-ui/lab';
|
||||
import { AlertMessage, useApi, alertApiRef } from '@backstage/core-api';
|
||||
|
||||
type Props = {};
|
||||
|
||||
// TODO: improve on this and promote to a shared component for use by all apps.
|
||||
export const AlertDisplay: FC<Props> = () => {
|
||||
export const AlertDisplay = () => {
|
||||
const [messages, setMessages] = useState<Array<AlertMessage>>([]);
|
||||
const alertApi = useApi(alertApiRef);
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { FC, useRef, useState, MouseEventHandler } from 'react';
|
||||
import React, { useRef, useState, MouseEventHandler } from 'react';
|
||||
import { IconButton, makeStyles, Tooltip } from '@material-ui/core';
|
||||
import PropTypes from 'prop-types';
|
||||
import CopyIcon from '@material-ui/icons/FileCopy';
|
||||
@@ -56,7 +56,7 @@ const defaultProps = {
|
||||
tooltipText: 'Text copied to clipboard',
|
||||
};
|
||||
|
||||
export const CopyTextButton: FC<Props> = props => {
|
||||
export const CopyTextButton = (props: Props) => {
|
||||
const { text, tooltipDelay, tooltipText } = {
|
||||
...defaultProps,
|
||||
...props,
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
import { ClickAwayListener, makeStyles, Typography } from '@material-ui/core';
|
||||
import React, {
|
||||
FC,
|
||||
PropsWithChildren,
|
||||
useCallback,
|
||||
useEffect,
|
||||
useLayoutEffect,
|
||||
@@ -93,12 +93,12 @@ type Placement = {
|
||||
textWidth: number;
|
||||
};
|
||||
|
||||
export const FeatureCalloutCircular: FC<Props> = ({
|
||||
export const FeatureCalloutCircular = ({
|
||||
featureId,
|
||||
title,
|
||||
description,
|
||||
children,
|
||||
}) => {
|
||||
}: PropsWithChildren<Props>) => {
|
||||
const { show, hide } = useShowCallout(featureId);
|
||||
const portalElement = usePortal('core.callout');
|
||||
const wrapperRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { FC } from 'react';
|
||||
import React, { PropsWithChildren } from 'react';
|
||||
import classNames from 'classnames';
|
||||
import ChevronLeftIcon from '@material-ui/icons/ChevronLeft';
|
||||
import ChevronRightIcon from '@material-ui/icons/ChevronRight';
|
||||
@@ -181,7 +181,7 @@ function useSmoothScroll(
|
||||
return setScrollTarget;
|
||||
}
|
||||
|
||||
export const HorizontalScrollGrid: FC<Props> = props => {
|
||||
export const HorizontalScrollGrid = (props: PropsWithChildren<Props>) => {
|
||||
const {
|
||||
scrollStep = 100,
|
||||
scrollSpeed = 50,
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { FC } from 'react';
|
||||
import React from 'react';
|
||||
import CSS from 'csstype';
|
||||
import { makeStyles } from '@material-ui/core';
|
||||
|
||||
@@ -38,7 +38,7 @@ const useStyles = makeStyles({
|
||||
},
|
||||
});
|
||||
|
||||
export const Lifecycle: FC<Props> = props => {
|
||||
export const Lifecycle = (props: Props) => {
|
||||
const classes = useStyles(props);
|
||||
const { shorthand, alpha } = props;
|
||||
return shorthand ? (
|
||||
|
||||
@@ -14,12 +14,20 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { ComponentProps } from 'react';
|
||||
import { Link as MaterialLink } from '@material-ui/core';
|
||||
import { Link as RouterLink } from 'react-router-dom';
|
||||
import React, { ElementType } from 'react';
|
||||
import {
|
||||
Link as MaterialLink,
|
||||
LinkProps as MaterialLinkProps,
|
||||
} from '@material-ui/core';
|
||||
import {
|
||||
Link as RouterLink,
|
||||
LinkProps as RouterLinkProps,
|
||||
} from 'react-router-dom';
|
||||
|
||||
type Props = ComponentProps<typeof MaterialLink> &
|
||||
ComponentProps<typeof RouterLink> & { component?: React.FC<any> };
|
||||
type Props = MaterialLinkProps &
|
||||
RouterLinkProps & {
|
||||
component?: ElementType<any>;
|
||||
};
|
||||
|
||||
/**
|
||||
* Thin wrapper on top of material-ui's Link component
|
||||
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
Typography,
|
||||
Theme,
|
||||
} from '@material-ui/core';
|
||||
import React, { FC, useState } from 'react';
|
||||
import React, { useState } from 'react';
|
||||
import { PendingAuthRequest } from '@backstage/core-api';
|
||||
|
||||
const useItemStyles = makeStyles<Theme>(theme => ({
|
||||
@@ -37,7 +37,7 @@ type RowProps = {
|
||||
setBusy: (busy: boolean) => void;
|
||||
};
|
||||
|
||||
const LoginRequestListItem: FC<RowProps> = ({ request, busy, setBusy }) => {
|
||||
const LoginRequestListItem = ({ request, busy, setBusy }: RowProps) => {
|
||||
const classes = useItemStyles();
|
||||
const [error, setError] = useState<Error>();
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ import {
|
||||
Theme,
|
||||
Button,
|
||||
} from '@material-ui/core';
|
||||
import React, { FC, useMemo, useState } from 'react';
|
||||
import React, { useMemo, useState } from 'react';
|
||||
import { useObservable } from 'react-use';
|
||||
import LoginRequestListItem from './LoginRequestListItem';
|
||||
import { useApi, oauthRequestApiRef } from '@backstage/core-api';
|
||||
@@ -41,9 +41,7 @@ const useStyles = makeStyles<Theme>(theme => ({
|
||||
},
|
||||
}));
|
||||
|
||||
type OAuthRequestDialogProps = {};
|
||||
|
||||
export const OAuthRequestDialog: FC<OAuthRequestDialogProps> = () => {
|
||||
export const OAuthRequestDialog = () => {
|
||||
const classes = useStyles();
|
||||
const [busy, setBusy] = useState(false);
|
||||
const oauthRequestApi = useApi(oauthRequestApiRef);
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { FC, useState, useEffect } from 'react';
|
||||
import React, { useState, useEffect, PropsWithChildren } from 'react';
|
||||
import { LinearProgress, LinearProgressProps } from '@material-ui/core';
|
||||
|
||||
export const Progress: FC<LinearProgressProps> = props => {
|
||||
export const Progress = (props: PropsWithChildren<LinearProgressProps>) => {
|
||||
const [isVisible, setIsVisible] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
import { makeStyles, useTheme } from '@material-ui/core';
|
||||
import { BackstageTheme } from '@backstage/theme';
|
||||
import { Circle } from 'rc-progress';
|
||||
import React, { FC } from 'react';
|
||||
import React from 'react';
|
||||
|
||||
const useStyles = makeStyles<BackstageTheme>(theme => ({
|
||||
root: {
|
||||
@@ -77,7 +77,7 @@ export function getProgressColor(
|
||||
return palette.status.ok;
|
||||
}
|
||||
|
||||
export const Gauge: FC<Props> = props => {
|
||||
export const Gauge = (props: Props) => {
|
||||
const classes = useStyles(props);
|
||||
const theme = useTheme<BackstageTheme>();
|
||||
const { value, fractional, inverse, unit, max } = {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { FC } from 'react';
|
||||
import React from 'react';
|
||||
import { makeStyles } from '@material-ui/core';
|
||||
import { InfoCard } from '../../layout/InfoCard';
|
||||
import { BottomLinkProps } from '../../layout/BottomLink';
|
||||
@@ -36,7 +36,7 @@ const useStyles = makeStyles({
|
||||
},
|
||||
});
|
||||
|
||||
export const GaugeCard: FC<Props> = props => {
|
||||
export const GaugeCard = (props: Props) => {
|
||||
const classes = useStyles(props);
|
||||
const { title, subheader, progress, deepLink, variant } = props;
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { FC } from 'react';
|
||||
import React from 'react';
|
||||
import { Tooltip, useTheme } from '@material-ui/core';
|
||||
// @ts-ignore
|
||||
import { Line } from 'rc-progress';
|
||||
@@ -28,7 +28,7 @@ type Props = {
|
||||
value: number;
|
||||
};
|
||||
|
||||
export const LinearGauge: FC<Props> = ({ value }) => {
|
||||
export const LinearGauge = ({ value }: Props) => {
|
||||
const theme = useTheme<BackstageTheme>();
|
||||
if (isNaN(value)) {
|
||||
return null;
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
import React, {
|
||||
Children,
|
||||
isValidElement,
|
||||
FC,
|
||||
useState,
|
||||
useEffect,
|
||||
PropsWithChildren,
|
||||
} from 'react';
|
||||
import { Stepper as MuiStepper } from '@material-ui/core';
|
||||
|
||||
@@ -47,12 +47,12 @@ export interface StepperProps {
|
||||
activeStep?: number;
|
||||
}
|
||||
|
||||
export const SimpleStepper: FC<StepperProps> = ({
|
||||
export const SimpleStepper = ({
|
||||
children,
|
||||
elevated,
|
||||
onStepChange,
|
||||
activeStep = 0,
|
||||
}) => {
|
||||
}: PropsWithChildren<StepperProps>) => {
|
||||
const [stepIndex, setStepIndex] = useState<number>(activeStep);
|
||||
const [stepHistory, setStepHistory] = useState<number[]>([0]);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React, { useContext, FC, ReactNode } from 'react';
|
||||
import React, { useContext, ReactNode, PropsWithChildren } from 'react';
|
||||
import { Button, makeStyles } from '@material-ui/core';
|
||||
import { StepActions } from './SimpleStepperStep';
|
||||
import { VerticalStepperContext } from './SimpleStepper';
|
||||
@@ -27,20 +27,33 @@ const useStyles = makeStyles(theme => ({
|
||||
},
|
||||
}));
|
||||
|
||||
export const RestartBtn: FC<{
|
||||
interface CommonBtnProps {
|
||||
text?: string;
|
||||
handleClick?: () => void;
|
||||
stepIndex: number;
|
||||
}> = ({ text, handleClick }) => (
|
||||
<Button onClick={handleClick}>{text || 'Reset'}</Button>
|
||||
);
|
||||
const NextBtn: FC<{
|
||||
text?: string;
|
||||
handleClick?: () => void;
|
||||
}
|
||||
interface RestartBtnProps extends CommonBtnProps {}
|
||||
|
||||
interface NextBtnProps extends CommonBtnProps {
|
||||
disabled?: boolean;
|
||||
last?: boolean;
|
||||
stepIndex: number;
|
||||
}> = ({ text, handleClick, disabled, last, stepIndex }) => (
|
||||
}
|
||||
interface BackBtnProps extends CommonBtnProps {
|
||||
disabled?: boolean;
|
||||
stepIndex: number;
|
||||
}
|
||||
export const RestartBtn = ({ text, handleClick }: RestartBtnProps) => (
|
||||
<Button onClick={handleClick}>{text || 'Reset'}</Button>
|
||||
);
|
||||
|
||||
const NextBtn = ({
|
||||
text,
|
||||
handleClick,
|
||||
disabled,
|
||||
last,
|
||||
stepIndex,
|
||||
}: NextBtnProps) => (
|
||||
<Button
|
||||
variant="contained"
|
||||
color="primary"
|
||||
@@ -51,12 +64,8 @@ const NextBtn: FC<{
|
||||
{text || (last ? 'Finish' : 'Next')}
|
||||
</Button>
|
||||
);
|
||||
const BackBtn: FC<{
|
||||
text?: string;
|
||||
handleClick?: () => void;
|
||||
disabled?: boolean;
|
||||
stepIndex: number;
|
||||
}> = ({ text, handleClick, disabled, stepIndex }) => (
|
||||
|
||||
const BackBtn = ({ text, handleClick, disabled, stepIndex }: BackBtnProps) => (
|
||||
<Button
|
||||
onClick={handleClick}
|
||||
data-testid={`backButton-${stepIndex}`}
|
||||
@@ -71,10 +80,10 @@ export type SimpleStepperFooterProps = {
|
||||
children?: ReactNode;
|
||||
};
|
||||
|
||||
export const SimpleStepperFooter: FC<SimpleStepperFooterProps> = ({
|
||||
export const SimpleStepperFooter = ({
|
||||
actions = {},
|
||||
children,
|
||||
}) => {
|
||||
}: PropsWithChildren<SimpleStepperFooterProps>) => {
|
||||
const classes = useStyles();
|
||||
const {
|
||||
stepperLength,
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React, { FC } from 'react';
|
||||
import React, { PropsWithChildren } from 'react';
|
||||
import {
|
||||
Step as MuiStep,
|
||||
StepContent,
|
||||
@@ -53,13 +53,13 @@ export type StepProps = {
|
||||
actions?: StepActions;
|
||||
};
|
||||
|
||||
export const SimpleStepperStep: FC<StepProps> = ({
|
||||
export const SimpleStepperStep = ({
|
||||
title,
|
||||
children,
|
||||
end,
|
||||
actions,
|
||||
...muiProps
|
||||
}) => {
|
||||
}: PropsWithChildren<StepProps>) => {
|
||||
const classes = useStyles();
|
||||
|
||||
// The end step is not a part of the stepper
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
import { makeStyles } from '@material-ui/core';
|
||||
import { BackstageTheme } from '@backstage/theme';
|
||||
import classNames from 'classnames';
|
||||
import React, { FC } from 'react';
|
||||
import React, { PropsWithChildren } from 'react';
|
||||
|
||||
const useStyles = makeStyles<BackstageTheme>(theme => ({
|
||||
status: {
|
||||
@@ -63,7 +63,7 @@ const useStyles = makeStyles<BackstageTheme>(theme => ({
|
||||
},
|
||||
}));
|
||||
|
||||
export const StatusOK: FC<{}> = props => {
|
||||
export const StatusOK = (props: PropsWithChildren<{}>) => {
|
||||
const classes = useStyles(props);
|
||||
return (
|
||||
<span
|
||||
@@ -74,7 +74,7 @@ export const StatusOK: FC<{}> = props => {
|
||||
);
|
||||
};
|
||||
|
||||
export const StatusWarning: FC<{}> = props => {
|
||||
export const StatusWarning = (props: PropsWithChildren<{}>) => {
|
||||
const classes = useStyles(props);
|
||||
return (
|
||||
<span
|
||||
@@ -85,7 +85,7 @@ export const StatusWarning: FC<{}> = props => {
|
||||
);
|
||||
};
|
||||
|
||||
export const StatusError: FC<{}> = props => {
|
||||
export const StatusError = (props: PropsWithChildren<{}>) => {
|
||||
const classes = useStyles(props);
|
||||
return (
|
||||
<span
|
||||
@@ -96,7 +96,7 @@ export const StatusError: FC<{}> = props => {
|
||||
);
|
||||
};
|
||||
|
||||
export const StatusPending: FC<{}> = props => {
|
||||
export const StatusPending = (props: PropsWithChildren<{}>) => {
|
||||
const classes = useStyles(props);
|
||||
return (
|
||||
<span
|
||||
@@ -107,7 +107,7 @@ export const StatusPending: FC<{}> = props => {
|
||||
);
|
||||
};
|
||||
|
||||
export const StatusRunning: FC<{}> = props => {
|
||||
export const StatusRunning = (props: PropsWithChildren<{}>) => {
|
||||
const classes = useStyles(props);
|
||||
return (
|
||||
<span
|
||||
@@ -118,7 +118,7 @@ export const StatusRunning: FC<{}> = props => {
|
||||
);
|
||||
};
|
||||
|
||||
export const StatusAborted: FC<{}> = props => {
|
||||
export const StatusAborted = (props: PropsWithChildren<{}>) => {
|
||||
const classes = useStyles(props);
|
||||
return (
|
||||
<span
|
||||
|
||||
+2
-2
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React, { FC } from 'react';
|
||||
import React, { PropsWithChildren } from 'react';
|
||||
import { InfoCard } from '../../layout/InfoCard';
|
||||
import { Grid } from '@material-ui/core';
|
||||
import { StructuredMetadataTable } from './StructuredMetadataTable';
|
||||
@@ -43,7 +43,7 @@ export default {
|
||||
component: StructuredMetadataTable,
|
||||
};
|
||||
|
||||
const Wrapper: FC<{}> = ({ children }) => (
|
||||
const Wrapper = ({ children }: PropsWithChildren<{}>) => (
|
||||
<Grid container spacing={4}>
|
||||
<Grid item>{children}</Grid>
|
||||
</Grid>
|
||||
|
||||
@@ -14,7 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { FC, Fragment, useState, MouseEventHandler } from 'react';
|
||||
import React, {
|
||||
Fragment,
|
||||
useState,
|
||||
MouseEventHandler,
|
||||
PropsWithChildren,
|
||||
} from 'react';
|
||||
import {
|
||||
Button,
|
||||
Link,
|
||||
@@ -49,12 +54,12 @@ const useStyles = makeStyles(theme => ({
|
||||
},
|
||||
}));
|
||||
|
||||
export const SupportButton: FC<Props> = ({
|
||||
export const SupportButton = ({
|
||||
slackChannel = '#backstage',
|
||||
email = [],
|
||||
children,
|
||||
// plugin,
|
||||
}) => {
|
||||
}: // plugin,
|
||||
PropsWithChildren<Props>) => {
|
||||
// TODO: get plugin manifest with hook
|
||||
|
||||
const [popoverOpen, setPopoverOpen] = useState(false);
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { FC } from 'react';
|
||||
import React from 'react';
|
||||
import { BackstageTheme } from '@backstage/theme';
|
||||
import { makeStyles } from '@material-ui/core';
|
||||
|
||||
@@ -33,7 +33,7 @@ type SubvalueCellProps = {
|
||||
subvalue: React.ReactNode;
|
||||
};
|
||||
|
||||
export const SubvalueCell: FC<SubvalueCellProps> = ({ value, subvalue }) => {
|
||||
export const SubvalueCell = ({ value, subvalue }: SubvalueCellProps) => {
|
||||
const classes = useSubvalueCellStyles();
|
||||
|
||||
return (
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { FC } from 'react';
|
||||
import React, { PropsWithChildren } from 'react';
|
||||
import { Tabs, makeStyles } from '@material-ui/core';
|
||||
import { BackstageTheme } from '@backstage/theme';
|
||||
|
||||
@@ -40,7 +40,7 @@ const useStyles = makeStyles<BackstageTheme>(theme => ({
|
||||
},
|
||||
}));
|
||||
|
||||
export const StyledTabs: FC<StyledTabsProps> = props => {
|
||||
export const StyledTabs = (props: PropsWithChildren<StyledTabsProps>) => {
|
||||
const classes = useStyles(props);
|
||||
return (
|
||||
<Tabs
|
||||
|
||||
@@ -14,16 +14,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { FC } from 'react';
|
||||
import React, { PropsWithChildren } from 'react';
|
||||
import Box from '@material-ui/core/Box';
|
||||
|
||||
export interface TabPanelProps {
|
||||
children: any;
|
||||
value?: any;
|
||||
index?: number;
|
||||
}
|
||||
|
||||
export const TabPanel: FC<TabPanelProps> = props => {
|
||||
export const TabPanel = (props: PropsWithChildren<TabPanelProps>) => {
|
||||
const { children, value, index, ...other } = props;
|
||||
|
||||
return (
|
||||
|
||||
@@ -14,13 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React, {
|
||||
FC,
|
||||
useRef,
|
||||
useEffect,
|
||||
MutableRefObject,
|
||||
useState,
|
||||
} from 'react';
|
||||
import React, { useRef, useEffect, MutableRefObject, useState } from 'react';
|
||||
import { BackstageTheme } from '@backstage/theme';
|
||||
import { AppBar } from '@material-ui/core';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
@@ -64,7 +58,7 @@ const useStyles = makeStyles<BackstageTheme>(theme => ({
|
||||
},
|
||||
}));
|
||||
|
||||
export const Tabs: FC<TabsProps> = ({ tabs }) => {
|
||||
export const Tabs = ({ tabs }: TabsProps) => {
|
||||
const classes = useStyles();
|
||||
const [value, setValue] = useState([0, 0]); // [selectedChunkedNavIndex, selectedIndex]
|
||||
const [navIndex, setNavIndex] = useState(0);
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { FC } from 'react';
|
||||
import React from 'react';
|
||||
import { Sparklines, SparklinesLine, SparklinesProps } from 'react-sparklines';
|
||||
import { useTheme } from '@material-ui/core';
|
||||
import { BackstageTheme } from '@backstage/theme';
|
||||
@@ -27,7 +27,7 @@ function color(data: number[], theme: BackstageTheme): string | undefined {
|
||||
return theme.palette.status.error;
|
||||
}
|
||||
|
||||
export const TrendLine: FC<SparklinesProps & { title?: string }> = props => {
|
||||
export const TrendLine = (props: SparklinesProps & { title?: string }) => {
|
||||
const theme = useTheme<BackstageTheme>();
|
||||
|
||||
if (!props.data) return null;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { FC } from 'react';
|
||||
import React from 'react';
|
||||
import {
|
||||
ListItem,
|
||||
ListItemIcon,
|
||||
@@ -47,7 +47,7 @@ export type BottomLinkProps = {
|
||||
onClick?: (event: React.MouseEvent<HTMLAnchorElement>) => void;
|
||||
};
|
||||
|
||||
export const BottomLink: FC<BottomLinkProps> = ({ link, title, onClick }) => {
|
||||
export const BottomLink = ({ link, title, onClick }: BottomLinkProps) => {
|
||||
const classes = useStyles();
|
||||
|
||||
return (
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { FC } from 'react';
|
||||
import React, { PropsWithChildren } from 'react';
|
||||
import classNames from 'classnames';
|
||||
import { Theme, makeStyles } from '@material-ui/core';
|
||||
|
||||
@@ -42,13 +42,13 @@ type Props = {
|
||||
className?: string;
|
||||
};
|
||||
|
||||
export const Content: FC<Props> = ({
|
||||
export const Content = ({
|
||||
className,
|
||||
stretch,
|
||||
noPadding,
|
||||
children,
|
||||
...props
|
||||
}) => {
|
||||
}: PropsWithChildren<Props>) => {
|
||||
const classes = useStyles();
|
||||
return (
|
||||
<article
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* TODO favoriteable capability
|
||||
*/
|
||||
|
||||
import React, { ComponentType, Fragment, FC } from 'react';
|
||||
import React, { ComponentType, Fragment, PropsWithChildren } from 'react';
|
||||
import { Typography, makeStyles } from '@material-ui/core';
|
||||
import { Helmet } from 'react-helmet';
|
||||
|
||||
@@ -62,10 +62,10 @@ type DefaultTitleProps = {
|
||||
className: string;
|
||||
};
|
||||
|
||||
const DefaultTitle: FC<DefaultTitleProps> = ({
|
||||
const DefaultTitle = ({
|
||||
title = 'Unknown page',
|
||||
className,
|
||||
}) => (
|
||||
}: DefaultTitleProps) => (
|
||||
<Typography variant="h4" className={className} data-testid="header-title">
|
||||
{title}
|
||||
</Typography>
|
||||
@@ -78,13 +78,13 @@ type ContentHeaderProps = {
|
||||
textAlign?: 'left' | 'right' | 'center';
|
||||
};
|
||||
|
||||
export const ContentHeader: FC<ContentHeaderProps> = ({
|
||||
export const ContentHeader = ({
|
||||
description,
|
||||
title,
|
||||
titleComponent: TitleComponent = undefined,
|
||||
children,
|
||||
textAlign = 'left',
|
||||
}) => {
|
||||
}: PropsWithChildren<ContentHeaderProps>) => {
|
||||
const classes = useStyles({ textAlign })();
|
||||
|
||||
const renderedTitle = TitleComponent ? (
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user