Merge branch 'backstage:master' into master

This commit is contained in:
matteosilv
2022-07-04 15:48:20 +02:00
committed by GitHub
26 changed files with 290 additions and 143 deletions
+1 -1
View File
@@ -33,7 +33,7 @@
"@material-ui/core": "^4.12.2",
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "4.0.0-alpha.57",
"git-url-parse": "^11.6.0",
"git-url-parse": "^12.0.0",
"octokit": "^1.7.1",
"react-markdown": "^8.0.0",
"react-router-dom": "6.0.0-beta.0",
+16
View File
@@ -181,6 +181,22 @@ export type CookieConfigurer = (ctx: {
secure: boolean;
};
// Warning: (ae-missing-release-tag) "createAuthProviderIntegration" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function createAuthProviderIntegration<
TCreateOptions extends unknown[],
TResolvers extends {
[name in string]: (...args: any[]) => SignInResolver<any>;
},
>(config: {
create: (...args: TCreateOptions) => AuthProviderFactory;
resolvers?: TResolvers;
}): Readonly<{
create: (...args: TCreateOptions) => AuthProviderFactory;
resolvers: Readonly<string extends keyof TResolvers ? never : TResolvers>;
}>;
// Warning: (ae-missing-release-tag) "createOriginFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
@@ -28,6 +28,8 @@ export type { GcpIapResult, GcpIapTokenInfo } from './gcp-iap';
export { providers, defaultAuthProviderFactories } from './providers';
export { createAuthProviderIntegration } from './createAuthProviderIntegration';
export type {
AuthProviderConfig,
AuthProviderRouteHandlers,
+36 -2
View File
@@ -11,8 +11,14 @@ endpoint.
## Installation
Install the `@backstage/plugin-badges-backend` package in your backend package,
and then integrate the plugin using the following default setup for
Install the `@backstage/plugin-badges-backend` package in your backend package:
```bash
# From your Backstage root directory
yarn add --cwd packages/backend @backstage/plugin-badges-backend
```
Add the plugin using the following default setup for
`src/plugins/badges.ts`:
```ts
@@ -39,6 +45,34 @@ the badges-backend `createRouter()` to forward to the default badge builder. To
customize the available badges, provide a custom set of badge factories. See
further down for an example of a custom badge factories function.
Finally, you have to make the following changes in `src/index.ts`:
```ts
// 1. import the plugin
import badges from './plugins/badges';
...
const config = await loadBackendConfig({
argv: process.argv,
logger: rootLogger,
});
const createEnv = makeCreateEnv(config);
...
// 2. Create a PluginEnvironment for the Badges plugin
const badgesEnv = useHotMemoize(module, () => createEnv('badges'));
...
const apiRouter = Router();
...
// 3. Register the badges plugin in the router
apiRouter.use('/badges', await badges(badgesEnv));
...
apiRouter.use(notFoundHandler());
```
## Badge builder
Badges are created by classes implementing the `BadgeBuilder` type. The default
@@ -45,7 +45,7 @@
"devDependencies": {
"@backstage/backend-test-utils": "^0.1.26-next.1",
"@backstage/cli": "^0.18.0-next.1",
"openapi-types": "^11.0.1"
"openapi-types": "^12.0.0"
},
"files": [
"dist"
+1 -1
View File
@@ -53,7 +53,7 @@
"express-promise-router": "^4.1.0",
"fast-json-stable-stringify": "^2.1.0",
"fs-extra": "10.1.0",
"git-url-parse": "^11.6.0",
"git-url-parse": "^12.0.0",
"glob": "^7.1.6",
"knex": "^2.0.0",
"lodash": "^4.17.21",
+1 -1
View File
@@ -47,7 +47,7 @@
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "4.0.0-alpha.57",
"@octokit/rest": "^18.5.3",
"git-url-parse": "^11.6.0",
"git-url-parse": "^12.0.0",
"js-base64": "^3.6.0",
"lodash": "^4.17.21",
"react-hook-form": "^7.12.2",
-11
View File
@@ -272,7 +272,6 @@ export type BarChartTooltipProps = {
actions?: ReactNode;
};
// Warning: (tsdoc-characters-after-block-tag) The token "@backstage" looks like a TSDoc tag but contains an invalid character "/"; if it is not a tag, use a backslash to escape the "@"
// Warning: (ae-missing-release-tag) "ChangeStatistic" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public @deprecated (undocumented)
@@ -296,7 +295,6 @@ export type ChartData = {
[key: string]: number;
};
// Warning: (tsdoc-characters-after-block-tag) The token "@backstage" looks like a TSDoc tag but contains an invalid character "/"; if it is not a tag, use a backslash to escape the "@"
// Warning: (ae-missing-release-tag) "Cost" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public @deprecated (undocumented)
@@ -450,7 +448,6 @@ export enum DataKey {
Previous = 'previous',
}
// Warning: (tsdoc-characters-after-block-tag) The token "@backstage" looks like a TSDoc tag but contains an invalid character "/"; if it is not a tag, use a backslash to escape the "@"
// Warning: (ae-missing-release-tag) "DateAggregation" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public @deprecated (undocumented)
@@ -478,7 +475,6 @@ export enum Duration {
// @public (undocumented)
export const EngineerThreshold = 0.5;
// Warning: (tsdoc-characters-after-block-tag) The token "@backstage" looks like a TSDoc tag but contains an invalid character "/"; if it is not a tag, use a backslash to escape the "@"
// Warning: (ae-missing-release-tag) "Entity" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public @deprecated (undocumented)
@@ -506,7 +502,6 @@ export class ExampleCostInsightsClient implements CostInsightsApi {
getUserGroups(userId: string): Promise<Group[]>;
}
// Warning: (tsdoc-characters-after-block-tag) The token "@backstage" looks like a TSDoc tag but contains an invalid character "/"; if it is not a tag, use a backslash to escape the "@"
// Warning: (ae-missing-release-tag) "Group" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public @deprecated (undocumented)
@@ -574,19 +569,16 @@ export type LegendItemProps = {
// @public (undocumented)
export type Loading = Record<string, boolean>;
// Warning: (tsdoc-characters-after-block-tag) The token "@backstage" looks like a TSDoc tag but contains an invalid character "/"; if it is not a tag, use a backslash to escape the "@"
// Warning: (ae-missing-release-tag) "Maybe" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public @deprecated (undocumented)
export type Maybe<T> = common.Maybe<T>;
// Warning: (tsdoc-characters-after-block-tag) The token "@backstage" looks like a TSDoc tag but contains an invalid character "/"; if it is not a tag, use a backslash to escape the "@"
// Warning: (ae-missing-release-tag) "Metric" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public @deprecated (undocumented)
export type Metric = common.Metric;
// Warning: (tsdoc-characters-after-block-tag) The token "@backstage" looks like a TSDoc tag but contains an invalid character "/"; if it is not a tag, use a backslash to escape the "@"
// Warning: (ae-missing-release-tag) "MetricData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public @deprecated (undocumented)
@@ -622,7 +614,6 @@ export interface PageFilters {
project: Maybe_2<string>;
}
// Warning: (tsdoc-characters-after-block-tag) The token "@backstage" looks like a TSDoc tag but contains an invalid character "/"; if it is not a tag, use a backslash to escape the "@"
// Warning: (ae-missing-release-tag) "Product" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public @deprecated (undocumented)
@@ -649,7 +640,6 @@ export interface ProductPeriod {
productType: string;
}
// Warning: (tsdoc-characters-after-block-tag) The token "@backstage" looks like a TSDoc tag but contains an invalid character "/"; if it is not a tag, use a backslash to escape the "@"
// Warning: (ae-missing-release-tag) "Project" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public @deprecated (undocumented)
@@ -711,7 +701,6 @@ export type TooltipItem = {
value: string;
};
// Warning: (tsdoc-characters-after-block-tag) The token "@backstage" looks like a TSDoc tag but contains an invalid character "/"; if it is not a tag, use a backslash to escape the "@"
// Warning: (ae-missing-release-tag) "Trendline" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public @deprecated (undocumented)
+50 -24
View File
@@ -14,30 +14,6 @@
* limitations under the License.
*/
import * as common from '@backstage/plugin-cost-insights-common';
/** * @deprecated use the same type from @backstage/plugin-cost-insights-common instead */
export type ChangeStatistic = common.ChangeStatistic;
/** * @deprecated use the same type from @backstage/plugin-cost-insights-common instead */
export type Cost = common.Cost;
/** * @deprecated use the same type from @backstage/plugin-cost-insights-common instead */
export type DateAggregation = common.DateAggregation;
/** * @deprecated use the same type from @backstage/plugin-cost-insights-common instead */
export type Entity = common.Entity;
/** * @deprecated use the same type from @backstage/plugin-cost-insights-common instead */
export type Group = common.Group;
/** * @deprecated use the same type from @backstage/plugin-cost-insights-common instead */
export type Maybe<T> = common.Maybe<T>;
/** * @deprecated use the same type from @backstage/plugin-cost-insights-common instead */
export type Metric = common.Metric;
/** * @deprecated use the same type from @backstage/plugin-cost-insights-common instead */
export type MetricData = common.MetricData;
/** * @deprecated use the same type from @backstage/plugin-cost-insights-common instead */
export type Product = common.Product;
/** * @deprecated use the same type from @backstage/plugin-cost-insights-common instead */
export type Project = common.Project;
/** * @deprecated use the same type from @backstage/plugin-cost-insights-common instead */
export type Trendline = common.Trendline;
// TODO: Split some of these up into `@backstage/plugin-cost-insights-react` for presentation types
// and `@backstage/plugin-cost-insights-common` for data transfer object types.
export * from './Alert';
@@ -51,3 +27,53 @@ export * from './Filters';
export * from './Icon';
export * from './Loading';
export * from './Theme';
/**
* Deprecated types moved to `@backstage/plugin-cost-insights-common`
*/
import * as common from '@backstage/plugin-cost-insights-common';
/**
* @deprecated use the same type from `@backstage/plugin-cost-insights-common` instead
*/
export type ChangeStatistic = common.ChangeStatistic;
/**
* @deprecated use the same type from `@backstage/plugin-cost-insights-common` instead
*/
export type Cost = common.Cost;
/**
* @deprecated use the same type from `@backstage/plugin-cost-insights-common` instead
*/
export type DateAggregation = common.DateAggregation;
/**
* @deprecated use the same type from `@backstage/plugin-cost-insights-common` instead
*/
export type Entity = common.Entity;
/**
* @deprecated use the same type from `@backstage/plugin-cost-insights-common` instead
*/
export type Group = common.Group;
/**
* @deprecated use the same type from `@backstage/plugin-cost-insights-common` instead
*/
export type Maybe<T> = common.Maybe<T>;
/**
* @deprecated use the same type from `@backstage/plugin-cost-insights-common` instead
*/
export type Metric = common.Metric;
/**
* @deprecated use the same type from `@backstage/plugin-cost-insights-common` instead
*/
export type MetricData = common.MetricData;
/**
* @deprecated use the same type from `@backstage/plugin-cost-insights-common` instead
*/
export type Product = common.Product;
/**
* @deprecated use the same type from `@backstage/plugin-cost-insights-common` instead
*/
export type Project = common.Project;
/**
* @deprecated use the same type from `@backstage/plugin-cost-insights-common` instead
*/
export type Trendline = common.Trendline;
+1 -1
View File
@@ -54,7 +54,7 @@
"express": "^4.17.1",
"express-promise-router": "^4.1.0",
"fs-extra": "10.1.0",
"git-url-parse": "^11.6.0",
"git-url-parse": "^12.0.0",
"globby": "^11.0.0",
"isbinaryfile": "^5.0.0",
"isomorphic-git": "^1.8.0",
+1 -1
View File
@@ -61,7 +61,7 @@
"@types/json-schema": "^7.0.9",
"@uiw/react-codemirror": "^4.9.3",
"classnames": "^2.2.6",
"git-url-parse": "^11.6.0",
"git-url-parse": "^12.0.0",
"humanize-duration": "^3.25.1",
"immer": "^9.0.1",
"json-schema": "^0.4.0",
@@ -44,7 +44,7 @@
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "4.0.0-alpha.57",
"@react-hookz/web": "^14.0.0",
"git-url-parse": "^11.6.0",
"git-url-parse": "^12.0.0",
"react-use": "^17.2.4"
},
"peerDependencies": {
+1 -1
View File
@@ -54,7 +54,7 @@
"aws-sdk": "^2.840.0",
"express": "^4.17.1",
"fs-extra": "10.1.0",
"git-url-parse": "^11.6.0",
"git-url-parse": "^12.0.0",
"js-yaml": "^4.0.0",
"json5": "^2.1.3",
"mime-types": "^2.1.27",
+1 -1
View File
@@ -53,7 +53,7 @@
"@material-ui/styles": "^4.10.0",
"dompurify": "^2.2.9",
"event-source-polyfill": "1.0.25",
"git-url-parse": "^11.6.0",
"git-url-parse": "^12.0.0",
"jss": "~10.8.2",
"lodash": "^4.17.21",
"react-helmet": "6.1.0",