Merge remote-tracking branch 'origin' into github-installations-limit

This commit is contained in:
Brian Fletcher
2021-08-06 13:30:56 +01:00
742 changed files with 24958 additions and 5496 deletions
+112
View File
@@ -1,5 +1,117 @@
# example-app
## 0.2.40
### Patch Changes
- Updated dependencies
- @backstage/cli@0.7.7
- @backstage/plugin-catalog@0.6.10
- @backstage/core-components@0.3.0
- @backstage/core-plugin-api@0.1.5
- @backstage/plugin-api-docs@0.6.5
- @backstage/plugin-scaffolder@0.10.3
- @backstage/plugin-search@0.4.6
- @backstage/plugin-cost-insights@0.11.3
- @backstage/plugin-kubernetes@0.4.10
- @backstage/plugin-lighthouse@0.2.22
- @backstage/plugin-pagerduty@0.3.10
- @backstage/plugin-techdocs@0.10.3
- @backstage/search-common@0.1.3
- @backstage/core-app-api@0.1.7
- @backstage/integration-react@0.1.6
- @backstage/plugin-badges@0.2.7
- @backstage/plugin-catalog-import@0.5.16
- @backstage/plugin-catalog-react@0.4.1
- @backstage/plugin-circleci@0.2.21
- @backstage/plugin-cloudbuild@0.2.21
- @backstage/plugin-code-coverage@0.1.9
- @backstage/plugin-explore@0.3.12
- @backstage/plugin-gcp-projects@0.3.2
- @backstage/plugin-github-actions@0.4.15
- @backstage/plugin-graphiql@0.2.14
- @backstage/plugin-jenkins@0.5.2
- @backstage/plugin-kafka@0.2.13
- @backstage/plugin-newrelic@0.3.2
- @backstage/plugin-org@0.3.19
- @backstage/plugin-rollbar@0.3.11
- @backstage/plugin-sentry@0.3.17
- @backstage/plugin-shortcuts@0.1.6
- @backstage/plugin-tech-radar@0.4.4
- @backstage/plugin-todo@0.1.7
- @backstage/plugin-user-settings@0.3.3
## 0.2.39
### Patch Changes
- Updated dependencies
- @backstage/plugin-scaffolder@0.10.2
- @backstage/core-components@0.2.0
- @backstage/plugin-catalog@0.6.9
- @backstage/plugin-catalog-react@0.4.0
- @backstage/cli@0.7.6
- @backstage/core-app-api@0.1.6
- @backstage/core-plugin-api@0.1.4
- @backstage/integration-react@0.1.5
- @backstage/theme@0.2.9
- @backstage/plugin-api-docs@0.6.4
- @backstage/plugin-badges@0.2.6
- @backstage/plugin-catalog-import@0.5.15
- @backstage/plugin-circleci@0.2.20
- @backstage/plugin-cloudbuild@0.2.20
- @backstage/plugin-code-coverage@0.1.8
- @backstage/plugin-cost-insights@0.11.2
- @backstage/plugin-explore@0.3.11
- @backstage/plugin-gcp-projects@0.3.1
- @backstage/plugin-github-actions@0.4.14
- @backstage/plugin-graphiql@0.2.13
- @backstage/plugin-jenkins@0.5.1
- @backstage/plugin-kafka@0.2.12
- @backstage/plugin-kubernetes@0.4.9
- @backstage/plugin-lighthouse@0.2.21
- @backstage/plugin-newrelic@0.3.1
- @backstage/plugin-org@0.3.18
- @backstage/plugin-pagerduty@0.3.9
- @backstage/plugin-rollbar@0.3.10
- @backstage/plugin-search@0.4.5
- @backstage/plugin-sentry@0.3.16
- @backstage/plugin-shortcuts@0.1.5
- @backstage/plugin-tech-radar@0.4.3
- @backstage/plugin-techdocs@0.10.2
- @backstage/plugin-todo@0.1.6
- @backstage/plugin-user-settings@0.3.2
## 0.2.37
### Patch Changes
- Updated dependencies
- @backstage/plugin-catalog@0.6.7
- @backstage/plugin-catalog-react@0.3.0
- @backstage/plugin-scaffolder@0.10.1
- @backstage/plugin-techdocs@0.10.0
- @backstage/plugin-jenkins@0.5.0
- @backstage/plugin-user-settings@0.3.0
- @backstage/plugin-search@0.4.3
- @backstage/cli@0.7.4
- @backstage/plugin-api-docs@0.6.2
- @backstage/plugin-badges@0.2.5
- @backstage/plugin-catalog-import@0.5.13
- @backstage/plugin-circleci@0.2.19
- @backstage/plugin-cloudbuild@0.2.19
- @backstage/plugin-code-coverage@0.1.7
- @backstage/plugin-explore@0.3.10
- @backstage/plugin-github-actions@0.4.13
- @backstage/plugin-kafka@0.2.11
- @backstage/plugin-kubernetes@0.4.8
- @backstage/plugin-lighthouse@0.2.20
- @backstage/plugin-org@0.3.17
- @backstage/plugin-pagerduty@0.3.8
- @backstage/plugin-rollbar@0.3.9
- @backstage/plugin-sentry@0.3.15
- @backstage/plugin-todo@0.1.5
## 0.2.36
### Patch Changes
+45 -43
View File
@@ -1,52 +1,54 @@
{
"name": "example-app",
"version": "0.2.36",
"version": "0.2.40",
"private": true,
"bundled": true,
"dependencies": {
"@backstage/catalog-model": "^0.9.0",
"@backstage/cli": "^0.7.2",
"@backstage/core-app-api": "^0.1.3",
"@backstage/core-components": "^0.1.5",
"@backstage/core-plugin-api": "^0.1.3",
"@backstage/integration-react": "^0.1.4",
"@backstage/plugin-api-docs": "^0.6.1",
"@backstage/plugin-badges": "^0.2.4",
"@backstage/plugin-catalog": "^0.6.6",
"@backstage/plugin-catalog-import": "^0.5.12",
"@backstage/plugin-catalog-react": "^0.2.6",
"@backstage/plugin-circleci": "^0.2.18",
"@backstage/plugin-cloudbuild": "^0.2.18",
"@backstage/plugin-code-coverage": "^0.1.6",
"@backstage/plugin-cost-insights": "^0.11.0",
"@backstage/plugin-explore": "^0.3.9",
"@backstage/plugin-gcp-projects": "^0.3.0",
"@backstage/plugin-github-actions": "^0.4.12",
"@backstage/plugin-graphiql": "^0.2.12",
"@backstage/plugin-jenkins": "^0.4.7",
"@backstage/plugin-kafka": "^0.2.10",
"@backstage/plugin-kubernetes": "^0.4.7",
"@backstage/plugin-lighthouse": "^0.2.19",
"@backstage/plugin-newrelic": "^0.3.0",
"@backstage/plugin-org": "^0.3.16",
"@backstage/plugin-pagerduty": "0.3.7",
"@backstage/plugin-rollbar": "^0.3.8",
"@backstage/plugin-scaffolder": "^0.10.0",
"@backstage/plugin-search": "^0.4.2",
"@backstage/plugin-sentry": "^0.3.14",
"@backstage/plugin-shortcuts": "^0.1.4",
"@backstage/plugin-tech-radar": "^0.4.1",
"@backstage/plugin-techdocs": "^0.9.9",
"@backstage/plugin-todo": "^0.1.4",
"@backstage/plugin-user-settings": "^0.2.12",
"@backstage/theme": "^0.2.8",
"@material-ui/core": "^4.11.0",
"@backstage/cli": "^0.7.7",
"@backstage/core-app-api": "^0.1.7",
"@backstage/core-components": "^0.3.0",
"@backstage/core-plugin-api": "^0.1.5",
"@backstage/integration-react": "^0.1.6",
"@backstage/plugin-api-docs": "^0.6.5",
"@backstage/plugin-badges": "^0.2.7",
"@backstage/plugin-catalog": "^0.6.10",
"@backstage/plugin-catalog-import": "^0.5.16",
"@backstage/plugin-catalog-react": "^0.4.1",
"@backstage/plugin-circleci": "^0.2.21",
"@backstage/plugin-cloudbuild": "^0.2.21",
"@backstage/plugin-code-coverage": "^0.1.9",
"@backstage/plugin-cost-insights": "^0.11.3",
"@backstage/plugin-explore": "^0.3.12",
"@backstage/plugin-gcp-projects": "^0.3.2",
"@backstage/plugin-github-actions": "^0.4.15",
"@backstage/plugin-graphiql": "^0.2.14",
"@backstage/plugin-jenkins": "^0.5.2",
"@backstage/plugin-kafka": "^0.2.13",
"@backstage/plugin-kubernetes": "^0.4.10",
"@backstage/plugin-lighthouse": "^0.2.22",
"@backstage/plugin-newrelic": "^0.3.2",
"@backstage/plugin-org": "^0.3.19",
"@backstage/plugin-pagerduty": "0.3.10",
"@backstage/plugin-rollbar": "^0.3.11",
"@backstage/plugin-scaffolder": "^0.10.3",
"@backstage/plugin-search": "^0.4.6",
"@backstage/plugin-sentry": "^0.3.17",
"@backstage/plugin-shortcuts": "^0.1.6",
"@backstage/plugin-tech-radar": "^0.4.4",
"@backstage/plugin-techdocs": "^0.10.3",
"@backstage/plugin-todo": "^0.1.7",
"@backstage/plugin-user-settings": "^0.3.3",
"@backstage/search-common": "^0.1.3",
"@backstage/theme": "^0.2.9",
"@material-ui/core": "^4.12.2",
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "4.0.0-alpha.45",
"@octokit/rest": "^18.5.3",
"@roadiehq/backstage-plugin-buildkite": "^1.0.4",
"@roadiehq/backstage-plugin-github-insights": "^1.1.15",
"@roadiehq/backstage-plugin-github-pull-requests": "^1.0.8",
"@roadiehq/backstage-plugin-travis-ci": "^1.0.4",
"@roadiehq/backstage-plugin-buildkite": "^1.0.6",
"@roadiehq/backstage-plugin-github-insights": "^1.1.20",
"@roadiehq/backstage-plugin-github-pull-requests": "^1.0.10",
"@roadiehq/backstage-plugin-travis-ci": "^1.0.8",
"history": "^5.0.0",
"prop-types": "^15.7.2",
"react": "^16.12.0",
@@ -58,7 +60,7 @@
"zen-observable": "^0.8.15"
},
"devDependencies": {
"@backstage/test-utils": "^0.1.14",
"@backstage/test-utils": "^0.1.16",
"@testing-library/cypress": "^7.0.1",
"@testing-library/jest-dom": "^5.10.1",
"@testing-library/react": "^11.2.5",
@@ -66,7 +68,7 @@
"@types/jest": "^26.0.7",
"@types/jquery": "^3.3.34",
"@types/node": "^14.14.32",
"@types/react-dom": "^16.9.8",
"@types/react-dom": "*",
"@types/zen-observable": "^0.8.0",
"cross-env": "^7.0.0",
"cypress": "^7.3.0",
@@ -40,6 +40,8 @@ import {
isKind,
EntityHasResourcesCard,
EntityOrphanWarning,
EntityProcessingErrorsPanel,
hasCatalogProcessingErrors,
isOrphan,
} from '@backstage/plugin-catalog';
import {
@@ -135,6 +137,13 @@ const EntityLayoutWrapper = (props: { children?: ReactNode }) => {
);
};
/**
* NOTE: This page is designed to work on small screens such as mobile devices.
* This is based on Material UI Grid. If breakpoints are used, each grid item must set the `xs` prop to a column size or to `true`,
* since this does not default. If no breakpoints are used, the items will equitably share the asvailable space.
* https://material-ui.com/components/grid/#basic-grid.
*/
export const cicdContent = (
<EntitySwitch>
<EntitySwitch.Case if={isJenkinsAvailable}>
@@ -224,6 +233,14 @@ const overviewContent = (
</EntitySwitch.Case>
</EntitySwitch>
<EntitySwitch>
<EntitySwitch.Case if={hasCatalogProcessingErrors}>
<Grid item xs={12}>
<EntityProcessingErrorsPanel />
</Grid>
</EntitySwitch.Case>
</EntitySwitch>
<Grid item md={8} xs={12}>
<EntityAboutCard variant="gridItem" />
</Grid>
@@ -292,10 +309,10 @@ const serviceEntityPage = (
<EntityLayout.Route path="/api" title="API">
<Grid container spacing={3} alignItems="stretch">
<Grid item md={6}>
<Grid item xs={12} md={6}>
<EntityProvidedApisCard />
</Grid>
<Grid item md={6}>
<Grid item xs={12} md={6}>
<EntityConsumedApisCard />
</Grid>
</Grid>
@@ -303,10 +320,10 @@ const serviceEntityPage = (
<EntityLayout.Route path="/dependencies" title="Dependencies">
<Grid container spacing={3} alignItems="stretch">
<Grid item md={6}>
<Grid item xs={12} md={6}>
<EntityDependsOnComponentsCard variant="gridItem" />
</Grid>
<Grid item md={6}>
<Grid item xs={12} md={6}>
<EntityDependsOnResourcesCard variant="gridItem" />
</Grid>
</Grid>
@@ -431,15 +448,17 @@ const apiPage = (
<EntityLayoutWrapper>
<EntityLayout.Route path="/" title="Overview">
<Grid container spacing={3}>
<Grid item md={6}>
<Grid item xs={12}>
<EntityAboutCard />
</Grid>
<Grid container item md={12}>
<Grid item md={6}>
<EntityProvidingComponentsCard />
</Grid>
<Grid item md={6}>
<EntityConsumingComponentsCard />
<Grid item xs={12}>
<Grid container>
<Grid item xs={12} md={6}>
<EntityProvidingComponentsCard />
</Grid>
<Grid item xs={12} md={6}>
<EntityConsumingComponentsCard />
</Grid>
</Grid>
</Grid>
</Grid>
@@ -14,35 +14,88 @@
* limitations under the License.
*/
import React from 'react';
import React, { useState } from 'react';
import { makeStyles, Theme, Grid, List, Paper } from '@material-ui/core';
import Pagination from '@material-ui/lab/Pagination';
import { CatalogResultListItem } from '@backstage/plugin-catalog';
import {
SearchBar,
SearchFilter,
SearchResult,
SearchType,
DefaultResultListItem,
} from '@backstage/plugin-search';
import { Content, Header, Lifecycle, Page } from '@backstage/core-components';
import { DocsResultListItem } from '@backstage/plugin-techdocs';
import { SearchResultSet } from '@backstage/search-common';
const useStyles = makeStyles((theme: Theme) => ({
bar: {
padding: theme.spacing(1, 0),
},
filters: {
padding: theme.spacing(2),
},
filter: {
'& + &': {
marginTop: theme.spacing(2.5),
},
},
filters: {
padding: theme.spacing(2),
},
}));
// TODO: Move this into the search plugin once pagination is natively supported.
// See: https://github.com/backstage/backstage/issues/6062
const SearchResultList = ({ results }: SearchResultSet) => {
const pageSize = 10;
const [page, setPage] = useState(1);
const changePage = (_: any, pageIndex: number) => {
setPage(pageIndex);
};
const pageAmount = Math.ceil((results.length || 0) / pageSize);
return (
<>
<List>
{results
.slice(pageSize * (page - 1), pageSize * page)
.map(({ type, document }) => {
switch (type) {
case 'software-catalog':
return (
<CatalogResultListItem
key={document.location}
result={document}
/>
);
case 'techdocs':
return (
<DocsResultListItem
key={document.location}
result={document}
/>
);
default:
return (
<DefaultResultListItem
key={document.location}
result={document}
/>
);
}
})}
</List>
<Pagination
count={pageAmount}
page={page}
onChange={changePage}
showFirstButton
showLastButton
/>
</>
);
};
const SearchPage = () => {
const classes = useStyles();
return (
<Page themeId="home">
<Header title="Search" subtitle={<Lifecycle alpha />} />
@@ -55,6 +108,11 @@ const SearchPage = () => {
</Grid>
<Grid item xs={3}>
<Paper className={classes.filters}>
<SearchType
values={['techdocs', 'software-catalog']}
name="type"
defaultValue="software-catalog"
/>
<SearchFilter.Select
className={classes.filter}
name="kind"
@@ -69,28 +127,7 @@ const SearchPage = () => {
</Grid>
<Grid item xs={9}>
<SearchResult>
{({ results }) => (
<List>
{results.map(({ type, document }) => {
switch (type) {
case 'software-catalog':
return (
<CatalogResultListItem
key={document.location}
result={document}
/>
);
default:
return (
<DefaultResultListItem
key={document.location}
result={document}
/>
);
}
})}
</List>
)}
{({ results }) => <SearchResultList results={results} />}
</SearchResult>
</Grid>
</Grid>
+49
View File
@@ -1,5 +1,54 @@
# @backstage/backend-common
## 0.8.8
### Patch Changes
- 6aa7c3db7: bump node-tar version to the latest
- Updated dependencies
- @backstage/config@0.1.6
- @backstage/integration@0.5.9
- @backstage/config-loader@0.6.6
## 0.8.7
### Patch Changes
- f25357273: Implement the etag functionality in the `readUrl` method of `FetchUrlReader`.
- bdd6ab5f1: It's possible to customize the request logging handler when building the service. For example in your `backend`
```
const service = createServiceBuilder(module)
.loadConfig(config)
.setRequestLoggingHandler((logger?: Logger): RequestHandler => {
const actualLogger = (logger || getRootLogger()).child({
type: 'incomingRequest',
});
return expressWinston.logger({ ...
```
## 0.8.6
### Patch Changes
- 5f6f2fd96: Support a `ensureExists` config option to skip ensuring a configured database exists. This allows deployment scenarios where
limited permissions are given for provisioned databases without privileges to create new databases. If set to `false`, the
database connection will not be validated prior to use which means the backend will not attempt to create the database if it
doesn't exist. You can configure this in your app-config.yaml:
```yaml
backend:
database:
ensureExists: false
```
This defaults to `true` if unspecified. You can also configure this per plugin connection and will override the base option.
- ad93bb035: Document the default behavior of `statusCheck` option in `createStatusCheckRouter`.
- ae84b20cf: Revert the upgrade to `fs-extra@10.0.0` as that seemed to have broken all installs inexplicably.
- Updated dependencies
- @backstage/config-loader@0.6.5
## 0.8.5
### Patch Changes
+149
View File
@@ -32,6 +32,8 @@ import { Server } from 'http';
import * as winston from 'winston';
import { Writable } from 'stream';
// Warning: (ae-missing-release-tag) "AzureUrlReader" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export class AzureUrlReader implements UrlReader {
constructor(
@@ -40,20 +42,31 @@ export class AzureUrlReader implements UrlReader {
treeResponseFactory: ReadTreeResponseFactory;
},
);
// Warning: (ae-forgotten-export) The symbol "ReaderFactory" needs to be exported by the entry point index.d.ts
//
// (undocumented)
static factory: ReaderFactory;
// (undocumented)
read(url: string): Promise<Buffer>;
// Warning: (ae-forgotten-export) The symbol "ReadTreeOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
readTree(url: string, options?: ReadTreeOptions): Promise<ReadTreeResponse>;
// Warning: (ae-forgotten-export) The symbol "ReadUrlOptions" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "ReadUrlResponse" needs to be exported by the entry point index.d.ts
//
// (undocumented)
readUrl(url: string, _options?: ReadUrlOptions): Promise<ReadUrlResponse>;
// Warning: (ae-forgotten-export) The symbol "SearchOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
search(url: string, options?: SearchOptions): Promise<SearchResponse>;
// (undocumented)
toString(): string;
}
// Warning: (ae-missing-release-tag) "BitbucketUrlReader" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export class BitbucketUrlReader implements UrlReader {
constructor(
@@ -76,60 +89,92 @@ export class BitbucketUrlReader implements UrlReader {
toString(): string;
}
// Warning: (ae-missing-release-tag) "CacheClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export interface CacheClient {
delete(key: string): Promise<void>;
get(key: string): Promise<JsonValue | undefined>;
// Warning: (ae-forgotten-export) The symbol "CacheSetOptions" needs to be exported by the entry point index.d.ts
set(key: string, value: JsonValue, options?: CacheSetOptions): Promise<void>;
}
// Warning: (ae-missing-release-tag) "CacheManager" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export class CacheManager {
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
forPlugin(pluginId: string): PluginCacheManager;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (ae-forgotten-export) The symbol "CacheManagerOptions" needs to be exported by the entry point index.d.ts
static fromConfig(
config: Config,
options?: CacheManagerOptions,
): CacheManager;
}
// Warning: (ae-missing-release-tag) "coloredFormat" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const coloredFormat: winston.Logform.Format;
// Warning: (ae-missing-release-tag) "ContainerRunner" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface ContainerRunner {
// (undocumented)
runContainer(opts: RunContainerOptions): Promise<void>;
}
// Warning: (ae-missing-release-tag) "createDatabase" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public @deprecated
export const createDatabase: typeof createDatabaseClient;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (ae-missing-release-tag) "createDatabaseClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function createDatabaseClient(
dbConfig: Config,
overrides?: Partial<Knex.Config>,
): Knex<any, unknown[]>;
// Warning: (ae-missing-release-tag) "createRootLogger" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function createRootLogger(
options?: winston.LoggerOptions,
env?: NodeJS.ProcessEnv,
): winston.Logger;
// Warning: (ae-forgotten-export) The symbol "ServiceBuilderImpl" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "createServiceBuilder" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function createServiceBuilder(_module: NodeModule): ServiceBuilderImpl;
// Warning: (ae-forgotten-export) The symbol "StatusCheckRouterOptions" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "createStatusCheckRouter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function createStatusCheckRouter(
options: StatusCheckRouterOptions,
): Promise<express.Router>;
// Warning: (ae-missing-release-tag) "DatabaseManager" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export class DatabaseManager {
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
forPlugin(pluginId: string): PluginDatabaseManager;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
static fromConfig(config: Config): DatabaseManager;
}
// Warning: (ae-missing-release-tag) "DockerContainerRunner" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export class DockerContainerRunner implements ContainerRunner {
constructor({ dockerClient }: { dockerClient: Docker });
@@ -142,20 +187,27 @@ export class DockerContainerRunner implements ContainerRunner {
mountDirs,
workingDir,
envVars,
pullImage,
}: RunContainerOptions): Promise<void>;
}
// Warning: (ae-missing-release-tag) "ensureDatabaseExists" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function ensureDatabaseExists(
dbConfig: Config,
...databases: Array<string>
): Promise<void>;
// Warning: (ae-missing-release-tag) "errorHandler" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function errorHandler(
options?: ErrorHandlerOptions,
): ErrorRequestHandler;
// Warning: (ae-missing-release-tag) "ErrorHandlerOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type ErrorHandlerOptions = {
showStackTraces?: boolean;
@@ -163,12 +215,18 @@ export type ErrorHandlerOptions = {
logClientErrors?: boolean;
};
// Warning: (ae-missing-release-tag) "getRootLogger" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function getRootLogger(): winston.Logger;
// Warning: (ae-missing-release-tag) "getVoidLogger" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function getVoidLogger(): winston.Logger;
// Warning: (ae-missing-release-tag) "Git" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export class Git {
// (undocumented)
@@ -273,6 +331,8 @@ export class Git {
resolveRef({ dir, ref }: { dir: string; ref: string }): Promise<string>;
}
// Warning: (ae-missing-release-tag) "GithubUrlReader" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export class GithubUrlReader implements UrlReader {
constructor(
@@ -296,6 +356,8 @@ export class GithubUrlReader implements UrlReader {
toString(): string;
}
// Warning: (ae-missing-release-tag) "GitlabUrlReader" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export class GitlabUrlReader implements UrlReader {
constructor(
@@ -320,28 +382,41 @@ export class GitlabUrlReader implements UrlReader {
export { isChildPath };
// Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "loadBackendConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function loadBackendConfig(options: Options): Promise<Config>;
// Warning: (ae-missing-release-tag) "notFoundHandler" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function notFoundHandler(): RequestHandler;
// Warning: (ae-missing-release-tag) "PluginCacheManager" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type PluginCacheManager = {
getClient: (options?: ClientOptions) => CacheClient;
};
// Warning: (ae-missing-release-tag) "PluginDatabaseManager" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export interface PluginDatabaseManager {
getClient(): Promise<Knex>;
}
// Warning: (ae-missing-release-tag) "PluginEndpointDiscovery" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type PluginEndpointDiscovery = {
getBaseUrl(pluginId: string): Promise<string>;
getExternalBaseUrl(pluginId: string): Promise<string>;
};
// Warning: (ae-missing-release-tag) "ReadTreeResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type ReadTreeResponse = {
files(): Promise<ReadTreeResponseFile[]>;
@@ -350,21 +425,41 @@ export type ReadTreeResponse = {
etag: string;
};
// Warning: (ae-missing-release-tag) "ReadTreeResponseFile" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type ReadTreeResponseFile = {
path: string;
content(): Promise<Buffer>;
};
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (ae-missing-release-tag) "requestLoggingHandler" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function requestLoggingHandler(logger?: Logger_2): RequestHandler;
// Warning: (ae-missing-release-tag) "RequestLoggingHandlerFactory" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type RequestLoggingHandlerFactory = (
logger?: Logger_2,
) => RequestHandler;
// Warning: (ae-missing-release-tag) "resolvePackagePath" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function resolvePackagePath(name: string, ...paths: string[]): string;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (ae-missing-release-tag) "resolveSafeChildPath" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function resolveSafeChildPath(base: string, path: string): string;
// Warning: (ae-missing-release-tag) "RunContainerOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type RunContainerOptions = {
imageName: string;
@@ -374,20 +469,27 @@ export type RunContainerOptions = {
mountDirs?: Record<string, string>;
workingDir?: string;
envVars?: Record<string, string>;
pullImage?: boolean;
};
// Warning: (ae-missing-release-tag) "SearchResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type SearchResponse = {
files: SearchResponseFile[];
etag: string;
};
// Warning: (ae-missing-release-tag) "SearchResponseFile" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type SearchResponseFile = {
url: string;
content(): Promise<Buffer>;
};
// Warning: (ae-missing-release-tag) "ServiceBuilder" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type ServiceBuilder = {
loadConfig(config: ConfigReader): ServiceBuilder;
@@ -397,15 +499,24 @@ export type ServiceBuilder = {
enableCors(options: cors.CorsOptions): ServiceBuilder;
setHttpsSettings(settings: HttpsSettings): ServiceBuilder;
addRouter(root: string, router: Router | RequestHandler): ServiceBuilder;
setRequestLoggingHandler(
requestLoggingHandler: RequestLoggingHandlerFactory,
): ServiceBuilder;
start(): Promise<Server>;
};
// Warning: (ae-missing-release-tag) "setRootLogger" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function setRootLogger(newLogger: winston.Logger): void;
// Warning: (ae-missing-release-tag) "SingleConnectionDatabaseManager" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public @deprecated
export const SingleConnectionDatabaseManager: typeof DatabaseManager;
// Warning: (ae-missing-release-tag) "SingleHostDiscovery" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export class SingleHostDiscovery implements PluginEndpointDiscovery {
static fromConfig(
@@ -420,19 +531,28 @@ export class SingleHostDiscovery implements PluginEndpointDiscovery {
getExternalBaseUrl(pluginId: string): Promise<string>;
}
// Warning: (ae-missing-release-tag) "StatusCheck" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type StatusCheck = () => Promise<any>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (ae-missing-release-tag) "statusCheckHandler" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function statusCheckHandler(
options?: StatusCheckHandlerOptions,
): Promise<RequestHandler>;
// Warning: (ae-missing-release-tag) "StatusCheckHandlerOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface StatusCheckHandlerOptions {
statusCheck?: StatusCheck;
}
// Warning: (ae-missing-release-tag) "UrlReader" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type UrlReader = {
read(url: string): Promise<Buffer>;
@@ -441,20 +561,49 @@ export type UrlReader = {
search(url: string, options?: SearchOptions): Promise<SearchResponse>;
};
// Warning: (ae-missing-release-tag) "UrlReaders" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export class UrlReaders {
// Warning: (ae-forgotten-export) The symbol "CreateOptions" needs to be exported by the entry point index.d.ts
static create({ logger, config, factories }: CreateOptions): UrlReader;
static default({ logger, config, factories }: CreateOptions): UrlReader;
}
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (ae-missing-release-tag) "useHotCleanup" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function useHotCleanup(
_module: NodeModule,
cancelEffect: () => void,
): void;
// Warning: (tsdoc-undefined-tag) The TSDoc tag "@warning" is not defined in this configuration
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (ae-missing-release-tag) "useHotMemoize" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function useHotMemoize<T>(_module: NodeModule, valueFactory: () => T): T;
// Warnings were encountered during analysis:
//
// src/cache/types.d.ts:34:5 - (ae-forgotten-export) The symbol "ClientOptions" needs to be exported by the entry point index.d.ts
// src/middleware/errorHandler.d.ts:17:26 - (tsdoc-malformed-html-name) Invalid HTML element: A space is not allowed here
// src/reading/AzureUrlReader.d.ts:9:9 - (ae-forgotten-export) The symbol "ReadTreeResponseFactory" needs to be exported by the entry point index.d.ts
// src/reading/types.d.ts:106:5 - (ae-forgotten-export) The symbol "ReadTreeResponseDirOptions" needs to be exported by the entry point index.d.ts
// src/service/types.d.ts:12:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// src/service/types.d.ts:22:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// src/service/types.d.ts:30:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// src/service/types.d.ts:38:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// src/service/types.d.ts:47:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// src/service/types.d.ts:55:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// src/service/types.d.ts:57:5 - (ae-forgotten-export) The symbol "HttpsSettings" needs to be exported by the entry point index.d.ts
// src/service/types.d.ts:61:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// src/service/types.d.ts:62:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// src/service/types.d.ts:70:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// (No @packageDocumentation comment for this package)
```
+7 -7
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-common",
"description": "Common functionality library for Backstage backends",
"version": "0.8.5",
"version": "0.8.8",
"main": "src/index.ts",
"types": "src/index.ts",
"private": false,
@@ -30,10 +30,10 @@
},
"dependencies": {
"@backstage/cli-common": "^0.1.2",
"@backstage/config": "^0.1.5",
"@backstage/config-loader": "^0.6.4",
"@backstage/config": "^0.1.6",
"@backstage/config-loader": "^0.6.6",
"@backstage/errors": "^0.1.1",
"@backstage/integration": "^0.5.8",
"@backstage/integration": "^0.5.9",
"@google-cloud/storage": "^5.8.0",
"@octokit/rest": "^18.5.3",
"@types/cors": "^2.8.6",
@@ -62,7 +62,7 @@
"raw-body": "^2.4.1",
"selfsigned": "^1.10.7",
"stoppable": "^1.1.0",
"tar": "^6.0.5",
"tar": "^6.1.2",
"unzipper": "^0.10.11",
"winston": "^3.2.1",
"yn": "^4.0.0"
@@ -76,8 +76,8 @@
}
},
"devDependencies": {
"@backstage/cli": "^0.7.3",
"@backstage/test-utils": "^0.1.12",
"@backstage/cli": "^0.7.7",
"@backstage/test-utils": "^0.1.15",
"@types/archiver": "^5.1.0",
"@types/compression": "^1.7.0",
"@types/concat-stream": "^1.6.0",
@@ -15,12 +15,16 @@
*/
import { ConfigReader } from '@backstage/config';
import { NotFoundError, NotModifiedError } from '@backstage/errors';
import { msw } from '@backstage/test-utils';
import { rest } from 'msw';
import { setupServer } from 'msw/node';
import { getVoidLogger } from '../logging';
import { FetchUrlReader } from './FetchUrlReader';
import { DefaultReadTreeResponseFactory } from './tree';
const fetchUrlReader = new FetchUrlReader();
describe('FetchUrlReader', () => {
const worker = setupServer();
@@ -30,6 +34,39 @@ describe('FetchUrlReader', () => {
jest.clearAllMocks();
});
beforeEach(() => {
worker.use(
rest.get('https://backstage.io/some-resource', (req, res, ctx) => {
if (req.headers.get('if-none-match') === 'foo') {
return res(
ctx.status(304),
ctx.set('Content-Type', 'text/plain'),
ctx.set('etag', 'foo'),
);
}
return res(
ctx.status(200),
ctx.set('Content-Type', 'text/plain'),
ctx.set('etag', 'foo'),
ctx.body('content foo'),
);
}),
);
worker.use(
rest.get('https://backstage.io/not-exists', (_req, res, ctx) => {
return res(ctx.status(404));
}),
);
worker.use(
rest.get('https://backstage.io/error', (_req, res, ctx) => {
return res(ctx.status(500), ctx.body('An internal error occured'));
}),
);
});
it('factory should create a single entry with a predicate that matches config', async () => {
const entries = FetchUrlReader.factory({
config: new ConfigReader({
@@ -70,4 +107,55 @@ describe('FetchUrlReader', () => {
expect(predicate(new URL('https://a.examples.org:700/test'))).toBe(true);
expect(predicate(new URL('https://a.b.examples.org:700/test'))).toBe(true);
});
describe('read', () => {
it('should return etag from the response', async () => {
const buffer = await fetchUrlReader.read(
'https://backstage.io/some-resource',
);
expect(buffer.toString()).toBe('content foo');
});
it('should throw NotFound if server responds with 404', async () => {
await expect(
fetchUrlReader.read('https://backstage.io/not-exists'),
).rejects.toThrow(NotFoundError);
});
it('should throw Error if server responds with 500', async () => {
await expect(
fetchUrlReader.read('https://backstage.io/error'),
).rejects.toThrow(Error);
});
});
describe('readUrl', () => {
it('should throw NotModified if server responds with 304', async () => {
await expect(
fetchUrlReader.readUrl('https://backstage.io/some-resource', {
etag: 'foo',
}),
).rejects.toThrow(NotModifiedError);
});
it('should return etag from the response', async () => {
const response = await fetchUrlReader.readUrl(
'https://backstage.io/some-resource',
);
expect(response.etag).toBe('foo');
expect((await response.buffer()).toString()).toEqual('content foo');
});
it('should throw NotFound if server responds with 404', async () => {
await expect(
fetchUrlReader.readUrl('https://backstage.io/not-exists'),
).rejects.toThrow(NotFoundError);
});
it('should throw Error if server responds with 500', async () => {
await expect(
fetchUrlReader.readUrl('https://backstage.io/error'),
).rejects.toThrow(Error);
});
});
});
@@ -14,8 +14,8 @@
* limitations under the License.
*/
import { NotFoundError, NotModifiedError } from '@backstage/errors';
import fetch from 'cross-fetch';
import { NotFoundError } from '@backstage/errors';
import {
ReaderFactory,
ReadTreeResponse,
@@ -57,15 +57,34 @@ export class FetchUrlReader implements UrlReader {
};
async read(url: string): Promise<Buffer> {
const response = await this.readUrl(url);
return response.buffer();
}
async readUrl(
url: string,
options?: ReadUrlOptions,
): Promise<ReadUrlResponse> {
let response: Response;
try {
response = await fetch(url);
response = await fetch(url, {
headers: {
...(options?.etag && { 'If-None-Match': options.etag }),
},
});
} catch (e) {
throw new Error(`Unable to read ${url}, ${e}`);
}
if (response.status === 304) {
throw new NotModifiedError();
}
if (response.ok) {
return Buffer.from(await response.text());
return {
buffer: async () => Buffer.from(await response.text()),
etag: response.headers.get('ETag') ?? undefined,
};
}
const message = `could not read ${url}, ${response.status} ${response.statusText}`;
@@ -75,15 +94,6 @@ export class FetchUrlReader implements UrlReader {
throw new Error(message);
}
async readUrl(
url: string,
_options?: ReadUrlOptions,
): Promise<ReadUrlResponse> {
// TODO etag is not implemented yet.
const buffer = await this.read(url);
return { buffer: async () => buffer };
}
async readTree(): Promise<ReadTreeResponse> {
throw new Error('FetchUrlReader does not implement readTree');
}
@@ -52,7 +52,11 @@ export class UrlReaderPredicateMux implements UrlReader {
}
}
throw new NotAllowedError(`Reading from '${url}' is not allowed`);
throw new NotAllowedError(
`Reading from '${url}' is not allowed. ` +
`You may need to configure an integration for the target host, or add it ` +
`to the configured list of allowed hosts at 'backend.reading.allow'`,
);
}
async readUrl(
+1 -1
View File
@@ -16,4 +16,4 @@
export { createServiceBuilder } from './createServiceBuilder';
export { createStatusCheckRouter } from './createStatusCheckRouter';
export type { ServiceBuilder } from './types';
export type { ServiceBuilder, RequestLoggingHandlerFactory } from './types';
@@ -27,9 +27,9 @@ import { getRootLogger } from '../../logging';
import {
errorHandler,
notFoundHandler,
requestLoggingHandler,
requestLoggingHandler as defaultRequestLoggingHandler,
} from '../../middleware';
import { ServiceBuilder } from '../types';
import { RequestLoggingHandlerFactory, ServiceBuilder } from '../types';
import {
CspOptions,
HttpsSettings,
@@ -65,6 +65,7 @@ export class ServiceBuilderImpl implements ServiceBuilder {
private cspOptions: Record<string, string[] | false> | undefined;
private httpsSettings: HttpsSettings | undefined;
private routers: [string, Router][];
private requestLoggingHandler: RequestLoggingHandlerFactory | undefined;
// Reference to the module where builder is created - needed for hot module
// reloading
private module: NodeModule;
@@ -144,6 +145,13 @@ export class ServiceBuilderImpl implements ServiceBuilder {
return this;
}
setRequestLoggingHandler(
requestLoggingHandler: RequestLoggingHandlerFactory,
) {
this.requestLoggingHandler = requestLoggingHandler;
return this;
}
async start(): Promise<http.Server> {
const app = express();
const {
@@ -160,7 +168,9 @@ export class ServiceBuilderImpl implements ServiceBuilder {
app.use(cors(corsOptions));
}
app.use(compression());
app.use(requestLoggingHandler(logger));
app.use(
(this.requestLoggingHandler ?? defaultRequestLoggingHandler)(logger),
);
for (const [root, route] of this.routers) {
app.use(root, route);
}
@@ -85,8 +85,21 @@ export type ServiceBuilder = {
*/
addRouter(root: string, router: Router | RequestHandler): ServiceBuilder;
/**
* Set the request logging handler
*
* If no handler is given the default one is used
*
* @param requestLoggingHandler a factory function that given a logger returns an handler
*/
setRequestLoggingHandler(
requestLoggingHandler: RequestLoggingHandlerFactory,
): ServiceBuilder;
/**
* Starts the server using the given settings.
*/
start(): Promise<Server>;
};
export type RequestLoggingHandlerFactory = (logger?: Logger) => RequestHandler;
@@ -24,6 +24,7 @@ export type RunContainerOptions = {
mountDirs?: Record<string, string>;
workingDir?: string;
envVars?: Record<string, string>;
pullImage?: boolean;
};
export interface ContainerRunner {
@@ -58,6 +58,7 @@ describe('DockerContainerRunner', () => {
});
afterEach(() => {
jest.clearAllMocks();
mockFs.restore();
});
@@ -86,6 +87,17 @@ describe('DockerContainerRunner', () => {
expect(mockDocker.run).toHaveBeenCalled();
});
it('should not pull the docker container when pullImage is false', async () => {
await containerTaskApi.runContainer({
imageName,
args,
pullImage: false,
});
expect(mockDocker.pull).not.toHaveBeenCalled();
expect(mockDocker.run).toHaveBeenCalled();
});
it('should call the dockerClient run command with the correct arguments passed through', async () => {
await containerTaskApi.runContainer({
imageName,
@@ -38,6 +38,7 @@ export class DockerContainerRunner implements ContainerRunner {
mountDirs = {},
workingDir,
envVars = {},
pullImage = true,
}: RunContainerOptions) {
// Show a better error message when Docker is unavailable.
try {
@@ -48,15 +49,17 @@ export class DockerContainerRunner implements ContainerRunner {
);
}
await new Promise<void>((resolve, reject) => {
this.dockerClient.pull(imageName, {}, (err, stream) => {
if (err) return reject(err);
stream.pipe(logStream, { end: false });
stream.on('end', () => resolve());
stream.on('error', (error: Error) => reject(error));
return undefined;
if (pullImage) {
await new Promise<void>((resolve, reject) => {
this.dockerClient.pull(imageName, {}, (err, stream) => {
if (err) return reject(err);
stream.pipe(logStream, { end: false });
stream.on('end', () => resolve());
stream.on('error', (error: Error) => reject(error));
return undefined;
});
});
});
}
const userOptions: UserOptions = {};
if (process.getuid && process.getgid) {
@@ -5,9 +5,13 @@
```ts
import { Knex } from 'knex';
// Warning: (ae-missing-release-tag) "isDockerDisabledForTests" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function isDockerDisabledForTests(): boolean;
// Warning: (ae-missing-release-tag) "TestDatabaseId" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type TestDatabaseId =
| 'POSTGRES_13'
@@ -15,6 +19,8 @@ export type TestDatabaseId =
| 'MYSQL_8'
| 'SQLITE_3';
// Warning: (ae-missing-release-tag) "TestDatabases" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export class TestDatabases {
static create(options?: {
@@ -23,6 +29,7 @@ export class TestDatabases {
}): TestDatabases;
// (undocumented)
eachSupportedId(): [TestDatabaseId][];
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
init(id: TestDatabaseId): Promise<Knex>;
// (undocumented)
supports(id: TestDatabaseId): boolean;
@@ -71,7 +71,7 @@ describe('TestDatabases', () => {
await input.insert({ x: 'y' }).into('a');
// Look for the mark
const database = 'backstage_plugin_db0';
const database = input.client.config.connection.database;
const output = knexFactory({
client: 'pg',
connection: { host, port, user, password, database },
@@ -105,7 +105,7 @@ describe('TestDatabases', () => {
await input.insert({ x: 'y' }).into('a');
// Look for the mark
const database = 'backstage_plugin_db0';
const database = input.client.config.connection.database;
const output = knexFactory({
client: 'pg',
connection: { host, port, user, password, database },
@@ -139,7 +139,7 @@ describe('TestDatabases', () => {
await input.insert({ x: 'y' }).into('a');
// Look for the mark
const database = 'backstage_plugin_db0';
const database = input.client.config.connection.database;
const output = knexFactory({
client: 'mysql2',
connection: { host, port, user, password, database },
@@ -16,6 +16,7 @@
import { DatabaseManager } from '@backstage/backend-common';
import { ConfigReader } from '@backstage/config';
import { randomBytes } from 'crypto';
import { Knex } from 'knex';
import { isDockerDisabledForTests } from '../util/isDockerDisabledForTests';
import { startMysqlContainer } from './startMysqlContainer';
@@ -34,7 +35,6 @@ import {
export class TestDatabases {
private readonly instanceById: Map<string, Instance>;
private readonly supportedIds: TestDatabaseId[];
private lastDatabaseIndex: number;
/**
* Creates an empty `TestDatabases` instance, and sets up Jest to clean up
@@ -99,7 +99,6 @@ export class TestDatabases {
private constructor(supportedIds: TestDatabaseId[]) {
this.instanceById = new Map();
this.supportedIds = supportedIds;
this.lastDatabaseIndex = 0;
}
supports(id: TestDatabaseId): boolean {
@@ -142,7 +141,7 @@ export class TestDatabases {
// Ensure that a unique logical database is created in the instance
const connection = await instance.databaseManager
.forPlugin(String(`db${this.lastDatabaseIndex++}`))
.forPlugin(`db${randomBytes(16).toString('hex')}`)
.getClient();
instance.connections.push(connection);
+31
View File
@@ -1,5 +1,36 @@
# example-backend
## 0.2.38
### Patch Changes
- Updated dependencies
- @backstage/plugin-kubernetes-backend@0.3.11
- @backstage/catalog-client@0.3.17
- @backstage/plugin-auth-backend@0.3.18
- @backstage/plugin-jenkins-backend@0.1.2
- @backstage/backend-common@0.8.7
- @backstage/plugin-techdocs-backend@0.9.0
- @backstage/plugin-scaffolder-backend@0.14.1
## 0.2.37
### Patch Changes
- Updated dependencies
- @backstage/backend-common@0.8.6
- @backstage/plugin-scaffolder-backend@0.14.0
- @backstage/plugin-catalog-backend@0.13.0
- @backstage/plugin-auth-backend@0.3.17
- @backstage/plugin-scaffolder-backend-module-rails@0.1.3
- @backstage/plugin-search-backend-node@0.4.0
- @backstage/plugin-techdocs-backend@0.8.7
- @backstage/plugin-app-backend@0.3.15
- @backstage/plugin-kubernetes-backend@0.3.10
- @backstage/plugin-rollbar-backend@0.1.13
- example-app@0.2.37
- @backstage/plugin-search-backend@0.2.3
## 0.2.36
### Patch Changes
+18 -15
View File
@@ -1,6 +1,6 @@
{
"name": "example-backend",
"version": "0.2.36",
"version": "0.2.38",
"main": "dist/index.cjs.js",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -27,32 +27,35 @@
"migrate:create": "knex migrate:make -x ts"
},
"dependencies": {
"@backstage/backend-common": "^0.8.5",
"@backstage/catalog-client": "^0.3.16",
"@backstage/backend-common": "^0.8.7",
"@backstage/catalog-client": "^0.3.17",
"@backstage/catalog-model": "^0.9.0",
"@backstage/config": "^0.1.5",
"@backstage/integration": "^0.5.8",
"@backstage/plugin-app-backend": "^0.3.13",
"@backstage/plugin-auth-backend": "^0.3.16",
"@backstage/plugin-app-backend": "^0.3.15",
"@backstage/plugin-auth-backend": "^0.3.18",
"@backstage/plugin-badges-backend": "^0.1.8",
"@backstage/plugin-catalog-backend": "^0.12.0",
"@backstage/plugin-catalog-backend": "^0.13.0",
"@backstage/plugin-code-coverage-backend": "^0.1.8",
"@backstage/plugin-graphql-backend": "^0.1.8",
"@backstage/plugin-kubernetes-backend": "^0.3.9",
"@backstage/plugin-jenkins-backend": "^0.1.2",
"@backstage/plugin-kubernetes-backend": "^0.3.11",
"@backstage/plugin-kafka-backend": "^0.2.8",
"@backstage/plugin-proxy-backend": "^0.2.9",
"@backstage/plugin-rollbar-backend": "^0.1.11",
"@backstage/plugin-scaffolder-backend": "^0.13.0",
"@backstage/plugin-scaffolder-backend-module-rails": "^0.1.2",
"@backstage/plugin-search-backend": "^0.2.2",
"@backstage/plugin-search-backend-node": "^0.3.0",
"@backstage/plugin-techdocs-backend": "^0.8.6",
"@backstage/plugin-rollbar-backend": "^0.1.13",
"@backstage/plugin-scaffolder-backend": "^0.14.1",
"@backstage/plugin-scaffolder-backend-module-rails": "^0.1.3",
"@backstage/plugin-search-backend": "^0.2.3",
"@backstage/plugin-search-backend-node": "^0.4.0",
"@backstage/plugin-search-backend-module-elasticsearch": "^0.0.1",
"@backstage/plugin-search-backend-module-pg": "^0.1.0",
"@backstage/plugin-techdocs-backend": "^0.9.0",
"@backstage/plugin-todo-backend": "^0.1.8",
"@gitbeaker/node": "^30.2.0",
"@octokit/rest": "^18.5.3",
"azure-devops-node-api": "^10.2.2",
"dockerode": "^3.2.1",
"example-app": "^0.2.36",
"example-app": "^0.2.37",
"express": "^4.17.1",
"express-promise-router": "^4.1.0",
"knex": "^0.95.1",
@@ -62,7 +65,7 @@
"winston": "^3.2.1"
},
"devDependencies": {
"@backstage/cli": "^0.7.3",
"@backstage/cli": "^0.7.5",
"@types/dockerode": "^3.2.1",
"@types/express": "^4.17.6",
"@types/express-serve-static-core": "^4.17.5"
+3
View File
@@ -50,6 +50,7 @@ import todo from './plugins/todo';
import graphql from './plugins/graphql';
import app from './plugins/app';
import badges from './plugins/badges';
import jenkins from './plugins/jenkins';
import { PluginEnvironment } from './types';
function makeCreateEnv(config: Config) {
@@ -101,6 +102,7 @@ async function main() {
const graphqlEnv = useHotMemoize(module, () => createEnv('graphql'));
const appEnv = useHotMemoize(module, () => createEnv('app'));
const badgesEnv = useHotMemoize(module, () => createEnv('badges'));
const jenkinsEnv = useHotMemoize(module, () => createEnv('jenkins'));
const apiRouter = Router();
apiRouter.use('/catalog', await catalog(catalogEnv));
@@ -116,6 +118,7 @@ async function main() {
apiRouter.use('/proxy', await proxy(proxyEnv));
apiRouter.use('/graphql', await graphql(graphqlEnv));
apiRouter.use('/badges', await badges(badgesEnv));
apiRouter.use('/jenkins', await jenkins(jenkinsEnv));
apiRouter.use(notFoundHandler());
const service = createServiceBuilder(module)
+39
View File
@@ -0,0 +1,39 @@
/*
* Copyright 2020 Spotify AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {
createRouter,
DefaultJenkinsInfoProvider,
} from '@backstage/plugin-jenkins-backend';
import { Router } from 'express';
import { PluginEnvironment } from '../types';
import { CatalogClient } from '@backstage/catalog-client';
export default async function createPlugin({
logger,
config,
discovery,
}: PluginEnvironment): Promise<Router> {
const catalog = new CatalogClient({ discoveryApi: discovery });
return await createRouter({
logger,
jenkinsInfoProvider: DefaultJenkinsInfoProvider.fromConfig({
catalog,
config,
}),
});
}
+42 -3
View File
@@ -13,21 +13,55 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useHotCleanup } from '@backstage/backend-common';
import {
PluginDatabaseManager,
useHotCleanup,
} from '@backstage/backend-common';
import { Config } from '@backstage/config';
import { DefaultCatalogCollator } from '@backstage/plugin-catalog-backend';
import { createRouter } from '@backstage/plugin-search-backend';
import { ElasticSearchSearchEngine } from '@backstage/plugin-search-backend-module-elasticsearch';
import { PgSearchEngine } from '@backstage/plugin-search-backend-module-pg';
import {
IndexBuilder,
LunrSearchEngine,
SearchEngine,
} from '@backstage/plugin-search-backend-node';
import { DefaultTechDocsCollator } from '@backstage/plugin-techdocs-backend';
import { Logger } from 'winston';
import { PluginEnvironment } from '../types';
import { DefaultCatalogCollator } from '@backstage/plugin-catalog-backend';
async function createSearchEngine({
logger,
database,
config,
}: {
logger: Logger;
database: PluginDatabaseManager;
config: Config;
}): Promise<SearchEngine> {
if (config.has('search.elasticsearch')) {
return await ElasticSearchSearchEngine.fromConfig({
logger,
config,
});
}
if (await PgSearchEngine.supported(database)) {
return await PgSearchEngine.from({ database });
}
return new LunrSearchEngine({ logger });
}
export default async function createPlugin({
logger,
discovery,
config,
database,
}: PluginEnvironment) {
// Initialize a connection to a search engine.
const searchEngine = new LunrSearchEngine({ logger });
const searchEngine = await createSearchEngine({ config, logger, database });
const indexBuilder = new IndexBuilder({ logger, searchEngine });
// Collators are responsible for gathering documents known to plugins. This
@@ -37,6 +71,11 @@ export default async function createPlugin({
collator: new DefaultCatalogCollator({ discovery }),
});
indexBuilder.addCollator({
defaultRefreshIntervalSeconds: 600,
collator: new DefaultTechDocsCollator({ discovery, logger }),
});
// The scheduler controls when documents are gathered from collators and sent
// to the search engine for indexing.
const { scheduler } = await indexBuilder.build();
+12
View File
@@ -1,5 +1,17 @@
# @backstage/catalog-client
## 0.3.18
### Patch Changes
- 11c370af2: Support filtering entities via property existence
## 0.3.17
### Patch Changes
- 71c936eb6: Export `CatalogRequestOptions` type
## 0.3.16
### Patch Changes
+32 -2
View File
@@ -7,6 +7,8 @@ import { Entity } from '@backstage/catalog-model';
import { EntityName } from '@backstage/catalog-model';
import { Location as Location_2 } from '@backstage/catalog-model';
// Warning: (ae-missing-release-tag) "AddLocationRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type AddLocationRequest = {
type?: string;
@@ -15,12 +17,21 @@ export type AddLocationRequest = {
presence?: 'optional' | 'required';
};
// Warning: (ae-missing-release-tag) "AddLocationResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type AddLocationResponse = {
location: Location_2;
entities: Entity[];
};
// Warning: (ae-missing-release-tag) "CATALOG_FILTER_EXISTS" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const CATALOG_FILTER_EXISTS: unique symbol;
// Warning: (ae-missing-release-tag) "CatalogApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface CatalogApi {
// (undocumented)
@@ -65,6 +76,8 @@ export interface CatalogApi {
): Promise<void>;
}
// Warning: (ae-missing-release-tag) "CatalogClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export class CatalogClient implements CatalogApi {
constructor(options: { discoveryApi: DiscoveryApi });
@@ -110,23 +123,40 @@ export class CatalogClient implements CatalogApi {
): Promise<void>;
}
// Warning: (ae-missing-release-tag) "CatalogEntitiesRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type CatalogEntitiesRequest = {
filter?:
| Record<string, string | string[]>[]
| Record<string, string | string[]>
| Record<string, string | symbol | (string | symbol)[]>[]
| Record<string, string | symbol | (string | symbol)[]>
| undefined;
fields?: string[] | undefined;
};
// Warning: (ae-missing-release-tag) "CatalogListResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type CatalogListResponse<T> = {
items: T[];
};
// Warning: (ae-missing-release-tag) "CatalogRequestOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type CatalogRequestOptions = {
token?: string;
};
// Warning: (ae-missing-release-tag) "ENTITY_STATUS_CATALOG_PROCESSING_TYPE" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const ENTITY_STATUS_CATALOG_PROCESSING_TYPE =
'backstage.io/catalog-processing';
// Warnings were encountered during analysis:
//
// src/CatalogClient.d.ts:7:9 - (ae-forgotten-export) The symbol "DiscoveryApi" needs to be exported by the entry point index.d.ts
// (No @packageDocumentation comment for this package)
```
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/catalog-client",
"version": "0.3.16",
"version": "0.3.18",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -35,7 +35,7 @@
"cross-fetch": "^3.0.6"
},
"devDependencies": {
"@backstage/cli": "^0.7.3",
"@backstage/cli": "^0.7.6",
"@types/jest": "^26.0.7",
"msw": "^0.29.0"
},
@@ -18,7 +18,7 @@ import { Entity } from '@backstage/catalog-model';
import { rest } from 'msw';
import { setupServer } from 'msw/node';
import { CatalogClient } from './CatalogClient';
import { CatalogListResponse } from './types/api';
import { CATALOG_FILTER_EXISTS, CatalogListResponse } from './types/api';
import { DiscoveryApi } from './types/discovery';
const server = setupServer();
@@ -83,7 +83,7 @@ describe('CatalogClient', () => {
server.use(
rest.get(`${mockBaseUrl}/entities`, (req, res, ctx) => {
expect(req.url.search).toBe(
'?filter=a=1,b=2,b=3,%C3%B6=%3D&filter=a=2',
'?filter=a=1,b=2,b=3,%C3%B6=%3D&filter=a=2&filter=c',
);
return res(ctx.json([]));
}),
@@ -100,6 +100,9 @@ describe('CatalogClient', () => {
{
a: '2',
},
{
c: CATALOG_FILTER_EXISTS,
},
],
},
{ token },
@@ -113,7 +116,7 @@ describe('CatalogClient', () => {
server.use(
rest.get(`${mockBaseUrl}/entities`, (req, res, ctx) => {
expect(req.url.search).toBe('?filter=a=1,b=2,b=3,%C3%B6=%3D');
expect(req.url.search).toBe('?filter=a=1,b=2,b=3,%C3%B6=%3D,c');
return res(ctx.json([]));
}),
);
@@ -124,6 +127,7 @@ describe('CatalogClient', () => {
a: '1',
b: ['2', '3'],
ö: '=',
c: CATALOG_FILTER_EXISTS,
},
},
{ token },
+8 -3
View File
@@ -26,6 +26,7 @@ import {
import { ResponseError } from '@backstage/errors';
import fetch from 'cross-fetch';
import {
CATALOG_FILTER_EXISTS,
AddLocationRequest,
AddLocationResponse,
CatalogApi,
@@ -69,9 +70,13 @@ export class CatalogClient implements CatalogApi {
const filterParts: string[] = [];
for (const [key, value] of Object.entries(filterItem)) {
for (const v of [value].flat()) {
filterParts.push(
`${encodeURIComponent(key)}=${encodeURIComponent(v)}`,
);
if (v === CATALOG_FILTER_EXISTS) {
filterParts.push(encodeURIComponent(key));
} else if (typeof v === 'string') {
filterParts.push(
`${encodeURIComponent(key)}=${encodeURIComponent(v)}`,
);
}
}
}
+4 -2
View File
@@ -16,10 +16,12 @@
import { Entity, EntityName, Location } from '@backstage/catalog-model';
export const CATALOG_FILTER_EXISTS = Symbol('CATALOG_FILTER_EXISTS');
export type CatalogEntitiesRequest = {
filter?:
| Record<string, string | string[]>[]
| Record<string, string | string[]>
| Record<string, string | symbol | (string | symbol)[]>[]
| Record<string, string | symbol | (string | symbol)[]>
| undefined;
fields?: string[] | undefined;
};
@@ -20,5 +20,7 @@ export type {
CatalogApi,
CatalogEntitiesRequest,
CatalogListResponse,
CatalogRequestOptions,
} from './api';
export { CATALOG_FILTER_EXISTS } from './api';
export { ENTITY_STATUS_CATALOG_PROCESSING_TYPE } from './status';
+211
View File
@@ -9,6 +9,9 @@ import { JsonValue } from '@backstage/config';
import { SerializedError } from '@backstage/errors';
import * as yup from 'yup';
// Warning: (tsdoc-missing-deprecation-message) The @deprecated block must include a deprecation message, e.g. describing the recommended alternative
// Warning: (ae-missing-release-tag) "analyzeLocationSchema" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public @deprecated (undocumented)
export const analyzeLocationSchema: yup.ObjectSchema<
{
@@ -17,6 +20,8 @@ export const analyzeLocationSchema: yup.ObjectSchema<
object
>;
// Warning: (ae-missing-release-tag) "ApiEntityV1alpha1" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
interface ApiEntityV1alpha1 extends Entity {
// (undocumented)
@@ -35,24 +40,43 @@ interface ApiEntityV1alpha1 extends Entity {
export { ApiEntityV1alpha1 as ApiEntity };
export { ApiEntityV1alpha1 };
// Warning: (ae-missing-release-tag) "apiEntityV1alpha1Validator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const apiEntityV1alpha1Validator: KindValidator;
// Warning: (ae-missing-release-tag) "CommonValidatorFunctions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export class CommonValidatorFunctions {
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
static isJsonSafe(value: unknown): boolean;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
static isValidDnsLabel(value: unknown): boolean;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
static isValidDnsSubdomain(value: unknown): boolean;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
static isValidPrefixAndOrSuffix(
value: unknown,
separator: string,
isValidPrefix: (value: string) => boolean,
isValidSuffix: (value: string) => boolean,
): boolean;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
static isValidString(value: unknown): boolean;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
static isValidUrl(value: unknown): boolean;
}
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (ae-forgotten-export) The symbol "EntityRefContext" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "compareEntityToRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function compareEntityToRef(
entity: Entity,
@@ -60,6 +84,8 @@ export function compareEntityToRef(
context?: EntityRefContext,
): boolean;
// Warning: (ae-missing-release-tag) "ComponentEntityV1alpha1" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
interface ComponentEntityV1alpha1 extends Entity {
// (undocumented)
@@ -81,9 +107,13 @@ interface ComponentEntityV1alpha1 extends Entity {
export { ComponentEntityV1alpha1 as ComponentEntity };
export { ComponentEntityV1alpha1 };
// Warning: (ae-missing-release-tag) "componentEntityV1alpha1Validator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const componentEntityV1alpha1Validator: KindValidator;
// Warning: (ae-missing-release-tag) "DefaultNamespaceEntityPolicy" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export class DefaultNamespaceEntityPolicy implements EntityPolicy {
constructor(namespace?: string);
@@ -91,6 +121,8 @@ export class DefaultNamespaceEntityPolicy implements EntityPolicy {
enforce(entity: Entity): Promise<Entity>;
}
// Warning: (ae-missing-release-tag) "DomainEntityV1alpha1" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
interface DomainEntityV1alpha1 extends Entity {
// (undocumented)
@@ -105,12 +137,18 @@ interface DomainEntityV1alpha1 extends Entity {
export { DomainEntityV1alpha1 as DomainEntity };
export { DomainEntityV1alpha1 };
// Warning: (ae-missing-release-tag) "domainEntityV1alpha1Validator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const domainEntityV1alpha1Validator: KindValidator;
// Warning: (ae-missing-release-tag) "EDIT_URL_ANNOTATION" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const EDIT_URL_ANNOTATION = 'backstage.io/edit-url';
// Warning: (ae-missing-release-tag) "Entity" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type Entity = {
apiVersion: string;
@@ -121,9 +159,13 @@ export type Entity = {
status?: UNSTABLE_EntityStatus;
};
// Warning: (ae-missing-release-tag) "ENTITY_DEFAULT_NAMESPACE" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const ENTITY_DEFAULT_NAMESPACE = 'default';
// Warning: (ae-missing-release-tag) "ENTITY_META_GENERATED_FIELDS" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const ENTITY_META_GENERATED_FIELDS: readonly [
'uid',
@@ -131,6 +173,8 @@ export const ENTITY_META_GENERATED_FIELDS: readonly [
'generation',
];
// Warning: (ae-missing-release-tag) "EntityEnvelope" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type EntityEnvelope = {
apiVersion: string;
@@ -141,19 +185,35 @@ export type EntityEnvelope = {
};
};
// Warning: (ae-missing-release-tag) "entityEnvelopeSchemaValidator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@backstage/catalog-model" does not have an export "TypeError"
//
// @public
export function entityEnvelopeSchemaValidator<
T extends EntityEnvelope = EntityEnvelope
>(schema?: unknown): (data: unknown) => T;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (ae-missing-release-tag) "entityHasChanges" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function entityHasChanges(previous: Entity, next: Entity): boolean;
// Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
// Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
// Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
// Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
// Warning: (ae-missing-release-tag) "entityKindSchemaValidator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@backstage/catalog-model" does not have an export "TypeError"
//
// @public
export function entityKindSchemaValidator<T extends Entity>(
schema: unknown,
): (data: unknown) => T | false;
// Warning: (ae-missing-release-tag) "EntityLink" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type EntityLink = {
url: string;
@@ -161,6 +221,8 @@ export type EntityLink = {
icon?: string;
};
// Warning: (ae-missing-release-tag) "EntityMeta" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type EntityMeta = JsonObject & {
uid?: string;
@@ -175,6 +237,8 @@ export type EntityMeta = JsonObject & {
links?: EntityLink[];
};
// Warning: (ae-missing-release-tag) "EntityName" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type EntityName = {
kind: string;
@@ -182,17 +246,23 @@ export type EntityName = {
name: string;
};
// Warning: (ae-missing-release-tag) "EntityPolicies" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const EntityPolicies: {
allOf(policies: EntityPolicy[]): AllEntityPolicies;
oneOf(policies: EntityPolicy[]): AnyEntityPolicy;
};
// Warning: (ae-missing-release-tag) "EntityPolicy" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type EntityPolicy = {
enforce(entity: Entity): Promise<Entity | undefined>;
};
// Warning: (ae-missing-release-tag) "EntityRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type EntityRef =
| string
@@ -202,12 +272,16 @@ export type EntityRef =
name: string;
};
// Warning: (ae-missing-release-tag) "EntityRelation" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type EntityRelation = {
type: string;
target: EntityName;
};
// Warning: (ae-missing-release-tag) "EntityRelationSpec" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type EntityRelationSpec = {
source: EntityName;
@@ -215,11 +289,16 @@ export type EntityRelationSpec = {
target: EntityName;
};
// Warning: (ae-missing-release-tag) "entitySchemaValidator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@backstage/catalog-model" does not have an export "TypeError"
//
// @public
export function entitySchemaValidator<T extends Entity = Entity>(
schema?: unknown,
): (data: unknown) => T;
// Warning: (ae-missing-release-tag) "FieldFormatEntityPolicy" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export class FieldFormatEntityPolicy implements EntityPolicy {
constructor(validators?: Validators);
@@ -227,18 +306,32 @@ export class FieldFormatEntityPolicy implements EntityPolicy {
enforce(entity: Entity): Promise<Entity>;
}
// Warning: (ae-missing-release-tag) "generateEntityEtag" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function generateEntityEtag(): string;
// Warning: (ae-missing-release-tag) "generateEntityUid" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function generateEntityUid(): string;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (ae-missing-release-tag) "generateUpdatedEntity" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function generateUpdatedEntity(previous: Entity, next: Entity): Entity;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (ae-missing-release-tag) "getEntityName" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function getEntityName(entity: Entity): EntityName;
// 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) "getEntitySourceLocation" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function getEntitySourceLocation(
entity: Entity,
@@ -247,6 +340,8 @@ export function getEntitySourceLocation(
target: string;
};
// Warning: (ae-missing-release-tag) "GroupEntityV1alpha1" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
interface GroupEntityV1alpha1 extends Entity {
// (undocumented)
@@ -269,20 +364,28 @@ interface GroupEntityV1alpha1 extends Entity {
export { GroupEntityV1alpha1 as GroupEntity };
export { GroupEntityV1alpha1 };
// Warning: (ae-missing-release-tag) "groupEntityV1alpha1Validator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const groupEntityV1alpha1Validator: KindValidator;
// Warning: (ae-missing-release-tag) "JSONSchema" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type JSONSchema = JSONSchema7 &
{
[key in string]?: JsonValue;
};
// Warning: (ae-missing-release-tag) "KindValidator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type KindValidator = {
check(entity: Entity): Promise<boolean>;
};
// Warning: (ae-missing-release-tag) "KubernetesValidatorFunctions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export class KubernetesValidatorFunctions {
// (undocumented)
@@ -303,15 +406,21 @@ export class KubernetesValidatorFunctions {
static isValidObjectName(value: unknown): boolean;
}
// Warning: (ae-missing-release-tag) "Location" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
type Location_2 = {
id: string;
} & LocationSpec;
export { Location_2 as Location };
// Warning: (ae-missing-release-tag) "LOCATION_ANNOTATION" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const LOCATION_ANNOTATION = 'backstage.io/managed-by-location';
// Warning: (ae-missing-release-tag) "LocationEntityV1alpha1" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
interface LocationEntityV1alpha1 extends Entity {
// (undocumented)
@@ -328,12 +437,19 @@ interface LocationEntityV1alpha1 extends Entity {
export { LocationEntityV1alpha1 as LocationEntity };
export { LocationEntityV1alpha1 };
// Warning: (ae-missing-release-tag) "locationEntityV1alpha1Validator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const locationEntityV1alpha1Validator: KindValidator;
// Warning: (tsdoc-missing-deprecation-message) The @deprecated block must include a deprecation message, e.g. describing the recommended alternative
// Warning: (ae-missing-release-tag) "locationSchema" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public @deprecated (undocumented)
export const locationSchema: yup.ObjectSchema<Location_2, object>;
// Warning: (ae-missing-release-tag) "LocationSpec" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type LocationSpec = {
type: string;
@@ -341,12 +457,19 @@ export type LocationSpec = {
presence?: 'optional' | 'required';
};
// Warning: (tsdoc-missing-deprecation-message) The @deprecated block must include a deprecation message, e.g. describing the recommended alternative
// Warning: (ae-missing-release-tag) "locationSpecSchema" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public @deprecated (undocumented)
export const locationSpecSchema: yup.ObjectSchema<LocationSpec, object>;
// Warning: (ae-missing-release-tag) "makeValidator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function makeValidator(overrides?: Partial<Validators>): Validators;
// Warning: (ae-missing-release-tag) "NoForeignRootFieldsEntityPolicy" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export class NoForeignRootFieldsEntityPolicy implements EntityPolicy {
constructor(knownFields?: string[]);
@@ -354,16 +477,28 @@ export class NoForeignRootFieldsEntityPolicy implements EntityPolicy {
enforce(entity: Entity): Promise<Entity>;
}
// Warning: (ae-missing-release-tag) "ORIGIN_LOCATION_ANNOTATION" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const ORIGIN_LOCATION_ANNOTATION =
'backstage.io/managed-by-origin-location';
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (ae-missing-release-tag) "parseEntityName" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function parseEntityName(
ref: EntityRef,
context?: EntityRefContext,
): EntityName;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (ae-missing-release-tag) "parseEntityRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
// Warning: (ae-missing-release-tag) "parseEntityRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
// Warning: (ae-missing-release-tag) "parseEntityRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function parseEntityRef(
ref: EntityRef,
@@ -401,6 +536,11 @@ export function parseEntityRef(
name: string;
};
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
// Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
// Warning: (ae-missing-release-tag) "parseLocationReference" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function parseLocationReference(
ref: string,
@@ -409,48 +549,78 @@ export function parseLocationReference(
target: string;
};
// Warning: (ae-missing-release-tag) "RELATION_API_CONSUMED_BY" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const RELATION_API_CONSUMED_BY = 'apiConsumedBy';
// Warning: (ae-missing-release-tag) "RELATION_API_PROVIDED_BY" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const RELATION_API_PROVIDED_BY = 'apiProvidedBy';
// Warning: (ae-missing-release-tag) "RELATION_CHILD_OF" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const RELATION_CHILD_OF = 'childOf';
// Warning: (ae-missing-release-tag) "RELATION_CONSUMES_API" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const RELATION_CONSUMES_API = 'consumesApi';
// Warning: (ae-missing-release-tag) "RELATION_DEPENDENCY_OF" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const RELATION_DEPENDENCY_OF = 'dependencyOf';
// Warning: (ae-missing-release-tag) "RELATION_DEPENDS_ON" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const RELATION_DEPENDS_ON = 'dependsOn';
// Warning: (ae-missing-release-tag) "RELATION_HAS_MEMBER" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const RELATION_HAS_MEMBER = 'hasMember';
// Warning: (ae-missing-release-tag) "RELATION_HAS_PART" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const RELATION_HAS_PART = 'hasPart';
// Warning: (ae-missing-release-tag) "RELATION_MEMBER_OF" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const RELATION_MEMBER_OF = 'memberOf';
// Warning: (ae-missing-release-tag) "RELATION_OWNED_BY" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const RELATION_OWNED_BY = 'ownedBy';
// Warning: (ae-missing-release-tag) "RELATION_OWNER_OF" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const RELATION_OWNER_OF = 'ownerOf';
// Warning: (ae-missing-release-tag) "RELATION_PARENT_OF" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const RELATION_PARENT_OF = 'parentOf';
// Warning: (ae-missing-release-tag) "RELATION_PART_OF" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const RELATION_PART_OF = 'partOf';
// Warning: (ae-missing-release-tag) "RELATION_PROVIDES_API" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const RELATION_PROVIDES_API = 'providesApi';
// Warning: (ae-missing-release-tag) "ResourceEntityV1alpha1" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
interface ResourceEntityV1alpha1 extends Entity {
// (undocumented)
@@ -468,15 +638,22 @@ interface ResourceEntityV1alpha1 extends Entity {
export { ResourceEntityV1alpha1 as ResourceEntity };
export { ResourceEntityV1alpha1 };
// Warning: (ae-missing-release-tag) "resourceEntityV1alpha1Validator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const resourceEntityV1alpha1Validator: KindValidator;
// Warning: (ae-missing-release-tag) "SchemaValidEntityPolicy" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export class SchemaValidEntityPolicy implements EntityPolicy {
// (undocumented)
enforce(entity: Entity): Promise<Entity>;
}
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (ae-missing-release-tag) "serializeEntityRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public @deprecated
export function serializeEntityRef(
ref:
@@ -488,9 +665,14 @@ export function serializeEntityRef(
},
): EntityRef;
// Warning: (ae-missing-release-tag) "SOURCE_LOCATION_ANNOTATION" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const SOURCE_LOCATION_ANNOTATION = 'backstage.io/source-location';
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (ae-missing-release-tag) "stringifyEntityRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function stringifyEntityRef(
ref:
@@ -502,12 +684,19 @@ export function stringifyEntityRef(
},
): string;
// Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
// Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (ae-missing-release-tag) "stringifyLocationReference" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function stringifyLocationReference(ref: {
type: string;
target: string;
}): string;
// Warning: (ae-missing-release-tag) "SystemEntityV1alpha1" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
interface SystemEntityV1alpha1 extends Entity {
// (undocumented)
@@ -523,9 +712,13 @@ interface SystemEntityV1alpha1 extends Entity {
export { SystemEntityV1alpha1 as SystemEntity };
export { SystemEntityV1alpha1 };
// Warning: (ae-missing-release-tag) "systemEntityV1alpha1Validator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const systemEntityV1alpha1Validator: KindValidator;
// Warning: (ae-missing-release-tag) "TemplateEntityV1beta2" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface TemplateEntityV1beta2 extends Entity {
// (undocumented)
@@ -554,6 +747,8 @@ export interface TemplateEntityV1beta2 extends Entity {
};
}
// Warning: (ae-missing-release-tag) "templateEntityV1beta2Validator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const templateEntityV1beta2Validator: KindValidator;
@@ -573,6 +768,8 @@ export type UNSTABLE_EntityStatusItem = {
// @alpha
export type UNSTABLE_EntityStatusLevel = 'info' | 'warning' | 'error';
// Warning: (ae-missing-release-tag) "UserEntityV1alpha1" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
interface UserEntityV1alpha1 extends Entity {
// (undocumented)
@@ -592,9 +789,13 @@ interface UserEntityV1alpha1 extends Entity {
export { UserEntityV1alpha1 as UserEntity };
export { UserEntityV1alpha1 };
// Warning: (ae-missing-release-tag) "userEntityV1alpha1Validator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const userEntityV1alpha1Validator: KindValidator;
// Warning: (ae-missing-release-tag) "Validators" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type Validators = {
isValidApiVersion(value: unknown): boolean;
@@ -608,8 +809,18 @@ export type Validators = {
isValidTag(value: unknown): boolean;
};
// Warning: (ae-missing-release-tag) "VIEW_URL_ANNOTATION" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const VIEW_URL_ANNOTATION = 'backstage.io/view-url';
// Warnings were encountered during analysis:
//
// src/EntityPolicies.d.ts:13:5 - (ae-forgotten-export) The symbol "AllEntityPolicies" needs to be exported by the entry point index.d.ts
// src/EntityPolicies.d.ts:14:5 - (ae-forgotten-export) The symbol "AnyEntityPolicy" needs to be exported by the entry point index.d.ts
// src/entity/Entity.d.ts:37:5 - (ae-incompatible-release-tags) The symbol "status" is marked as @public, but its signature references "UNSTABLE_EntityStatus" which is marked as @alpha
// src/entity/policies/types.d.ts:10:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// src/kinds/types.d.ts:9:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// (No @packageDocumentation comment for this package)
```
+17 -10
View File
@@ -3,26 +3,33 @@
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
// Warning: (ae-missing-release-tag) "findPaths" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function findPaths(searchDir: string): Paths;
// Warning: (ae-missing-release-tag) "isChildPath" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function isChildPath(base: string, path: string): boolean;
// Warning: (ae-missing-release-tag) "Paths" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type Paths = {
ownDir: string;
ownRoot: string;
targetDir: string;
targetRoot: string;
resolveOwn: ResolveFunc;
resolveOwnRoot: ResolveFunc;
resolveTarget: ResolveFunc;
resolveTargetRoot: ResolveFunc;
ownDir: string;
ownRoot: string;
targetDir: string;
targetRoot: string;
resolveOwn: ResolveFunc;
resolveOwnRoot: ResolveFunc;
resolveTarget: ResolveFunc;
resolveTargetRoot: ResolveFunc;
};
// Warnings were encountered during analysis:
//
// src/paths.d.ts:7:5 - (ae-forgotten-export) The symbol "ResolveFunc" needs to be exported by the entry point index.d.ts
// (No @packageDocumentation comment for this package)
```
+35
View File
@@ -1,5 +1,40 @@
# @backstage/cli
## 0.7.7
### Patch Changes
- 6aa7c3db7: bump node-tar version to the latest
- e9d3983ee: Keep track of filtered configuration values when running frontend in development mode.
- Updated dependencies
- @backstage/config@0.1.6
- @backstage/config-loader@0.6.6
## 0.7.6
### Patch Changes
- 9d40fcb1e: - Bumping `material-ui/core` version to at least `4.12.2` as they made some breaking changes in later versions which broke `Pagination` of the `Table`.
- Switching out `material-table` to `@material-table/core` for support for the later versions of `material-ui/core`
- This causes a minor API change to `@backstage/core-components` as the interface for `Table` re-exports the `prop` from the underlying `Table` components.
- `onChangeRowsPerPage` has been renamed to `onRowsPerPageChange`
- `onChangePage` has been renamed to `onPageChange`
- Migration guide is here: https://material-table-core.com/docs/breaking-changes
## 0.7.5
### Patch Changes
- 9a96b5da7: chore: bump `eslint` to `7.30.0`
## 0.7.4
### Patch Changes
- ae84b20cf: Revert the upgrade to `fs-extra@10.0.0` as that seemed to have broken all installs inexplicably.
- Updated dependencies
- @backstage/config-loader@0.6.5
## 0.7.3
### Patch Changes
+15 -15
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/cli",
"description": "CLI for developing Backstage plugins and apps",
"version": "0.7.3",
"version": "0.7.7",
"private": false,
"publishConfig": {
"access": "public"
@@ -31,8 +31,8 @@
"@babel/core": "^7.4.4",
"@babel/plugin-transform-modules-commonjs": "^7.4.4",
"@backstage/cli-common": "^0.1.2",
"@backstage/config": "^0.1.5",
"@backstage/config-loader": "^0.6.4",
"@backstage/config": "^0.1.6",
"@backstage/config-loader": "^0.6.6",
"@hot-loader/react-dom": "^16.13.0",
"@lerna/package-graph": "^4.0.0",
"@lerna/project": "^4.0.0",
@@ -53,8 +53,8 @@
"@types/start-server-webpack-plugin": "^2.2.0",
"@types/webpack-env": "^1.15.2",
"@types/webpack-node-externals": "^2.5.0",
"@typescript-eslint/eslint-plugin": "^v4.27.0",
"@typescript-eslint/parser": "^v4.27.0",
"@typescript-eslint/eslint-plugin": "^v4.28.3",
"@typescript-eslint/parser": "^v4.28.3",
"@yarnpkg/lockfile": "^1.1.0",
"babel-plugin-dynamic-import-node": "^2.3.3",
"bfj": "^7.0.2",
@@ -65,7 +65,7 @@
"dashify": "^2.0.0",
"diff": "^5.0.0",
"esbuild": "^0.8.56",
"eslint": "^7.1.0",
"eslint": "^7.30.0",
"eslint-config-prettier": "^8.3.0",
"eslint-formatter-friendly": "^7.0.0",
"eslint-plugin-import": "^2.20.2",
@@ -104,7 +104,7 @@
"start-server-webpack-plugin": "^2.2.5",
"style-loader": "^1.2.1",
"sucrase": "^3.18.2",
"tar": "^6.0.1",
"tar": "^6.1.2",
"terser-webpack-plugin": "^1.4.3",
"ts-loader": "^8.0.17",
"typescript": "^4.0.3",
@@ -118,14 +118,14 @@
"yn": "^4.0.0"
},
"devDependencies": {
"@backstage/backend-common": "^0.8.4",
"@backstage/config": "^0.1.5",
"@backstage/core-components": "^0.1.4",
"@backstage/core-plugin-api": "^0.1.3",
"@backstage/core-app-api": "^0.1.4",
"@backstage/dev-utils": "^0.2.0",
"@backstage/test-utils": "^0.1.14",
"@backstage/theme": "^0.2.8",
"@backstage/backend-common": "^0.8.8",
"@backstage/config": "^0.1.6",
"@backstage/core-components": "^0.3.0",
"@backstage/core-plugin-api": "^0.1.5",
"@backstage/core-app-api": "^0.1.7",
"@backstage/dev-utils": "^0.2.5",
"@backstage/test-utils": "^0.1.16",
"@backstage/theme": "^0.2.9",
"@types/diff": "^5.0.0",
"@types/express": "^4.17.6",
"@types/fs-extra": "^9.0.1",
+1
View File
@@ -59,6 +59,7 @@ export default async (cmd: Command) => {
...(await loadCliConfig({
args: cmd.config,
fromPackage: name,
withFilteredKeys: true,
})),
});
@@ -28,6 +28,7 @@ export default async (cmd: Command) => {
...(await loadCliConfig({
args: cmd.config,
fromPackage: name,
withFilteredKeys: true,
})),
});
+2
View File
@@ -22,6 +22,7 @@ type Options = {
args: string[];
fromPackage?: string;
mockEnv?: boolean;
withFilteredKeys?: boolean;
};
export async function loadCliConfig(options: Options) {
@@ -57,6 +58,7 @@ export async function loadCliConfig(options: Options) {
try {
const frontendAppConfigs = schema.process(appConfigs, {
visibility: ['frontend'],
withFilteredKeys: options.withFilteredKeys,
});
const frontendConfig = ConfigReader.fromConfigs(frontendAppConfigs);
@@ -27,7 +27,7 @@
"@backstage/core-components": "^{{version '@backstage/core-components'}}",
"@backstage/core-plugin-api": "^{{version '@backstage/core-plugin-api'}}",
"@backstage/theme": "^{{version '@backstage/theme'}}",
"@material-ui/core": "^4.11.0",
"@material-ui/core": "^4.12.2",
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "4.0.0-alpha.45",
"react": "^16.13.1",
+26
View File
@@ -1,5 +1,31 @@
# @backstage/codemods
## 0.1.8
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.3.0
- @backstage/core-plugin-api@0.1.5
- @backstage/core-app-api@0.1.7
## 0.1.7
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.2.0
- @backstage/core-app-api@0.1.6
- @backstage/core-plugin-api@0.1.4
## 0.1.6
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.1.6
- @backstage/core-app-api@0.1.5
## 0.1.5
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/codemods",
"description": "A collection of codemods for Backstage projects",
"version": "0.1.5",
"version": "0.1.8",
"private": false,
"publishConfig": {
"access": "public",
+14
View File
@@ -1,5 +1,19 @@
# @backstage/config-loader
## 0.6.6
### Patch Changes
- e9d3983ee: Add option to populate the `filteredKeys` property when processing configuration with a schema.
- Updated dependencies
- @backstage/config@0.1.6
## 0.6.5
### Patch Changes
- ae84b20cf: Revert the upgrade to `fs-extra@10.0.0` as that seemed to have broken all installs inexplicably.
## 0.6.4
### Patch Changes
+21
View File
@@ -7,6 +7,8 @@ import { AppConfig } from '@backstage/config';
import { JsonObject } from '@backstage/config';
import { JSONSchema7 } from 'json-schema';
// Warning: (ae-missing-release-tag) "ConfigSchema" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type ConfigSchema = {
process(
@@ -16,12 +18,19 @@ export type ConfigSchema = {
serialize(): JsonObject;
};
// Warning: (ae-forgotten-export) The symbol "CONFIG_VISIBILITIES" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "ConfigVisibility" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type ConfigVisibility = typeof CONFIG_VISIBILITIES[number];
// Warning: (ae-missing-release-tag) "loadConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function loadConfig(options: LoadConfigOptions): Promise<AppConfig[]>;
// Warning: (ae-missing-release-tag) "LoadConfigOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type LoadConfigOptions = {
configRoot: string;
@@ -30,16 +39,28 @@ export type LoadConfigOptions = {
experimentalEnvFunc?: EnvFunc;
};
// Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "loadConfigSchema" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function loadConfigSchema(options: Options): Promise<ConfigSchema>;
// Warning: (ae-missing-release-tag) "mergeConfigSchemas" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function mergeConfigSchemas(schemas: JSONSchema7[]): JSONSchema7;
// Warning: (ae-missing-release-tag) "readEnvConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function readEnvConfig(env: {
[name: string]: string | undefined;
}): AppConfig[];
// Warnings were encountered during analysis:
//
// src/lib/schema/types.d.ts:83:5 - (ae-forgotten-export) The symbol "ConfigProcessingOptions" needs to be exported by the entry point index.d.ts
// src/loader.d.ts:13:5 - (ae-forgotten-export) The symbol "EnvFunc" needs to be exported by the entry point index.d.ts
// (No @packageDocumentation comment for this package)
```
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/config-loader",
"description": "Config loading functionality used by Backstage backend, and CLI",
"version": "0.6.4",
"version": "0.6.6",
"private": false,
"publishConfig": {
"access": "public",
@@ -31,7 +31,7 @@
},
"dependencies": {
"@backstage/cli-common": "^0.1.1",
"@backstage/config": "^0.1.5",
"@backstage/config": "^0.1.6",
"@types/json-schema": "^7.0.6",
"ajv": "^7.0.3",
"fs-extra": "9.1.0",
@@ -63,43 +63,115 @@ const visibility = new Map<string, ConfigVisibility>(
describe('filterByVisibility', () => {
test.each<[ConfigVisibility[], JsonObject]>([
[[], {}],
[
[],
{
data: {},
filteredKeys: [
'arr[0]',
'arr[1]',
'arr[2]',
'objArr[0].f',
'objArr[0].b',
'objArr[0].s',
'objArr[1].f',
'objArr[1].b',
'objArr[1].s',
'obj.f',
'obj.b.s',
'arrF[0].never',
'arrB[0].never',
'arrS[0].never',
'objF.never',
'objB.never',
'objS.never',
],
},
],
[
['frontend'],
{
arr: ['f'],
objArr: [{ f: 1 }, { f: 4 }],
obj: { f: 'a' },
arrF: [],
objF: {},
data: {
arr: ['f'],
objArr: [{ f: 1 }, { f: 4 }],
obj: { f: 'a' },
arrF: [],
objF: {},
},
filteredKeys: [
'arr[1]',
'arr[2]',
'objArr[0].b',
'objArr[0].s',
'objArr[1].b',
'objArr[1].s',
'obj.b.s',
'arrF[0].never',
'arrB[0].never',
'arrS[0].never',
'objF.never',
'objB.never',
'objS.never',
],
},
],
[
['backend'],
{
arr: ['b'],
objArr: [{ b: 2 }, { b: 5 }],
obj: { b: {} },
arrF: [{ never: 'here' }],
arrB: [{ never: 'here' }],
arrS: [{ never: 'here' }],
objF: { never: 'here' },
objB: { never: 'here' },
objS: { never: 'here' },
data: {
arr: ['b'],
objArr: [{ b: 2 }, { b: 5 }],
obj: { b: {} },
arrF: [{ never: 'here' }],
arrB: [{ never: 'here' }],
arrS: [{ never: 'here' }],
objF: { never: 'here' },
objB: { never: 'here' },
objS: { never: 'here' },
},
filteredKeys: [
'arr[0]',
'arr[2]',
'objArr[0].f',
'objArr[0].s',
'objArr[1].f',
'objArr[1].s',
'obj.f',
'obj.b.s',
],
},
],
[
['secret'],
{
arr: ['s'],
objArr: [{ s: 3 }, { s: 6 }],
obj: { b: { s: true } },
arrS: [],
objS: {},
data: {
arr: ['s'],
objArr: [{ s: 3 }, { s: 6 }],
obj: { b: { s: true } },
arrS: [],
objS: {},
},
filteredKeys: [
'arr[0]',
'arr[1]',
'objArr[0].f',
'objArr[0].b',
'objArr[1].f',
'objArr[1].b',
'obj.f',
'arrF[0].never',
'arrB[0].never',
'arrS[0].never',
'objF.never',
'objB.never',
'objS.never',
],
},
],
[['frontend', 'backend', 'secret'], data],
[['frontend', 'backend', 'secret'], { data, filteredKeys: [] }],
])('should filter correctly with %p', (filter, expected) => {
expect(filterByVisibility(data, filter, visibility)).toEqual(expected);
expect(
filterByVisibility(data, filter, visibility, undefined, true),
).toEqual(expected);
});
});
@@ -30,9 +30,17 @@ export function filterByVisibility(
includeVisibilities: ConfigVisibility[],
visibilityByPath: Map<string, ConfigVisibility>,
transformFunc?: TransformFunc<number | string | boolean>,
): JsonObject {
function transform(jsonVal: JsonValue, path: string): JsonValue | undefined {
const visibility = visibilityByPath.get(path) ?? DEFAULT_CONFIG_VISIBILITY;
withFilteredKeys?: boolean,
): { data: JsonObject; filteredKeys?: string[] } {
const filteredKeys = new Array<string>();
function transform(
jsonVal: JsonValue,
visibilityPath: string, // Matches the format we get from ajv
filterPath: string, // Matches the format of the ConfigReader
): JsonValue | undefined {
const visibility =
visibilityByPath.get(visibilityPath) ?? DEFAULT_CONFIG_VISIBILITY;
const isVisible = includeVisibilities.includes(visibility);
if (typeof jsonVal !== 'object') {
@@ -42,6 +50,9 @@ export function filterByVisibility(
}
return jsonVal;
}
if (withFilteredKeys) {
filteredKeys.push(filterPath);
}
return undefined;
} else if (jsonVal === null) {
return undefined;
@@ -49,7 +60,11 @@ export function filterByVisibility(
const arr = new Array<JsonValue>();
for (const [index, value] of jsonVal.entries()) {
const out = transform(value, `${path}/${index}`);
const out = transform(
value,
`${visibilityPath}/${index}`,
`${filterPath}[${index}]`,
);
if (out !== undefined) {
arr.push(out);
}
@@ -68,7 +83,11 @@ export function filterByVisibility(
if (value === undefined) {
continue;
}
const out = transform(value, `${path}/${key}`);
const out = transform(
value,
`${visibilityPath}/${key}`,
filterPath ? `${filterPath}.${key}` : key,
);
if (out !== undefined) {
outObj[key] = out;
hasOutput = true;
@@ -81,5 +100,8 @@ export function filterByVisibility(
return undefined;
}
return (transform(data, '') as JsonObject) ?? {};
return {
filteredKeys: withFilteredKeys ? filteredKeys : undefined,
data: (transform(data, '', '') as JsonObject) ?? {},
};
}
@@ -68,13 +68,19 @@ describe('loadConfigSchema', () => {
schema.process(configs, {
visibility: ['frontend'],
valueTransform: () => 'X',
withFilteredKeys: true,
}),
).toEqual([{ data: { key1: 'X' }, context: 'test' }]);
).toEqual([
{ data: { key1: 'X' }, context: 'test', filteredKeys: ['key2'] },
]);
expect(
schema.process(configs, {
valueTransform: () => 'X',
withFilteredKeys: true,
}),
).toEqual([{ data: { key1: 'X', key2: 'X' }, context: 'test' }]);
).toEqual([
{ data: { key1: 'X', key2: 'X' }, context: 'test', filteredKeys: [] },
]);
const serialized = schema.serialize();
@@ -57,7 +57,7 @@ export async function loadConfigSchema(
return {
process(
configs: AppConfig[],
{ visibility, valueTransform } = {},
{ visibility, valueTransform, withFilteredKeys } = {},
): AppConfig[] {
const result = validate(configs);
if (result.errors) {
@@ -73,21 +73,23 @@ export async function loadConfigSchema(
if (visibility) {
processedConfigs = processedConfigs.map(({ data, context }) => ({
context,
data: filterByVisibility(
...filterByVisibility(
data,
visibility,
result.visibilityByPath,
valueTransform,
withFilteredKeys,
),
}));
} else if (valueTransform) {
processedConfigs = processedConfigs.map(({ data, context }) => ({
context,
data: filterByVisibility(
...filterByVisibility(
data,
Array.from(CONFIG_VISIBILITIES),
result.visibilityByPath,
valueTransform,
withFilteredKeys,
),
}));
}
@@ -96,6 +96,13 @@ type ConfigProcessingOptions = {
* will be omitted.
*/
valueTransform?: TransformFunc<any>;
/**
* Whether or not to include the `filteredKeys` property in the output `AppConfig`s.
*
* Default: `false`.
*/
withFilteredKeys?: boolean;
};
/**
+6
View File
@@ -1,5 +1,11 @@
# @backstage/config
## 0.1.6
### Patch Changes
- e9d3983ee: Add warning when trying to access configuration values that have been filtered out by visibility.
## 0.1.5
### Patch Changes
+15
View File
@@ -3,12 +3,17 @@
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
// Warning: (ae-missing-release-tag) "AppConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type AppConfig = {
context: string;
data: JsonObject;
filteredKeys?: string[];
};
// Warning: (ae-missing-release-tag) "Config" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type Config = {
has(key: string): boolean;
@@ -29,6 +34,8 @@ export type Config = {
getOptionalStringArray(key: string): string[] | undefined;
};
// Warning: (ae-missing-release-tag) "ConfigReader" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export class ConfigReader implements Config {
constructor(
@@ -73,17 +80,25 @@ export class ConfigReader implements Config {
keys(): string[];
}
// Warning: (ae-missing-release-tag) "JsonArray" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface JsonArray extends Array<JsonValue> {}
// Warning: (ae-missing-release-tag) "JsonObject" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type JsonObject = {
[key in string]?: JsonValue;
};
// Warning: (ae-missing-release-tag) "JsonPrimitive" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type JsonPrimitive = number | string | boolean | null;
// Warning: (ae-missing-release-tag) "JsonValue" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type JsonValue = JsonObject | JsonArray | JsonPrimitive;
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/config",
"description": "Config API used by Backstage core, backend, and CLI",
"version": "0.1.5",
"version": "0.1.6",
"private": false,
"publishConfig": {
"access": "public",
+56
View File
@@ -14,6 +14,7 @@
* limitations under the License.
*/
import { withLogCollector } from '../../test-utils-core/src';
import { ConfigReader } from './reader';
const DATA = {
@@ -185,6 +186,61 @@ describe('ConfigReader', () => {
const config = new ConfigReader(DATA, CTX);
expectInvalidValues(config);
});
it('should warn when accessing filtered keys in development mode', () => {
const oldEnv = process.env.NODE_ENV;
(process.env as any).NODE_ENV = 'development';
const config = ConfigReader.fromConfigs([
{
data: DATA,
context: CTX,
filteredKeys: ['a', 'b[0]'],
},
]);
expect(withLogCollector(() => config.getOptional('a'))).toMatchObject({
warn: [
"Failed to read configuration value at 'a' as it is not visible. See https://backstage.io/docs/conf/defining#visibility for instructions on how to make it visible.",
],
});
expect(withLogCollector(() => config.getOptionalString('a'))).toMatchObject(
{
warn: [
"Failed to read configuration value at 'a' as it is not visible. See https://backstage.io/docs/conf/defining#visibility for instructions on how to make it visible.",
],
},
);
expect(
withLogCollector(() => config.getOptionalConfigArray('b')),
).toMatchObject({
warn: [
"Failed to read configuration array at 'b' as it does not have any visible elements. See https://backstage.io/docs/conf/defining#visibility for instructions on how to make it visible.",
],
});
(process.env as any).NODE_ENV = oldEnv;
});
it('should not warn when accessing filtered keys outside of development mode', () => {
const config = ConfigReader.fromConfigs([
{
data: DATA,
context: CTX,
filteredKeys: ['a', 'b[0]'],
},
]);
expect(withLogCollector(() => config.getOptional('a'))).toMatchObject({
warn: [],
});
expect(
withLogCollector(() => config.getOptionalString('a')),
).toMatchObject({ warn: [] });
expect(
withLogCollector(() => config.getOptionalConfigArray('b')),
).toMatchObject({ warn: [] });
});
});
describe('ConfigReader with fallback', () => {
+63 -14
View File
@@ -55,6 +55,15 @@ const errors = {
};
export class ConfigReader implements Config {
/**
* A set of key paths that where removed from the config due to not being visible.
*
* This was added as a mutable private member to avoid changes to the public API.
* Its only purpose of this is to warn users of missing visibility when running
* the frontend in development mode.
*/
private filteredKeys?: string[];
static fromConfigs(configs: AppConfig[]): ConfigReader {
if (configs.length === 0) {
return new ConfigReader(undefined);
@@ -62,9 +71,14 @@ export class ConfigReader implements Config {
// Merge together all configs into a single config with recursive fallback
// readers, giving the first config object in the array the lowest priority.
return configs.reduce<ConfigReader>((previousReader, { data, context }) => {
return new ConfigReader(data, context, previousReader);
}, undefined!);
return configs.reduce<ConfigReader>(
(previousReader, { data, context, filteredKeys }) => {
const reader = new ConfigReader(data, context, previousReader);
reader.filteredKeys = filteredKeys;
return reader;
},
undefined!,
);
}
constructor(
@@ -101,6 +115,18 @@ export class ConfigReader implements Config {
const fallbackValue = this.fallback?.getOptional<T>(key);
if (value === undefined) {
if (process.env.NODE_ENV === 'development') {
if (fallbackValue === undefined && key) {
const fullKey = this.fullKey(key);
if (this.filteredKeys?.includes(fullKey)) {
// eslint-disable-next-line no-console
console.warn(
`Failed to read configuration value at '${fullKey}' as it is not visible. ` +
'See https://backstage.io/docs/conf/defining#visibility for instructions on how to make it visible.',
);
}
}
}
return fallbackValue;
} else if (fallbackValue === undefined) {
return value as T;
@@ -127,10 +153,9 @@ export class ConfigReader implements Config {
getOptionalConfig(key: string): ConfigReader | undefined {
const value = this.readValue(key);
const fallbackConfig = this.fallback?.getOptionalConfig(key);
const prefix = this.fullKey(key);
if (isObject(value)) {
return new ConfigReader(value, this.context, fallbackConfig, prefix);
return this.copy(value, key, fallbackConfig);
}
if (value !== undefined) {
throw new TypeError(
@@ -163,18 +188,20 @@ export class ConfigReader implements Config {
});
if (!configs) {
if (process.env.NODE_ENV === 'development') {
const fullKey = this.fullKey(key);
if (this.filteredKeys?.some(k => k.startsWith(fullKey))) {
// eslint-disable-next-line no-console
console.warn(
`Failed to read configuration array at '${key}' as it does not have any visible elements. ` +
'See https://backstage.io/docs/conf/defining#visibility for instructions on how to make it visible.',
);
}
}
return undefined;
}
return configs.map(
(obj, index) =>
new ConfigReader(
obj,
this.context,
undefined,
this.fullKey(`${key}[${index}]`),
),
);
return configs.map((obj, index) => this.copy(obj, `${key}[${index}]`));
}
getNumber(key: string): number {
@@ -261,6 +288,17 @@ export class ConfigReader implements Config {
return `${this.prefix}${this.prefix ? '.' : ''}${key}`;
}
private copy(data: JsonObject, key: string, fallback?: ConfigReader) {
const reader = new ConfigReader(
data,
this.context,
fallback,
this.fullKey(key),
);
reader.filteredKeys = this.filteredKeys;
return reader;
}
private readConfigValue<T extends JsonValue>(
key: string,
validate: (
@@ -270,6 +308,17 @@ export class ConfigReader implements Config {
const value = this.readValue(key);
if (value === undefined) {
if (process.env.NODE_ENV === 'development') {
const fullKey = this.fullKey(key);
if (this.filteredKeys?.includes(fullKey)) {
// eslint-disable-next-line no-console
console.warn(
`Failed to read configuration value at '${fullKey}' as it is not visible. ` +
'See https://backstage.io/docs/conf/defining#visibility for instructions on how to make it visible.',
);
}
}
return this.fallback?.readConfigValue(key, validate);
}
const result = validate(value);
+1
View File
@@ -22,6 +22,7 @@ export type JsonValue = JsonObject | JsonArray | JsonPrimitive;
export type AppConfig = {
context: string;
data: JsonObject;
filteredKeys?: string[];
};
export type Config = {
+32
View File
@@ -1,5 +1,37 @@
# @backstage/core-app-api
## 0.1.7
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.3.0
- @backstage/config@0.1.6
- @backstage/core-plugin-api@0.1.5
## 0.1.6
### Patch Changes
- 9d40fcb1e: - Bumping `material-ui/core` version to at least `4.12.2` as they made some breaking changes in later versions which broke `Pagination` of the `Table`.
- Switching out `material-table` to `@material-table/core` for support for the later versions of `material-ui/core`
- This causes a minor API change to `@backstage/core-components` as the interface for `Table` re-exports the `prop` from the underlying `Table` components.
- `onChangeRowsPerPage` has been renamed to `onRowsPerPageChange`
- `onChangePage` has been renamed to `onPageChange`
- Migration guide is here: https://material-table-core.com/docs/breaking-changes
- Updated dependencies
- @backstage/core-components@0.2.0
- @backstage/core-plugin-api@0.1.4
- @backstage/theme@0.2.9
## 0.1.5
### Patch Changes
- ea249c6e6: Fix a bug in `FlatRoutes` that prevented outlets from working with the root route, as well as matching root routes too broadly.
- Updated dependencies
- @backstage/core-components@0.1.6
## 0.1.4
### Patch Changes
+115
View File
@@ -54,6 +54,8 @@ import { StorageApi } from '@backstage/core-plugin-api';
import { StorageValueChange } from '@backstage/core-plugin-api';
import { SubRouteRef } from '@backstage/core-plugin-api';
// Warning: (ae-missing-release-tag) "AlertApiForwarder" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export class AlertApiForwarder implements AlertApi {
// (undocumented)
@@ -62,6 +64,8 @@ export class AlertApiForwarder implements AlertApi {
post(alert: AlertMessage): void;
}
// Warning: (ae-missing-release-tag) "ApiFactoryHolder" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type ApiFactoryHolder = {
get<T>(
@@ -77,6 +81,8 @@ export type ApiFactoryHolder = {
| undefined;
};
// Warning: (ae-missing-release-tag) "ApiFactoryRegistry" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export class ApiFactoryRegistry implements ApiFactoryHolder {
// (undocumented)
@@ -93,6 +99,7 @@ export class ApiFactoryRegistry implements ApiFactoryHolder {
| undefined;
// (undocumented)
getAllApis(): Set<AnyApiRef>;
// Warning: (ae-forgotten-export) The symbol "ApiFactoryScope" needs to be exported by the entry point index.d.ts
register<
Api,
Impl extends Api,
@@ -102,6 +109,8 @@ export class ApiFactoryRegistry implements ApiFactoryHolder {
>(scope: ApiFactoryScope, factory: ApiFactory<Api, Impl, Deps>): boolean;
}
// Warning: (ae-missing-release-tag) "ApiProvider" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const ApiProvider: {
({ apis, children }: PropsWithChildren<ApiProviderProps>): JSX.Element;
@@ -115,19 +124,31 @@ export const ApiProvider: {
};
};
// Warning: (ae-missing-release-tag) "ApiRegistry" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export class ApiRegistry implements ApiHolder {
constructor(apis: Map<string, unknown>);
// Warning: (ae-forgotten-export) The symbol "ApiRegistryBuilder" needs to be exported by the entry point index.d.ts
//
// (undocumented)
static builder(): ApiRegistryBuilder;
// Warning: (ae-forgotten-export) The symbol "ApiImpl" needs to be exported by the entry point index.d.ts
//
// (undocumented)
static from(apis: ApiImpl[]): ApiRegistry;
// (undocumented)
get<T>(api: ApiRef<T>): T | undefined;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
static with<T>(api: ApiRef<T>, impl: T): ApiRegistry;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
with<T>(api: ApiRef<T>, impl: T): ApiRegistry;
}
// Warning: (ae-missing-release-tag) "ApiResolver" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export class ApiResolver implements ApiHolder {
constructor(factories: ApiFactoryHolder);
@@ -139,6 +160,8 @@ export class ApiResolver implements ApiHolder {
): void;
}
// Warning: (ae-missing-release-tag) "AppComponents" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type AppComponents = {
NotFoundErrorPage: ComponentType<{}>;
@@ -149,9 +172,13 @@ export type AppComponents = {
SignInPage?: ComponentType<SignInPageProps>;
};
// Warning: (ae-missing-release-tag) "AppConfigLoader" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type AppConfigLoader = () => Promise<AppConfig[]>;
// Warning: (ae-missing-release-tag) "AppContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type AppContext = {
getPlugins(): BackstagePlugin<any, any>[];
@@ -159,6 +186,8 @@ export type AppContext = {
getComponents(): AppComponents;
};
// Warning: (ae-missing-release-tag) "AppOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type AppOptions = {
apis?: Iterable<AnyApiFactory>;
@@ -173,6 +202,11 @@ export type AppOptions = {
bindRoutes?(context: { bind: AppRouteBinder }): void;
};
// Warning: (ae-forgotten-export) The symbol "PartialKeys" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "TargetRouteMap" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "KeysWithType" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "AppRouteBinder" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type AppRouteBinder = <
ExternalRoutes extends {
@@ -186,6 +220,8 @@ export type AppRouteBinder = <
>,
) => void;
// Warning: (ae-missing-release-tag) "AppThemeSelector" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export class AppThemeSelector implements AppThemeApi {
constructor(themes: AppTheme[]);
@@ -201,8 +237,12 @@ export class AppThemeSelector implements AppThemeApi {
setActiveThemeId(themeId?: string): void;
}
// Warning: (ae-missing-release-tag) "Auth0Auth" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export class Auth0Auth {
// Warning: (ae-forgotten-export) The symbol "OAuthApiCreateOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
static create({
discoveryApi,
@@ -213,6 +253,8 @@ export class Auth0Auth {
}: OAuthApiCreateOptions): typeof auth0AuthApiRef.T;
}
// Warning: (ae-missing-release-tag) "BackstageApp" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type BackstageApp = {
getPlugins(): BackstagePlugin<any, any>[];
@@ -221,6 +263,8 @@ export type BackstageApp = {
getRouter(): ComponentType<{}>;
};
// Warning: (ae-missing-release-tag) "BackstagePluginWithAnyOutput" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type BackstagePluginWithAnyOutput = Omit<
BackstagePlugin<any, any>,
@@ -229,6 +273,8 @@ export type BackstagePluginWithAnyOutput = Omit<
output(): (PluginOutput | UnknownPluginOutput)[];
};
// Warning: (ae-missing-release-tag) "BootErrorPageProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type BootErrorPageProps = {
step: 'load-config' | 'load-chunk';
@@ -237,12 +283,19 @@ export type BootErrorPageProps = {
export { ConfigReader };
// Warning: (ae-forgotten-export) The symbol "PrivateAppImpl" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "createApp" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function createApp(options?: AppOptions): PrivateAppImpl;
// Warning: (ae-missing-release-tag) "defaultConfigLoader" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const defaultConfigLoader: AppConfigLoader;
// Warning: (ae-missing-release-tag) "ErrorAlerter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export class ErrorAlerter implements ErrorApi {
constructor(alertApi: AlertApi, errorApi: ErrorApi);
@@ -259,6 +312,8 @@ export class ErrorAlerter implements ErrorApi {
post(error: Error, context?: ErrorContext): void;
}
// Warning: (ae-missing-release-tag) "ErrorApiForwarder" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export class ErrorApiForwarder implements ErrorApi {
// (undocumented)
@@ -270,6 +325,8 @@ export class ErrorApiForwarder implements ErrorApi {
post(error: Error, context?: ErrorContext): void;
}
// Warning: (ae-missing-release-tag) "ErrorBoundaryFallbackProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type ErrorBoundaryFallbackProps = {
plugin?: BackstagePlugin;
@@ -277,9 +334,13 @@ export type ErrorBoundaryFallbackProps = {
resetError: () => void;
};
// Warning: (ae-missing-release-tag) "FeatureFlagged" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const FeatureFlagged: (props: FeatureFlaggedProps) => JSX.Element;
// Warning: (ae-missing-release-tag) "FeatureFlaggedProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type FeatureFlaggedProps = {
children: ReactNode;
@@ -292,11 +353,17 @@ export type FeatureFlaggedProps = {
}
);
// Warning: (ae-forgotten-export) The symbol "FlatRoutesProps" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "FlatRoutes" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const FlatRoutes: (props: FlatRoutesProps) => JSX.Element | null;
// Warning: (ae-missing-release-tag) "GithubAuth" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export class GithubAuth implements OAuthApi, SessionApi {
// Warning: (ae-forgotten-export) The symbol "SessionManager" needs to be exported by the entry point index.d.ts
constructor(sessionManager: SessionManager<GithubSession>);
// (undocumented)
static create({
@@ -324,6 +391,8 @@ export class GithubAuth implements OAuthApi, SessionApi {
signOut(): Promise<void>;
}
// Warning: (ae-missing-release-tag) "GithubSession" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type GithubSession = {
providerInfo: {
@@ -335,6 +404,8 @@ export type GithubSession = {
backstageIdentity: BackstageIdentity;
};
// Warning: (ae-missing-release-tag) "GitlabAuth" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export class GitlabAuth {
// (undocumented)
@@ -347,6 +418,8 @@ export class GitlabAuth {
}: OAuthApiCreateOptions): typeof gitlabAuthApiRef.T;
}
// Warning: (ae-missing-release-tag) "GoogleAuth" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export class GoogleAuth {
// (undocumented)
@@ -359,6 +432,8 @@ export class GoogleAuth {
}: OAuthApiCreateOptions): typeof googleAuthApiRef.T;
}
// Warning: (ae-missing-release-tag) "LocalStorageFeatureFlags" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export class LocalStorageFeatureFlags implements FeatureFlagsApi {
// (undocumented)
@@ -371,6 +446,8 @@ export class LocalStorageFeatureFlags implements FeatureFlagsApi {
save(options: FeatureFlagsSaveOptions): void;
}
// Warning: (ae-missing-release-tag) "MicrosoftAuth" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export class MicrosoftAuth {
// (undocumented)
@@ -383,6 +460,8 @@ export class MicrosoftAuth {
}: OAuthApiCreateOptions): typeof microsoftAuthApiRef.T;
}
// Warning: (ae-missing-release-tag) "OAuth2" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export class OAuth2
implements
@@ -391,7 +470,10 @@ export class OAuth2
ProfileInfoApi,
BackstageIdentityApi,
SessionApi {
// Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts
constructor(options: Options);
// Warning: (ae-forgotten-export) The symbol "CreateOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
static create({
discoveryApi,
@@ -422,6 +504,8 @@ export class OAuth2
signOut(): Promise<void>;
}
// Warning: (ae-missing-release-tag) "OAuth2Session" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type OAuth2Session = {
providerInfo: {
@@ -434,6 +518,8 @@ export type OAuth2Session = {
backstageIdentity: BackstageIdentity;
};
// Warning: (ae-missing-release-tag) "OAuthRequestManager" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export class OAuthRequestManager implements OAuthRequestApi {
// (undocumented)
@@ -442,6 +528,8 @@ export class OAuthRequestManager implements OAuthRequestApi {
createAuthRequester<T>(options: AuthRequesterOptions<T>): AuthRequester<T>;
}
// Warning: (ae-missing-release-tag) "OktaAuth" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export class OktaAuth {
// (undocumented)
@@ -454,8 +542,12 @@ export class OktaAuth {
}: OAuthApiCreateOptions): typeof oktaAuthApiRef.T;
}
// Warning: (ae-missing-release-tag) "OneLoginAuth" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export class OneLoginAuth {
// Warning: (ae-forgotten-export) The symbol "CreateOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
static create({
discoveryApi,
@@ -465,10 +557,15 @@ export class OneLoginAuth {
}: CreateOptions_2): typeof oneloginAuthApiRef.T;
}
// Warning: (ae-missing-release-tag) "SamlAuth" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export class SamlAuth
implements ProfileInfoApi, BackstageIdentityApi, SessionApi {
// Warning: (ae-forgotten-export) The symbol "SamlSession" needs to be exported by the entry point index.d.ts
constructor(sessionManager: SessionManager<SamlSession>);
// Warning: (ae-forgotten-export) The symbol "AuthApiCreateOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
static create({
discoveryApi,
@@ -489,11 +586,15 @@ export class SamlAuth
signOut(): Promise<void>;
}
// Warning: (ae-missing-release-tag) "SignInPageProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type SignInPageProps = {
onResult(result: SignInResult): void;
};
// Warning: (ae-missing-release-tag) "SignInResult" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type SignInResult = {
userId: string;
@@ -502,11 +603,15 @@ export type SignInResult = {
signOut?: () => Promise<void>;
};
// Warning: (ae-missing-release-tag) "UnhandledErrorForwarder" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export class UnhandledErrorForwarder {
static forward(errorApi: ErrorApi, errorContext: ErrorContext): void;
}
// Warning: (ae-missing-release-tag) "UrlPatternDiscovery" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export class UrlPatternDiscovery implements DiscoveryApi {
static compile(pattern: string): UrlPatternDiscovery;
@@ -514,9 +619,13 @@ export class UrlPatternDiscovery implements DiscoveryApi {
getBaseUrl(pluginId: string): Promise<string>;
}
// Warning: (ae-missing-release-tag) "WebStorage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export class WebStorage implements StorageApi {
constructor(namespace: string, errorApi: ErrorApi);
// Warning: (ae-forgotten-export) The symbol "CreateStorageApiOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
static create(options: CreateStorageApiOptions): WebStorage;
// (undocumented)
@@ -531,5 +640,11 @@ export class WebStorage implements StorageApi {
set<T>(key: string, data: T): Promise<void>;
}
// Warnings were encountered during analysis:
//
// src/apis/system/ApiProvider.d.ts:9:5 - (ae-forgotten-export) The symbol "ApiProviderProps" needs to be exported by the entry point index.d.ts
// src/app/types.d.ts:88:5 - (ae-forgotten-export) The symbol "UnknownPluginOutput" needs to be exported by the entry point index.d.ts
// src/app/types.d.ts:99:5 - (ae-forgotten-export) The symbol "AppIcons" needs to be exported by the entry point index.d.ts
// (No @packageDocumentation comment for this package)
```
+9 -9
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/core-app-api",
"description": "Core app API used by Backstage apps",
"version": "0.1.4",
"version": "0.1.7",
"private": false,
"publishConfig": {
"access": "public",
@@ -29,13 +29,13 @@
"clean": "backstage-cli clean"
},
"dependencies": {
"@backstage/core-components": "^0.1.4",
"@backstage/config": "^0.1.3",
"@backstage/core-plugin-api": "^0.1.3",
"@backstage/theme": "^0.2.8",
"@material-ui/core": "^4.11.0",
"@backstage/core-components": "^0.3.0",
"@backstage/config": "^0.1.6",
"@backstage/core-plugin-api": "^0.1.5",
"@backstage/theme": "^0.2.9",
"@material-ui/core": "^4.12.2",
"@material-ui/icons": "^4.9.1",
"@types/react": "^16.9",
"@types/react": "*",
"@types/prop-types": "^15.7.3",
"prop-types": "^15.7.2",
"react": "^16.12.0",
@@ -44,8 +44,8 @@
"zen-observable": "^0.8.15"
},
"devDependencies": {
"@backstage/cli": "^0.7.3",
"@backstage/test-utils": "^0.1.14",
"@backstage/cli": "^0.7.7",
"@backstage/test-utils": "^0.1.16",
"@backstage/test-utils-core": "^0.1.1",
"@testing-library/jest-dom": "^5.10.1",
"@testing-library/react": "^11.2.5",
@@ -100,7 +100,6 @@ describe('FlatRoutes', () => {
return <>Outlet: {useOutlet()}</>;
};
// The '/*' suffixes here are intentional and will be ignored by FlatRoutes
const routes = (
<>
<Route path="/a" element={<MyPage />}>
@@ -112,11 +111,15 @@ describe('FlatRoutes', () => {
<Route path="/b" element={<MyPage />}>
b
</Route>
<Route path="/" element={<MyPage />}>
c
</Route>
</>
);
const renderRoute = makeRouteRenderer(<FlatRoutes>{routes}</FlatRoutes>);
expect(renderRoute('/a').getByText('Outlet: a')).toBeInTheDocument();
expect(renderRoute('/a/b').getByText('Outlet: a-b')).toBeInTheDocument();
expect(renderRoute('/b').getByText('Outlet: b')).toBeInTheDocument();
expect(renderRoute('/').getByText('Outlet: c')).toBeInTheDocument();
});
});
@@ -49,8 +49,10 @@ export const FlatRoutes = (props: FlatRoutesProps): JSX.Element | null => {
element: child,
children: child.props.children
? [
// These are the children of each route, which we all add in under a catch-all
// subroute in order to make them available to `useOutlet`
{
path: '/*',
path: path === '/' ? '/' : '/*', // The root path must require an exact match
element: child.props.children,
},
]
+73
View File
@@ -1,5 +1,78 @@
# @backstage/core-components
## 0.3.0
### Minor Changes
- 7bf006210: Remove unused props from InfoCard prop type
### Patch Changes
- c4d8ff963: Switched frontend identity code to use `token` instead of the deprecated `idToken` field
- 7b8aa8d0d: Move the `CreateComponentButton` from the catalog plugin to the `core-components` & rename it to `CreateButton` to be reused inside the api-docs plugin & scaffolder plugin, but also future plugins. Additionally, improve responsiveness of `CreateButton` & `SupportButton` by shrinking them to `IconButtons` on smaller screens.
- 260c053b9: Fix All Material UI Warnings
- Updated dependencies
- @backstage/config@0.1.6
- @backstage/core-plugin-api@0.1.5
## 0.2.0
### Minor Changes
- 9d40fcb1e: - Bumping `material-ui/core` version to at least `4.12.2` as they made some breaking changes in later versions which broke `Pagination` of the `Table`.
- Switching out `material-table` to `@material-table/core` for support for the later versions of `material-ui/core`
- This causes a minor API change to `@backstage/core-components` as the interface for `Table` re-exports the `prop` from the underlying `Table` components.
- `onChangeRowsPerPage` has been renamed to `onRowsPerPageChange`
- `onChangePage` has been renamed to `onPageChange`
- Migration guide is here: https://material-table-core.com/docs/breaking-changes
### Patch Changes
- 19d9995b6: Improve accessibility of core & catalog components by adjusting them with non-breaking changes.
- 224e54484: Added an `EntityProcessingErrorsPanel` component to show any errors that occurred when refreshing an entity from its source location.
If upgrading, this should be added to your `EntityPage` in your Backstage application:
```diff
// packages/app/src/components/catalog/EntityPage.tsx
const overviewContent = (
...
<EntityOrphanWarning />
</Grid>
</EntitySwitch.Case>
</EntitySwitch>
+ <EntitySwitch>
+ <EntitySwitch.Case if={hasCatalogProcessingErrors}>
+ <Grid item xs={12}>
+ <EntityProcessingErrorsPanel />
+ </Grid>
+ </EntitySwitch.Case>
+ </EntitySwitch>
```
Additionally, `WarningPanel` now changes color based on the provided severity.
- Updated dependencies
- @backstage/core-plugin-api@0.1.4
- @backstage/theme@0.2.9
## 0.1.6
### Patch Changes
- 9a751bb28: Increase the vertical padding of the sidebar search input field to match the height of the parent anchor tag. This prevents users from accidentally navigating to the search page when they actually wanted to use the search input directly.
- 45b5fc3a8: Updated the layout of catalog and API index pages to handle smaller screen sizes. This adds responsive wrappers to the entity tables, and switches filters to a drawer when width-constrained. If you have created a custom catalog or API index page, you will need to update the page structure to match the updated [catalog customization](https://backstage.io/docs/features/software-catalog/catalog-customization) documentation.
- 03bf17e9b: Improve the responsiveness of the EntityPage UI. With this the Header component should scale with the screen size & wrapping should not cause overflowing/blocking of links. Additionally enforce the Pages using the Grid Layout to use it across all screen sizes & to wrap as intended.
To benefit from the improved responsive layout, the `EntityPage` in existing Backstage applications should be updated to set the `xs` column size on each grid item in the page, as this does not default. For example:
```diff
- <Grid item md={6}>
+ <Grid item xs={12} md={6}>
```
## 0.1.5
### Patch Changes
+348 -11
View File
@@ -11,7 +11,7 @@ import { Breadcrumbs as Breadcrumbs_2 } from '@material-ui/core';
import { ButtonProps } from '@material-ui/core';
import { ButtonTypeMap } from '@material-ui/core';
import { CardHeaderProps } from '@material-ui/core';
import { Column } from 'material-table';
import { Column } from '@material-table/core';
import { CommonProps } from '@material-ui/core/OverridableComponent';
import { ComponentClass } from 'react';
import { ComponentProps } from 'react';
@@ -26,7 +26,7 @@ import { IconComponent } from '@backstage/core-plugin-api';
import { LinearProgressProps } from '@material-ui/core';
import { LinkProps as LinkProps_2 } from '@material-ui/core';
import { LinkProps as LinkProps_3 } from 'react-router-dom';
import { MaterialTableProps } from 'material-table';
import { MaterialTableProps } from '@material-table/core';
import { NavLinkProps } from 'react-router-dom';
import { ProfileInfoApi } from '@backstage/core-plugin-api';
import { PropsWithChildren } from 'react';
@@ -47,9 +47,13 @@ import { Theme } from '@material-ui/core';
import { TooltipProps } from '@material-ui/core';
import { WithStyles } from '@material-ui/core';
// Warning: (ae-missing-release-tag) "AlertDisplay" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const AlertDisplay: () => JSX.Element | null;
// Warning: (ae-missing-release-tag) "Alignment" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
enum Alignment {
// (undocumented)
@@ -62,6 +66,9 @@ enum Alignment {
UP_RIGHT = 'UR',
}
// Warning: (ae-forgotten-export) The symbol "AvatarProps" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "Avatar" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const Avatar: ({
displayName,
@@ -69,12 +76,20 @@ export const Avatar: ({
customStyles,
}: AvatarProps) => JSX.Element;
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "Breadcrumbs" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const Breadcrumbs: ({ children, ...props }: Props_25) => JSX.Element;
export const Breadcrumbs: ({ children, ...props }: Props_24) => JSX.Element;
// Warning: (ae-missing-release-tag) "BrokenImageIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const BrokenImageIcon: IconComponent;
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "Button" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const Button: React_2.ForwardRefExoticComponent<
Pick<
@@ -384,18 +399,28 @@ export const Button: React_2.ForwardRefExoticComponent<
React_2.RefAttributes<any>
>;
// Warning: (ae-forgotten-export) The symbol "CardTabProps" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "CardTab" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const CardTab: ({
children,
...props
}: PropsWithChildren<CardTabProps>) => JSX.Element;
// Warning: (ae-missing-release-tag) "CatalogIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const CatalogIcon: IconComponent;
// Warning: (ae-missing-release-tag) "ChatIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const ChatIcon: IconComponent;
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "CodeSnippet" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const CodeSnippet: ({
text,
@@ -406,6 +431,9 @@ export const CodeSnippet: ({
customStyle,
}: Props_2) => JSX.Element;
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "Content" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const Content: ({
className,
@@ -413,8 +441,11 @@ export const Content: ({
noPadding,
children,
...props
}: PropsWithChildren<Props_18>) => JSX.Element;
}: PropsWithChildren<Props_17>) => JSX.Element;
// Warning: (ae-forgotten-export) The symbol "ContentHeaderProps" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "ContentHeader" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const ContentHeader: ({
description,
@@ -424,6 +455,8 @@ export const ContentHeader: ({
textAlign,
}: PropsWithChildren<ContentHeaderProps>) => JSX.Element;
// Warning: (ae-missing-release-tag) "CopyTextButton" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const CopyTextButton: {
(props: Props_3): JSX.Element;
@@ -434,9 +467,23 @@ export const CopyTextButton: {
};
};
// Warning: (ae-forgotten-export) The symbol "CreateButtonProps" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "CreateButton" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const CreateButton: ({
title,
to,
}: CreateButtonProps) => JSX.Element | null;
// Warning: (ae-missing-release-tag) "DashboardIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const DashboardIcon: IconComponent;
// Warning: (ae-forgotten-export) The symbol "CustomType" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "DependencyEdge" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
type DependencyEdge<T = CustomType> = T & {
from: string;
@@ -444,6 +491,9 @@ type DependencyEdge<T = CustomType> = T & {
label?: string;
};
// Warning: (ae-forgotten-export) The symbol "DependencyGraphProps" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "DependencyGraph" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function DependencyGraph({
edges,
@@ -486,11 +536,15 @@ declare namespace DependencyGraphTypes {
}
export { DependencyGraphTypes };
// Warning: (ae-missing-release-tag) "DependencyNode" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
type DependencyNode<T = CustomType> = T & {
id: string;
};
// Warning: (ae-missing-release-tag) "Direction" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
enum Direction {
// (undocumented)
@@ -503,6 +557,9 @@ enum Direction {
TOP_BOTTOM = 'TB',
}
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "DismissableBanner" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const DismissableBanner: ({
variant,
@@ -511,9 +568,13 @@ export const DismissableBanner: ({
fixed,
}: Props_4) => JSX.Element;
// Warning: (ae-missing-release-tag) "DocsIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const DocsIcon: IconComponent;
// Warning: (ae-missing-release-tag) "EdgeProperties" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
type EdgeProperties = {
label?: string;
@@ -526,9 +587,14 @@ type EdgeProperties = {
[customKey: string]: any;
};
// Warning: (ae-missing-release-tag) "EmailIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const EmailIcon: IconComponent;
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "EmptyState" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const EmptyState: ({
title,
@@ -537,15 +603,23 @@ export const EmptyState: ({
action,
}: Props_5) => JSX.Element;
// Warning: (ae-forgotten-export) The symbol "State" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "ErrorBoundary" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const ErrorBoundary: ComponentClass<ErrorBoundaryProps, State>;
// Warning: (ae-missing-release-tag) "ErrorBoundaryProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type ErrorBoundaryProps = {
slackChannel?: string | SlackChannel;
onError?: (error: Error, errorInfo: string) => null;
};
// Warning: (ae-forgotten-export) The symbol "IErrorPageProps" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "ErrorPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const ErrorPage: ({
status,
@@ -553,6 +627,8 @@ export const ErrorPage: ({
additionalInfo,
}: IErrorPageProps) => JSX.Element;
// Warning: (ae-missing-release-tag) "ErrorPanel" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const ErrorPanel: ({
title,
@@ -561,6 +637,8 @@ export const ErrorPanel: ({
children,
}: PropsWithChildren<ErrorPanelProps>) => JSX.Element;
// Warning: (ae-missing-release-tag) "ErrorPanelProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type ErrorPanelProps = {
error: Error;
@@ -568,6 +646,9 @@ export type ErrorPanelProps = {
title?: string;
};
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "FeatureCalloutCircular" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const FeatureCalloutCircular: ({
featureId,
@@ -576,26 +657,43 @@ export const FeatureCalloutCircular: ({
children,
}: PropsWithChildren<Props_7>) => JSX.Element;
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "Gauge" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const Gauge: (props: Props_14) => JSX.Element;
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "GaugeCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const GaugeCard: (props: Props_13) => JSX.Element;
// Warning: (ae-missing-release-tag) "GitHubIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const GitHubIcon: IconComponent;
// Warning: (ae-missing-release-tag) "GraphEdge" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
type GraphEdge<T = CustomType> = DependencyEdge<T> &
dagre_2.GraphEdge &
EdgeProperties;
// Warning: (ae-missing-release-tag) "GraphNode" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
type GraphNode<T = CustomType> = dagre_2.Node<DependencyNode<T>>;
// Warning: (ae-missing-release-tag) "GroupIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const GroupIcon: IconComponent;
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "Header" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const Header: ({
children,
@@ -606,11 +704,17 @@ export const Header: ({
tooltip,
type,
typeLink,
}: PropsWithChildren<Props_19>) => JSX.Element;
}: PropsWithChildren<Props_18>) => JSX.Element;
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "HeaderIconLinkRow" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const HeaderIconLinkRow: ({ links }: Props_8) => JSX.Element;
// Warning: (ae-forgotten-export) The symbol "HeaderLabelProps" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "HeaderLabel" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const HeaderLabel: ({
label,
@@ -618,6 +722,9 @@ export const HeaderLabel: ({
url,
}: HeaderLabelProps) => JSX.Element;
// Warning: (ae-forgotten-export) The symbol "HeaderTabsProps" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "HeaderTabs" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const HeaderTabs: ({
tabs,
@@ -625,17 +732,26 @@ export const HeaderTabs: ({
selectedIndex,
}: HeaderTabsProps) => JSX.Element;
// Warning: (ae-missing-release-tag) "HelpIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const HelpIcon: IconComponent;
// Warning: (ae-missing-release-tag) "HomepageTimer" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const HomepageTimer: () => JSX.Element | null;
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "HorizontalScrollGrid" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const HorizontalScrollGrid: (
props: PropsWithChildren<Props_9>,
) => JSX.Element;
// Warning: (ae-missing-release-tag) "IconLinkVerticalProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type IconLinkVerticalProps = {
color?: 'primary' | 'secondary';
@@ -647,6 +763,9 @@ export type IconLinkVerticalProps = {
title?: string;
};
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "InfoCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const InfoCard: ({
title,
@@ -667,14 +786,24 @@ export const InfoCard: ({
className,
noPadding,
titleTypographyProps,
}: Props_20) => JSX.Element;
}: Props_19) => JSX.Element;
// Warning: (ae-missing-release-tag) "InfoCardVariants" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type InfoCardVariants = 'flex' | 'fullHeight' | 'gridItem';
// Warning: (ae-forgotten-export) The symbol "IntroCardProps" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "IntroCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const IntroCard: (props: IntroCardProps) => JSX.Element;
// Warning: (tsdoc-malformed-html-name) Invalid HTML element: Expecting an HTML name
// Warning: (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag
// Warning: (ae-forgotten-export) The symbol "ItemCardProps" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "ItemCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public @deprecated
export const ItemCard: ({
description,
@@ -687,17 +816,39 @@ export const ItemCard: ({
href,
}: ItemCardProps) => JSX.Element;
// Warning: (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag
// Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
// Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
// Warning: (tsdoc-html-tag-missing-string) The HTML element has an invalid attribute: Expecting an HTML string starting with a single-quote or double-quote character
// Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
// Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
// Warning: (ae-missing-release-tag) "ItemCardGrid" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const ItemCardGrid: (props: ItemCardGridProps) => JSX.Element;
// Warning: (ae-forgotten-export) The symbol "styles" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "ItemCardGridProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type ItemCardGridProps = Partial<WithStyles<typeof styles>> & {
children?: React_2.ReactNode;
};
// Warning: (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag
// Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
// Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
// Warning: (tsdoc-html-tag-missing-string) The HTML element has an invalid attribute: Expecting an HTML string starting with a single-quote or double-quote character
// Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
// Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
// Warning: (ae-missing-release-tag) "ItemCardHeader" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const ItemCardHeader: (props: ItemCardHeaderProps) => JSX.Element;
// Warning: (ae-forgotten-export) The symbol "styles" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "ItemCardHeaderProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type ItemCardHeaderProps = Partial<WithStyles<typeof styles_2>> & {
title?: React_2.ReactNode;
@@ -705,6 +856,8 @@ export type ItemCardHeaderProps = Partial<WithStyles<typeof styles_2>> & {
children?: React_2.ReactNode;
};
// Warning: (ae-missing-release-tag) "LabelPosition" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
enum LabelPosition {
// (undocumented)
@@ -715,12 +868,20 @@ enum LabelPosition {
RIGHT = 'r',
}
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "Lifecycle" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const Lifecycle: (props: Props_10) => JSX.Element;
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "LinearGauge" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const LinearGauge: ({ value }: Props_15) => JSX.Element | null;
// Warning: (ae-missing-release-tag) "Link" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const Link: React_2.ForwardRefExoticComponent<
Pick<
@@ -1008,37 +1169,67 @@ export const Link: React_2.ForwardRefExoticComponent<
React_2.RefAttributes<any>
>;
// Warning: (ae-missing-release-tag) "LinkProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type LinkProps = LinkProps_2 &
LinkProps_3 & {
component?: ElementType<any>;
};
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "MarkdownContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const MarkdownContent: ({ content, dialect }: Props_11) => JSX.Element;
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "MissingAnnotationEmptyState" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const MissingAnnotationEmptyState: ({
annotation,
}: Props_6) => JSX.Element;
// Warning: (ae-missing-release-tag) "OAuthRequestDialog" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const OAuthRequestDialog: () => JSX.Element;
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "OverflowTooltip" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const OverflowTooltip: (props: Props_12) => JSX.Element;
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "Page" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const Page: ({
themeId,
children,
}: PropsWithChildren<Props_21>) => JSX.Element;
}: PropsWithChildren<Props_20>) => JSX.Element;
// Warning: (ae-forgotten-export) The symbol "PageWithHeaderProps" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "PageWithHeader" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const PageWithHeader: ({
themeId,
children,
...props
}: PropsWithChildren<PageWithHeaderProps>) => JSX.Element;
// Warning: (ae-missing-release-tag) "Progress" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const Progress: (
props: PropsWithChildren<LinearProgressProps>,
) => JSX.Element;
// Warning: (ae-missing-release-tag) "Ranker" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
enum Ranker {
// (undocumented)
@@ -1049,22 +1240,32 @@ enum Ranker {
TIGHT_TREE = 'tight-tree',
}
// Warning: (ae-missing-release-tag) "RenderLabelFunction" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
type RenderLabelFunction = (props: RenderLabelProps<any>) => React.ReactNode;
// Warning: (ae-missing-release-tag) "RenderLabelProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
type RenderLabelProps<T = CustomType> = {
edge: DependencyEdge<T>;
};
// Warning: (ae-missing-release-tag) "RenderNodeFunction" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
type RenderNodeFunction = (props: RenderNodeProps<any>) => React.ReactNode;
// Warning: (ae-missing-release-tag) "RenderNodeProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
type RenderNodeProps<T = CustomType> = {
node: DependencyNode<T>;
};
// Warning: (ae-missing-release-tag) "ResponseErrorPanel" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const ResponseErrorPanel: ({
title,
@@ -1072,9 +1273,14 @@ export const ResponseErrorPanel: ({
defaultExpanded,
}: ErrorPanelProps) => JSX.Element;
// Warning: (ae-missing-release-tag) "RoutedTabs" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const RoutedTabs: ({ routes }: { routes: SubRoute_2[] }) => JSX.Element;
// Warning: (ae-forgotten-export) The symbol "SelectProps" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "SelectComponent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const Select: ({
multiple,
@@ -1086,17 +1292,24 @@ export const Select: ({
triggerReset,
}: SelectProps) => JSX.Element;
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "Sidebar" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const Sidebar: ({
openDelayMs,
closeDelayMs,
children,
}: PropsWithChildren<Props_22>) => JSX.Element;
}: PropsWithChildren<Props_21>) => JSX.Element;
// Warning: (ae-missing-release-tag) "SIDEBAR_INTRO_LOCAL_STORAGE" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const SIDEBAR_INTRO_LOCAL_STORAGE =
'@backstage/core/sidebar-intro-dismissed';
// Warning: (ae-missing-release-tag) "sidebarConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const sidebarConfig: {
drawerWidthClosed: number;
@@ -1113,14 +1326,20 @@ export const sidebarConfig: {
userBadgeDiameter: number;
};
// Warning: (ae-missing-release-tag) "SidebarContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const SidebarContext: Context<SidebarContextType>;
// Warning: (ae-missing-release-tag) "SidebarContextType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type SidebarContextType = {
isOpen: boolean;
};
// Warning: (ae-missing-release-tag) "SidebarDivider" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const SidebarDivider: React_2.ComponentType<
Pick<
@@ -1388,26 +1607,39 @@ export const SidebarDivider: React_2.ComponentType<
}
>;
// Warning: (ae-missing-release-tag) "SidebarIntro" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const SidebarIntro: () => JSX.Element | null;
// Warning: (ae-forgotten-export) The symbol "SidebarItemProps" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "SidebarItem" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const SidebarItem: React_2.ForwardRefExoticComponent<
SidebarItemProps & React_2.RefAttributes<any>
>;
// Warning: (ae-missing-release-tag) "SidebarPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const SidebarPage: (props: PropsWithChildren<{}>) => JSX.Element;
// Warning: (ae-missing-release-tag) "SidebarPinStateContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const SidebarPinStateContext: React_2.Context<SidebarPinStateContextType>;
// Warning: (ae-missing-release-tag) "SidebarPinStateContextType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type SidebarPinStateContextType = {
isPinned: boolean;
toggleSidebarPinState: () => any;
};
// Warning: (ae-missing-release-tag) "SidebarScrollWrapper" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const SidebarScrollWrapper: React_2.ComponentType<
Pick<
@@ -1675,11 +1907,16 @@ export const SidebarScrollWrapper: React_2.ComponentType<
}
>;
// Warning: (ae-forgotten-export) The symbol "SidebarSearchFieldProps" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "SidebarSearchField" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const SidebarSearchField: (
props: SidebarSearchFieldProps,
) => JSX.Element;
// Warning: (ae-missing-release-tag) "SidebarSpace" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const SidebarSpace: React_2.ComponentType<
Pick<
@@ -1947,6 +2184,8 @@ export const SidebarSpace: React_2.ComponentType<
}
>;
// Warning: (ae-missing-release-tag) "SidebarSpacer" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const SidebarSpacer: React_2.ComponentType<
Pick<
@@ -2214,9 +2453,14 @@ export const SidebarSpacer: React_2.ComponentType<
}
>;
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "SignInPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const SignInPage: (props: Props_23) => JSX.Element;
export const SignInPage: (props: Props_22) => JSX.Element;
// Warning: (ae-missing-release-tag) "SignInProviderConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type SignInProviderConfig = {
id: string;
@@ -2225,6 +2469,9 @@ export type SignInProviderConfig = {
apiRef: ApiRef<ProfileInfoApi & BackstageIdentityApi & SessionApi>;
};
// Warning: (ae-forgotten-export) The symbol "StepperProps" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "SimpleStepper" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const SimpleStepper: ({
children,
@@ -2233,6 +2480,9 @@ export const SimpleStepper: ({
activeStep,
}: PropsWithChildren<StepperProps>) => JSX.Element;
// Warning: (ae-forgotten-export) The symbol "StepProps" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "SimpleStepperStep" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const SimpleStepperStep: ({
title,
@@ -2242,24 +2492,39 @@ export const SimpleStepperStep: ({
...muiProps
}: PropsWithChildren<StepProps>) => JSX.Element;
// Warning: (ae-missing-release-tag) "StatusAborted" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const StatusAborted: (props: PropsWithChildren<{}>) => JSX.Element;
// Warning: (ae-missing-release-tag) "StatusError" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const StatusError: (props: PropsWithChildren<{}>) => JSX.Element;
// Warning: (ae-missing-release-tag) "StatusOK" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const StatusOK: (props: PropsWithChildren<{}>) => JSX.Element;
// Warning: (ae-missing-release-tag) "StatusPending" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const StatusPending: (props: PropsWithChildren<{}>) => JSX.Element;
// Warning: (ae-missing-release-tag) "StatusRunning" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const StatusRunning: (props: PropsWithChildren<{}>) => JSX.Element;
// Warning: (ae-missing-release-tag) "StatusWarning" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const StatusWarning: (props: PropsWithChildren<{}>) => JSX.Element;
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "StructuredMetadataTable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const StructuredMetadataTable: ({
metadata,
@@ -2267,24 +2532,34 @@ export const StructuredMetadataTable: ({
options,
}: Props_16) => JSX.Element;
// Warning: (ae-forgotten-export) The symbol "SubvalueCellProps" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "SubvalueCell" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const SubvalueCell: ({
value,
subvalue,
}: SubvalueCellProps) => JSX.Element;
// Warning: (ae-forgotten-export) The symbol "SupportButtonProps" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "SupportButton" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const SupportButton: ({
title,
children,
}: SupportButtonProps) => JSX.Element;
// Warning: (ae-missing-release-tag) "SupportConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type SupportConfig = {
url: string;
items: SupportItem[];
};
// Warning: (ae-missing-release-tag) "SupportItem" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type SupportItem = {
title: string;
@@ -2292,12 +2567,16 @@ export type SupportItem = {
links: SupportItemLink[];
};
// Warning: (ae-missing-release-tag) "SupportItemLink" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type SupportItemLink = {
url: string;
title: string;
};
// Warning: (ae-missing-release-tag) "Tab" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type Tab = {
id: string;
@@ -2310,6 +2589,9 @@ export type Tab = {
>;
};
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "TabbedCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const TabbedCard: ({
slackChannel,
@@ -2319,14 +2601,18 @@ export const TabbedCard: ({
deepLink,
value,
onChange,
}: PropsWithChildren<Props_24>) => JSX.Element;
}: PropsWithChildren<Props_23>) => JSX.Element;
// Warning: (ae-missing-release-tag) "TabbedLayout" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const TabbedLayout: {
({ children }: PropsWithChildren<{}>): JSX.Element;
Route: (props: SubRoute) => null;
};
// Warning: (ae-missing-release-tag) "Table" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function Table<T extends object = {}>({
columns,
@@ -2340,6 +2626,8 @@ export function Table<T extends object = {}>({
...props
}: TableProps<T>): JSX.Element;
// Warning: (ae-missing-release-tag) "TableColumn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface TableColumn<T extends object = {}> extends Column<T> {
// (undocumented)
@@ -2348,12 +2636,16 @@ export interface TableColumn<T extends object = {}> extends Column<T> {
width?: string;
}
// Warning: (ae-missing-release-tag) "TableFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type TableFilter = {
column: string;
type: 'select' | 'multiple-select' | 'checkbox-tree';
};
// Warning: (ae-missing-release-tag) "TableProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface TableProps<T extends object = {}>
extends MaterialTableProps<T> {
@@ -2371,6 +2663,8 @@ export interface TableProps<T extends object = {}>
subtitle?: string;
}
// Warning: (ae-missing-release-tag) "TableState" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type TableState = {
search?: string;
@@ -2378,9 +2672,14 @@ export type TableState = {
filters?: SelectedFilters;
};
// Warning: (ae-forgotten-export) The symbol "TabsProps" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "Tabs" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const Tabs: ({ tabs }: TabsProps) => JSX.Element;
// Warning: (ae-missing-release-tag) "TrendLine" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const TrendLine: (
props: SparklinesProps &
@@ -2389,23 +2688,61 @@ export const TrendLine: (
},
) => JSX.Element | null;
// Warning: (ae-forgotten-export) The symbol "SetQueryParams" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "useQueryParamState" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function useQueryParamState<T>(
stateName: string,
debounceTime?: number,
): [T | undefined, SetQueryParams<T>];
// Warning: (ae-missing-release-tag) "UserIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const UserIcon: IconComponent;
// Warning: (ae-missing-release-tag) "useSupportConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function useSupportConfig(): SupportConfig;
// Warning: (ae-missing-release-tag) "WarningIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const WarningIcon: IconComponent;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-with-invalid-optional-name) The @param should not include a JSDoc-style optional name; it must not be enclosed in '[ ]' brackets.
// Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-with-invalid-optional-name) The @param should not include a JSDoc-style optional name; it must not be enclosed in '[ ]' brackets.
// Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-with-invalid-optional-name) The @param should not include a JSDoc-style optional name; it must not be enclosed in '[ ]' brackets.
// Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-with-invalid-optional-name) The @param should not include a JSDoc-style optional name; it must not be enclosed in '[ ]' brackets.
// Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
// Warning: (ae-forgotten-export) The symbol "WarningProps" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "WarningPanel" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const WarningPanel: (props: Props_17) => JSX.Element;
export const WarningPanel: ({
severity,
title,
message,
children,
defaultExpanded,
}: WarningProps) => JSX.Element;
// Warnings were encountered during analysis:
//
// src/components/CopyTextButton/CopyTextButton.d.ts:24:5 - (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
// src/components/TabbedLayout/RoutedTabs.d.ts:9:5 - (ae-forgotten-export) The symbol "SubRoute" needs to be exported by the entry point index.d.ts
// src/components/TabbedLayout/TabbedLayout.d.ts:29:5 - (ae-forgotten-export) The symbol "SubRoute" needs to be exported by the entry point index.d.ts
// src/components/Table/Table.d.ts:15:5 - (ae-forgotten-export) The symbol "SelectedFilters" needs to be exported by the entry point index.d.ts
// src/layout/ErrorBoundary/ErrorBoundary.d.ts:7:5 - (ae-forgotten-export) The symbol "SlackChannel" needs to be exported by the entry point index.d.ts
// (No @packageDocumentation comment for this package)
```
+11 -11
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/core-components",
"description": "Core components used by Backstage plugins and apps",
"version": "0.1.5",
"version": "0.3.0",
"private": false,
"publishConfig": {
"access": "public",
@@ -29,17 +29,17 @@
"clean": "backstage-cli clean"
},
"dependencies": {
"@backstage/config": "^0.1.5",
"@backstage/core-plugin-api": "^0.1.2",
"@backstage/config": "^0.1.6",
"@backstage/core-plugin-api": "^0.1.5",
"@backstage/errors": "^0.1.1",
"@backstage/theme": "^0.2.8",
"@material-ui/core": "^4.11.0",
"@backstage/theme": "^0.2.9",
"@material-ui/core": "^4.12.2",
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "4.0.0-alpha.45",
"@testing-library/react-hooks": "^3.4.2",
"@types/dagre": "^0.7.44",
"@types/prop-types": "^15.7.3",
"@types/react": "^16.9",
"@types/react": "*",
"@types/react-sparklines": "^1.7.0",
"@types/react-text-truncate": "^0.14.0",
"classnames": "^2.2.6",
@@ -50,7 +50,7 @@
"dagre": "^0.8.5",
"immer": "^9.0.1",
"lodash": "^4.17.15",
"material-table": "^1.69.1",
"@material-table/core": "^3.1.0",
"pluralize": "^8.0.0",
"prop-types": "^15.7.2",
"qs": "^6.9.4",
@@ -70,15 +70,15 @@
"zen-observable": "^0.8.15"
},
"devDependencies": {
"@backstage/core-app-api": "^0.1.4",
"@backstage/cli": "^0.7.3",
"@backstage/test-utils": "^0.1.13",
"@backstage/core-app-api": "^0.1.7",
"@backstage/cli": "^0.7.7",
"@backstage/test-utils": "^0.1.16",
"@testing-library/jest-dom": "^5.10.1",
"@testing-library/react": "^11.2.5",
"@testing-library/user-event": "^13.1.8",
"@types/classnames": "^2.2.9",
"@types/d3-selection": "^2.0.0",
"@types/d3-shape": "^2.0.0",
"@types/d3-shape": "^3.0.1",
"@types/d3-zoom": "^2.0.0",
"@types/google-protobuf": "^3.7.2",
"@types/jest": "^26.0.7",
@@ -0,0 +1,51 @@
/*
* Copyright 2021 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { BackstageTheme } from '@backstage/theme';
import { Button, IconButton, useMediaQuery } from '@material-ui/core';
import React from 'react';
import { Link as RouterLink, LinkProps } from 'react-router-dom';
import AddCircleOutline from '@material-ui/icons/AddCircleOutline';
type CreateButtonProps = {
title: string;
} & Partial<Pick<LinkProps, 'to'>>;
export const CreateButton = ({ title, to }: CreateButtonProps) => {
const isXSScreen = useMediaQuery<BackstageTheme>(theme =>
theme.breakpoints.down('xs'),
);
if (!to) {
return null;
}
return isXSScreen ? (
<IconButton
component={RouterLink}
color="primary"
title={title}
size="small"
to={to}
>
<AddCircleOutline />
</IconButton>
) : (
<Button component={RouterLink} variant="contained" color="primary" to={to}>
{title}
</Button>
);
};
@@ -0,0 +1,17 @@
/*
* Copyright 2021 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { CreateButton } from './CreateButton';
@@ -44,20 +44,22 @@ export const EmptyState = ({ title, description, missing, action }: Props) => {
<Grid
container
direction="row"
justify="space-around"
justifyContent="space-around"
alignItems="flex-start"
className={classes.root}
spacing={2}
>
<Grid item container direction="column" xs={12} md={6}>
<Grid item>
<Typography variant="h5">{title}</Typography>
</Grid>
<Grid item>
<Typography variant="body1">{description}</Typography>
</Grid>
<Grid item className={classes.action}>
{action}
<Grid item xs={12} md={6}>
<Grid container direction="column">
<Grid item xs>
<Typography variant="h5">{title}</Typography>
</Grid>
<Grid item xs>
<Typography variant="body1">{description}</Typography>
</Grid>
<Grid item xs className={classes.action}>
{action}
</Grid>
</Grid>
</Grid>
<Grid item xs={12} md={6} className={classes.imageContainer}>
@@ -29,7 +29,7 @@ const useStyles = makeStyles({
generalImg: {
width: '95%',
zIndex: 2,
position: 'absolute',
position: 'relative',
left: '50%',
top: '50%',
transform: 'translate(-50%, 15%)',
@@ -100,6 +100,7 @@ export const ErrorPanel = ({
}: PropsWithChildren<ErrorPanelProps>) => {
return (
<WarningPanel
severity="error"
title={title ?? error.message}
defaultExpanded={defaultExpanded}
>
@@ -69,6 +69,7 @@ export const StatusOK = (props: PropsWithChildren<{}>) => {
<span
className={classNames(classes.status, classes.ok)}
aria-label="Status ok"
aria-hidden="true"
{...props}
/>
);
@@ -80,6 +81,7 @@ export const StatusWarning = (props: PropsWithChildren<{}>) => {
<span
className={classNames(classes.status, classes.warning)}
aria-label="Status warning"
aria-hidden="true"
{...props}
/>
);
@@ -91,6 +93,7 @@ export const StatusError = (props: PropsWithChildren<{}>) => {
<span
className={classNames(classes.status, classes.error)}
aria-label="Status error"
aria-hidden="true"
{...props}
/>
);
@@ -102,6 +105,7 @@ export const StatusPending = (props: PropsWithChildren<{}>) => {
<span
className={classNames(classes.status, classes.pending)}
aria-label="Status pending"
aria-hidden="true"
{...props}
/>
);
@@ -113,6 +117,7 @@ export const StatusRunning = (props: PropsWithChildren<{}>) => {
<span
className={classNames(classes.status, classes.running)}
aria-label="Status running"
aria-hidden="true"
{...props}
/>
);
@@ -124,6 +129,7 @@ export const StatusAborted = (props: PropsWithChildren<{}>) => {
<span
className={classNames(classes.status, classes.aborted)}
aria-label="Status aborted"
aria-hidden="true"
{...props}
/>
);
@@ -15,21 +15,24 @@
*/
import { useApp } from '@backstage/core-plugin-api';
import { HelpIcon } from '../../icons';
import { BackstageTheme } from '@backstage/theme';
import {
Box,
Button,
DialogActions,
IconButton,
List,
ListItem,
ListItemIcon,
ListItemText,
Typography,
makeStyles,
Popover,
Typography,
useMediaQuery,
} from '@material-ui/core';
import React, { Fragment, MouseEventHandler, useState } from 'react';
import React, { MouseEventHandler, useState } from 'react';
import { SupportItem, SupportItemLink, useSupportConfig } from '../../hooks';
import { HelpIcon } from '../../icons';
import { Link } from '../Link';
type SupportButtonProps = {
@@ -83,6 +86,9 @@ export const SupportButton = ({ title, children }: SupportButtonProps) => {
const [popoverOpen, setPopoverOpen] = useState(false);
const [anchorEl, setAnchorEl] = useState<Element | null>(null);
const classes = useStyles();
const isSmallScreen = useMediaQuery<BackstageTheme>(theme =>
theme.breakpoints.down('sm'),
);
const onClickHandler: MouseEventHandler = event => {
setAnchorEl(event.currentTarget);
@@ -94,17 +100,28 @@ export const SupportButton = ({ title, children }: SupportButtonProps) => {
};
return (
<Fragment>
<Button
data-testid="support-button"
color="primary"
onClick={onClickHandler}
>
<Box marginRight={1}>
<HelpIcon />
</Box>
Support
</Button>
<>
<Box display="flex" ml={1}>
{isSmallScreen ? (
<IconButton
color="primary"
size="small"
onClick={onClickHandler}
data-testid="support-button"
>
<HelpIcon />
</IconButton>
) : (
<Button
data-testid="support-button"
color="primary"
onClick={onClickHandler}
startIcon={<HelpIcon />}
>
Support
</Button>
)}
</Box>
<Popover
data-testid="support-button-popover"
open={popoverOpen}
@@ -141,6 +158,6 @@ export const SupportButton = ({ title, children }: SupportButtonProps) => {
</Button>
</DialogActions>
</Popover>
</Fragment>
</>
);
};
@@ -47,14 +47,13 @@ import MTable, {
MTableHeader,
MTableToolbar,
Options,
} from 'material-table';
} from '@material-table/core';
import React, {
forwardRef,
MutableRefObject,
ReactNode,
useCallback,
useEffect,
useRef,
useState,
} from 'react';
import { CheckboxTreeProps } from '../CheckboxTree/CheckboxTree';
@@ -298,13 +297,6 @@ export function Table<T extends object = {}>({
const MTColumns = convertColumns(columns, theme);
const [search, setSearch] = useState(calculatedInitialState.search);
const toolbarRef = useRef<any>();
useEffect(() => {
if (toolbarRef.current) {
toolbarRef.current.onSearchChange(search);
}
}, [search, toolbarRef]);
useEffect(() => {
if (onStateChange) {
@@ -440,7 +432,6 @@ export function Table<T extends object = {}>({
toolbarProps => {
return (
<TableToolbar
toolbarRef={toolbarRef}
setSearch={setSearch}
hasFilters={hasFilters}
selectedFiltersLength={selectedFiltersLength}
@@ -449,7 +440,7 @@ export function Table<T extends object = {}>({
/>
);
},
[toggleFilters, hasFilters, selectedFiltersLength, setSearch, toolbarRef],
[toggleFilters, hasFilters, selectedFiltersLength, setSearch],
);
const hasNoRows = typeof data !== 'function' && data.length === 0;
@@ -491,7 +482,9 @@ export function Table<T extends object = {}>({
icons={tableIcons}
title={
<>
<Typography variant="h5">{title}</Typography>
<Typography variant="h5" component="h3">
{title}
</Typography>
{subtitle && (
<Typography color="textSecondary" variant="body1">
{subtitle}
@@ -20,6 +20,7 @@ import { BackstageTheme } from '@backstage/theme';
interface StyledTabsProps {
value: number | boolean;
selectionFollowsFocus: boolean;
onChange: (event: React.ChangeEvent<{}>, newValue: number) => void;
}
@@ -107,7 +107,11 @@ export const Tabs = ({ tabs }: TabsProps) => {
<div className={classes.root}>
<AppBar ref={wrapper} className={classes.appbar} position="static">
<div>
<StyledTabs value={currentIndex} onChange={handleChange}>
<StyledTabs
value={currentIndex}
onChange={handleChange}
selectionFollowsFocus
>
{navIndex !== 0 && (
<StyledIcon
onClick={navigateToPrevChunk}
@@ -19,11 +19,19 @@ import { fireEvent, screen } from '@testing-library/react';
import { renderInTestApp } from '@backstage/test-utils';
import { Typography } from '@material-ui/core';
import { WarningPanel } from './WarningPanel';
import { WarningPanel, WarningProps } from './WarningPanel';
const propsTitle = { title: 'Mock title' };
const propsTitleMessage = { title: 'Mock title', message: 'Some more info' };
const propsMessage = { message: 'Some more info' };
const propsTitle: WarningProps = { title: 'Mock title' };
const propsTitleMessage: WarningProps = {
title: 'Mock title',
message: 'Some more info',
};
const propsMessage: WarningProps = { message: 'Some more info' };
const propsErrorMessage: WarningProps = {
severity: 'error',
title: 'Mock title',
message: 'Some more info',
};
describe('<WarningPanel />', () => {
it('renders without exploding', async () => {
@@ -64,4 +72,8 @@ describe('<WarningPanel />', () => {
expect(screen.getByText('Some more info')).toBeInTheDocument();
expect(screen.getByText('Java stacktrace')).toBeInTheDocument();
});
it('renders message using severity', async () => {
await renderInTestApp(<WarningPanel {...propsErrorMessage} />);
expect(screen.getByText('Error: Mock title')).toBeInTheDocument();
});
});
@@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { BackstageTheme } from '@backstage/theme';
import {
Accordion,
@@ -22,30 +21,61 @@ import {
Grid,
makeStyles,
Typography,
darken,
lighten,
} from '@material-ui/core';
import ErrorOutline from '@material-ui/icons/ErrorOutline';
import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
import React from 'react';
const getWarningTextColor = (
severity: NonNullable<WarningProps['severity']>,
theme: BackstageTheme,
) => {
const getColor = theme.palette.type === 'light' ? darken : lighten;
return getColor(theme.palette[severity].light, 0.6);
};
const getWarningBackgroundColor = (
severity: NonNullable<WarningProps['severity']>,
theme: BackstageTheme,
) => {
const getBackgroundColor = theme.palette.type === 'light' ? lighten : darken;
return getBackgroundColor(theme.palette[severity].light, 0.9);
};
const useErrorOutlineStyles = makeStyles<BackstageTheme>(theme => ({
root: {
marginRight: theme.spacing(1),
fill: theme.palette.warningText,
fill: ({ severity }: WarningProps) =>
getWarningTextColor(
severity as NonNullable<WarningProps['severity']>,
theme,
),
},
}));
const ErrorOutlineStyled = () => {
const classes = useErrorOutlineStyles();
const ErrorOutlineStyled = ({ severity }: Pick<WarningProps, 'severity'>) => {
const classes = useErrorOutlineStyles({ severity });
return <ErrorOutline classes={classes} />;
};
const ExpandMoreIconStyled = () => {
const classes = useErrorOutlineStyles();
const ExpandMoreIconStyled = ({ severity }: Pick<WarningProps, 'severity'>) => {
const classes = useErrorOutlineStyles({ severity });
return <ExpandMoreIcon classes={classes} />;
};
const useStyles = makeStyles<BackstageTheme>(theme => ({
panel: {
backgroundColor: theme.palette.warningBackground,
color: theme.palette.warningText,
backgroundColor: ({ severity }: WarningProps) =>
getWarningBackgroundColor(
severity as NonNullable<WarningProps['severity']>,
theme,
),
color: ({ severity }: WarningProps) =>
getWarningTextColor(
severity as NonNullable<WarningProps['severity']>,
theme,
),
verticalAlign: 'middle',
},
summary: {
@@ -53,14 +83,26 @@ const useStyles = makeStyles<BackstageTheme>(theme => ({
flexDirection: 'row',
},
summaryText: {
color: theme.palette.warningText,
color: ({ severity }: WarningProps) =>
getWarningTextColor(
severity as NonNullable<WarningProps['severity']>,
theme,
),
fontWeight: 'bold',
},
message: {
width: '100%',
display: 'block',
color: theme.palette.warningText,
backgroundColor: theme.palette.warningBackground,
color: ({ severity }: WarningProps) =>
getWarningTextColor(
severity as NonNullable<WarningProps['severity']>,
theme,
),
backgroundColor: ({ severity }: WarningProps) =>
getWarningBackgroundColor(
severity as NonNullable<WarningProps['severity']>,
theme,
),
},
details: {
width: '100%',
@@ -73,7 +115,7 @@ const useStyles = makeStyles<BackstageTheme>(theme => ({
},
}));
type Props = {
export type WarningProps = {
title?: string;
severity?: 'warning' | 'error' | 'info';
message?: React.ReactNode;
@@ -89,19 +131,23 @@ const capitalize = (s: string) => {
* WarningPanel. Show a user friendly error message to a user similar to ErrorPanel except that the warning panel
* only shows the warning message to the user.
*
* @param {string} [severity=warning] Ability to change the severity of the alert. Not fully implemented. (error, warning, info)
* @param {string} [severity=warning] Ability to change the severity of the alert.
* @param {string} [title] A title for the warning. If not supplied, "Warning" will be used.
* @param {Object} [message] Optional more detailed user-friendly message elaborating on the cause of the error.
* @param {Object} [children] Objects to provide context, such as a stack trace or detailed error reporting.
* Will be available inside an unfolded accordion.
*/
export const WarningPanel = (props: Props) => {
const classes = useStyles(props);
const { severity, title, message, children, defaultExpanded } = props;
export const WarningPanel = ({
severity = 'warning',
title,
message,
children,
defaultExpanded,
}: WarningProps) => {
const classes = useStyles({ severity });
// If no severity or title provided, the heading will read simply "Warning"
const subTitle =
(severity ? capitalize(severity) : 'Warning') + (title ? `: ${title}` : '');
const subTitle = capitalize(severity) + (title ? `: ${title}` : '');
return (
<Accordion
@@ -110,10 +156,10 @@ export const WarningPanel = (props: Props) => {
role="alert"
>
<AccordionSummary
expandIcon={<ExpandMoreIconStyled />}
expandIcon={<ExpandMoreIconStyled severity={severity} />}
className={classes.summary}
>
<ErrorOutlineStyled />
<ErrorOutlineStyled severity={severity} />
<Typography className={classes.summaryText} variant="subtitle1">
{subTitle}
</Typography>
@@ -19,6 +19,7 @@ export * from './Avatar';
export * from './Button';
export * from './CodeSnippet';
export * from './CopyTextButton';
export * from './CreateButton';
export * from './DependencyGraph';
export * from './DismissableBanner';
export * from './EmptyState';
@@ -15,13 +15,7 @@
*/
import React from 'react';
import {
ListItem,
ListItemIcon,
Divider,
ListItemText,
makeStyles,
} from '@material-ui/core';
import { Divider, Typography, makeStyles } from '@material-ui/core';
import ArrowIcon from '@material-ui/icons/ArrowForward';
import { BackstageTheme } from '@backstage/theme';
import Box from '@material-ui/core/Box';
@@ -54,16 +48,14 @@ export const BottomLink = ({ link, title, onClick }: BottomLinkProps) => {
<div>
<Divider />
<Link to={link} onClick={onClick} underline="none">
<ListItem className={classes.root}>
<ListItemText>
<Box display="flex" alignItems="center" className={classes.root}>
<Typography>
<Box className={classes.boxTitle} fontWeight="fontWeightBold" m={1}>
{title}
</Box>
</ListItemText>
<ListItemIcon>
<ArrowIcon className={classes.arrow} />
</ListItemIcon>
</ListItem>
</Typography>
<ArrowIcon className={classes.arrow} />
</Box>
</Link>
</div>
);
@@ -24,7 +24,12 @@ const useStyles = makeStyles((theme: Theme) => ({
minWidth: 0,
paddingTop: theme.spacing(3),
paddingBottom: theme.spacing(3),
...theme.mixins.gutters({}),
paddingLeft: theme.spacing(2),
paddingRight: theme.spacing(2),
[theme.breakpoints.up('sm')]: {
paddingLeft: theme.spacing(3),
paddingRight: theme.spacing(3),
},
},
stretch: {
display: 'flex',
@@ -18,7 +18,7 @@
* TODO favoriteable capability
*/
import React, { ComponentType, Fragment, PropsWithChildren } from 'react';
import React, { ComponentType, PropsWithChildren } from 'react';
import { Typography, makeStyles } from '@material-ui/core';
import { Helmet } from 'react-helmet';
@@ -31,12 +31,11 @@ const useStyles = (props: ContentHeaderProps) =>
flexWrap: 'wrap',
justifyContent: 'flex-end',
alignItems: 'center',
marginBottom: theme.spacing(1),
marginBottom: theme.spacing(2),
textAlign: props.textAlign,
},
leftItemsBox: {
flex: '1 1 auto',
marginBottom: theme.spacing(1),
minWidth: 0,
overflow: 'visible',
},
@@ -47,25 +46,25 @@ const useStyles = (props: ContentHeaderProps) =>
flexWrap: 'wrap',
alignItems: 'center',
marginLeft: theme.spacing(1),
marginBottom: theme.spacing(1),
minWidth: 0,
overflow: 'visible',
},
description: {},
title: {
display: 'inline-flex',
marginBottom: 0,
},
}));
type DefaultTitleProps = {
type ContentHeaderTitleProps = {
title?: string;
className: string;
className?: string;
};
const DefaultTitle = ({
const ContentHeaderTitle = ({
title = 'Unknown page',
className,
}: DefaultTitleProps) => (
}: ContentHeaderTitleProps) => (
<Typography
variant="h4"
component="h2"
@@ -77,7 +76,7 @@ const DefaultTitle = ({
);
type ContentHeaderProps = {
title?: DefaultTitleProps['title'];
title?: ContentHeaderTitleProps['title'];
titleComponent?: ComponentType;
description?: string;
textAlign?: 'left' | 'right' | 'center';
@@ -95,10 +94,10 @@ export const ContentHeader = ({
const renderedTitle = TitleComponent ? (
<TitleComponent />
) : (
<DefaultTitle title={title} className={classes.title} />
<ContentHeaderTitle title={title} className={classes.title} />
);
return (
<Fragment>
<>
<Helmet title={title} />
<div className={classes.container}>
<div className={classes.leftItemsBox}>
@@ -111,6 +110,6 @@ export const ContentHeader = ({
</div>
<div className={classes.rightItemsBox}>{children}</div>
</div>
</Fragment>
</>
);
};
@@ -16,17 +16,19 @@
import { useApi, configApiRef } from '@backstage/core-plugin-api';
import { BackstageTheme } from '@backstage/theme';
import { makeStyles, Tooltip, Typography } from '@material-ui/core';
import { Box, Grid, makeStyles, Tooltip, Typography } from '@material-ui/core';
import React, { CSSProperties, PropsWithChildren, ReactNode } from 'react';
import { Helmet } from 'react-helmet';
import { Link } from '../../components/Link';
import { Breadcrumbs } from '../Breadcrumbs';
const minHeaderHeight = 118;
const useStyles = makeStyles<BackstageTheme>(theme => ({
header: {
gridArea: 'pageHeader',
padding: theme.spacing(3),
minHeight: 118,
minHeight: minHeaderHeight,
width: '100%',
boxShadow: '0 0 8px 3px rgba(20, 20, 20, 0.3)',
position: 'relative',
@@ -34,26 +36,21 @@ const useStyles = makeStyles<BackstageTheme>(theme => ({
display: 'flex',
flexDirection: 'row',
flexWrap: 'wrap',
justifyContent: 'flex-end',
alignItems: 'center',
backgroundImage: theme.page.backgroundImage,
backgroundPosition: 'center',
backgroundSize: 'cover',
},
leftItemsBox: {
flex: '1 1 auto',
maxWidth: '100%',
flexGrow: 1,
marginBottom: theme.spacing(1),
},
rightItemsBox: {
flex: '0 1 auto',
display: 'flex',
flexDirection: 'row',
flexWrap: 'wrap',
alignItems: 'center',
marginRight: theme.spacing(1),
width: 'auto',
},
title: {
color: theme.palette.bursts.fontColor,
lineHeight: '1.0em',
wordBreak: 'break-all',
fontSize: 'calc(24px + 6 * ((100vw - 320px) / 680))',
marginBottom: theme.spacing(1),
@@ -199,7 +196,7 @@ export const Header = ({
<>
<Helmet titleTemplate={titleTemplate} defaultTitle={defaultTitle} />
<header style={style} className={classes.header}>
<div className={classes.leftItemsBox}>
<Box className={classes.leftItemsBox}>
<TypeFragment
classes={classes}
type={type}
@@ -212,8 +209,10 @@ export const Header = ({
tooltip={tooltip}
/>
<SubtitleFragment classes={classes} subtitle={subtitle} />
</div>
<div className={classes.rightItemsBox}>{children}</div>
</Box>
<Grid container className={classes.rightItemsBox} spacing={4}>
{children}
</Grid>
</header>
</>
);
@@ -14,29 +14,25 @@
* limitations under the License.
*/
import { Link, makeStyles, Typography } from '@material-ui/core';
import { Link, makeStyles, Typography, Grid } from '@material-ui/core';
import React from 'react';
const useStyles = makeStyles(theme => ({
root: {
textAlign: 'left',
margin: theme.spacing(2),
display: 'inline-block',
},
label: {
color: '#FFFFFF',
color: theme.palette.common.white,
fontWeight: 'bold',
lineHeight: '16px',
letterSpacing: 0,
fontSize: 14,
height: '16px',
marginBottom: 2,
fontSize: theme.typography.fontSize,
marginBottom: theme.spacing(1) / 2,
lineHeight: 1,
},
value: {
color: 'rgba(255, 255, 255, 0.8)',
lineHeight: '16px',
fontSize: 14,
height: '16px',
fontSize: theme.typography.fontSize,
lineHeight: 1,
},
}));
@@ -64,9 +60,11 @@ export const HeaderLabel = ({ label, value, url }: HeaderLabelProps) => {
/>
);
return (
<span className={classes.root}>
<Typography className={classes.label}>{label}</Typography>
{url ? <Link href={url}>{content}</Link> : content}
</span>
<Grid item>
<span className={classes.root}>
<Typography className={classes.label}>{label}</Typography>
{url ? <Link href={url}>{content}</Link> : content}
</span>
</Grid>
);
};
@@ -73,6 +73,7 @@ export const HeaderTabs = ({
return (
<div className={styles.tabsWrapper}>
<Tabs
selectionFollowsFocus
indicatorColor="primary"
textColor="inherit"
variant="scrollable"
@@ -91,8 +91,8 @@ export type InfoCardVariants = 'flex' | 'fullHeight' | 'gridItem';
/**
* InfoCard is used to display a paper-styled block on the screen, similar to a panel.
*
* You can custom style an InfoCard with the 'style' (outer container) and 'cardStyle' (inner container)
* styles.
* You can custom style an InfoCard with the 'className' (outer container) and 'cardClassName' (inner container)
* props. This is typically used with the material-ui makeStyles mechanism.
*
* The InfoCard serves as an error boundary. As a result, if you provide an 'errorBoundaryProps' property this
* specifies the extra information to display in the error component that is displayed if an error occurs
@@ -115,8 +115,6 @@ type Props = {
slackChannel?: string;
errorBoundaryProps?: ErrorBoundaryProps;
variant?: InfoCardVariants;
style?: object;
cardStyle?: object;
children?: ReactNode;
headerStyle?: object;
headerProps?: CardHeaderProps;
@@ -27,24 +27,26 @@ describe('<ItemCardGrid />', () => {
<Card>Hello!</Card>
</ItemCardGrid>,
);
expect(screen.getByRole('grid')).toBeInTheDocument();
expect(screen.getByText('Hello!')).toBeInTheDocument();
});
it('renders custom styles', async () => {
await renderInTestApp(
<>
<ItemCardGrid>
<ItemCardGrid data-testid="cards-hello">
<Card>Hello!</Card>
</ItemCardGrid>
<ItemCardGrid classes={{ root: 'my-css-class' }}>
<ItemCardGrid
data-testid="cards-goodbye"
classes={{ root: 'my-css-class' }}
>
<Card>Goodbye!</Card>
</ItemCardGrid>
</>,
);
expect(screen.getAllByRole('grid')[0]).toHaveStyle({
expect(screen.getByTestId('cards-hello')).toHaveStyle({
gridTemplateColumns: 'repeat(auto-fill, minmax(22em, 1fr))',
});
expect(screen.getAllByRole('grid')[1]).toHaveClass('my-css-class');
expect(screen.getByTestId('cards-goodbye')).toHaveClass('my-css-class');
});
});
@@ -55,7 +55,7 @@ export const ItemCardGrid = (props: ItemCardGridProps) => {
const { children, ...otherProps } = props;
const classes = useStyles(otherProps);
return (
<div role="grid" className={classes.root} {...otherProps}>
<div className={classes.root} {...otherProps}>
{children}
</div>
);
@@ -117,7 +117,7 @@ const DataGrid = () => (
xs={12}
container
spacing={2}
justify="space-between"
justifyContent="space-between"
direction="row"
>
<Grid item xs={12} md={6}>
@@ -23,7 +23,7 @@ const useStyles = makeStyles(() => ({
display: 'grid',
gridTemplateAreas:
"'pageHeader pageHeader pageHeader' 'pageSubheader pageSubheader pageSubheader' 'pageNav pageContent pageSidebar'",
gridTemplateRows: 'auto auto 1fr',
gridTemplateRows: 'max-content auto 1fr',
gridTemplateColumns: 'auto 1fr auto',
height: '100vh',
overflowY: 'auto',
@@ -0,0 +1,35 @@
/*
* Copyright 2020 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React, { PropsWithChildren, ComponentProps } from 'react';
import { Header } from '../Header';
import { Page } from './Page';
type PageWithHeaderProps = ComponentProps<typeof Header> & {
themeId: string;
};
export const PageWithHeader = ({
themeId,
children,
...props
}: PropsWithChildren<PageWithHeaderProps>) => (
<Page themeId={themeId}>
<Header {...props} />
{children}
</Page>
);
@@ -15,3 +15,4 @@
*/
export { Page } from './Page';
export { PageWithHeader } from './PageWithHeader';
@@ -44,7 +44,6 @@ const useStyles = makeStyles<BackstageTheme>(theme => {
drawerWidthOpen,
iconContainerWidth,
} = sidebarConfig;
return {
root: {
color: theme.palette.navigation.color,
@@ -97,6 +96,9 @@ const useStyles = makeStyles<BackstageTheme>(theme => {
fontWeight: 'bold',
fontSize: theme.typography.fontSize,
},
searchFieldHTMLInput: {
padding: `${theme.spacing(2)} 0 ${theme.spacing(2)}`,
},
searchContainer: {
width: drawerWidthOpen - iconContainerWidth,
},
@@ -165,7 +167,7 @@ export const SidebarItem = forwardRef<any, SidebarItemProps>((props, ref) => {
<Badge
color="secondary"
variant="dot"
overlap="circle"
overlap="circular"
invisible={!hasNotifications}
>
<Icon fontSize="small" />
@@ -202,7 +204,7 @@ export const SidebarItem = forwardRef<any, SidebarItemProps>((props, ref) => {
if (isButtonItem(props)) {
return (
<button {...childProps} ref={ref}>
<button aria-label={text} {...childProps} ref={ref}>
{content}
</button>
);
@@ -214,6 +216,7 @@ export const SidebarItem = forwardRef<any, SidebarItemProps>((props, ref) => {
activeClassName={classes.selected}
to={props.to}
ref={ref}
aria-label={text ? text : props.to}
{...navLinkProps}
>
{content}
@@ -271,6 +274,9 @@ export const SidebarSearchField = (props: SidebarSearchFieldProps) => {
disableUnderline: true,
className: classes.searchField,
}}
inputProps={{
className: classes.searchFieldHTMLInput,
}}
/>
</SidebarItem>
</div>
@@ -44,7 +44,7 @@ const handleSearch = (input: string) => {
export const SampleSidebar = () => (
<Sidebar>
<SidebarSearchField onSearch={handleSearch} />
<SidebarSearchField onSearch={handleSearch} to="/search" />
<SidebarDivider />
<SidebarItem icon={HomeOutlinedIcon} to="#" text="Home" />
<SidebarItem icon={HomeOutlinedIcon} to="#" text="Plugins" />
@@ -70,7 +70,7 @@ export const MultiSignInPage = ({
{title && <ContentHeader title={title} textAlign={align} />}
<Grid
container
justify={align === 'center' ? align : 'flex-start'}
justifyContent={align === 'center' ? align : 'flex-start'}
spacing={2}
component="ul"
classes={classes}
@@ -130,7 +130,9 @@ export const SingleSignInPage = ({
userId: identity!.id,
profile: profile!,
getIdToken: () => {
return authApi.getBackstageIdentity().then(i => i!.idToken);
return authApi
.getBackstageIdentity()
.then(i => i!.token ?? i!.idToken);
},
signOut: async () => {
await authApi.signOut();
@@ -152,7 +154,7 @@ export const SingleSignInPage = ({
<Content>
<Grid
container
justify="center"
justifyContent="center"
spacing={2}
component="ul"
classes={classes}
@@ -40,7 +40,7 @@ const Component: ProviderComponent = ({ onResult }) => {
userId: identity!.id,
profile: profile!,
getIdToken: () =>
auth0AuthApi.getBackstageIdentity().then(i => i!.idToken),
auth0AuthApi.getBackstageIdentity().then(i => i!.token ?? i!.idToken),
signOut: async () => {
await auth0AuthApi.signOut();
},
@@ -82,7 +82,8 @@ const loader: ProviderLoader = async apis => {
return {
userId: identity.id,
profile: profile!,
getIdToken: () => auth0AuthApi.getBackstageIdentity().then(i => i!.idToken),
getIdToken: () =>
auth0AuthApi.getBackstageIdentity().then(i => i!.token ?? i!.idToken),
signOut: async () => {
await auth0AuthApi.signOut();
},
@@ -86,7 +86,8 @@ const loader: ProviderLoader = async (apis, apiRef) => {
return {
userId: identity.id,
profile: profile!,
getIdToken: () => authApi.getBackstageIdentity().then(i => i!.idToken),
getIdToken: () =>
authApi.getBackstageIdentity().then(i => i!.token ?? i!.idToken),
signOut: async () => {
await authApi.signOut();
},
+21
View File
@@ -1,5 +1,26 @@
# @backstage/core-plugin-api
## 0.1.5
### Patch Changes
- c4d8ff963: Switched frontend identity code to use `token` instead of the deprecated `idToken` field
- Updated dependencies
- @backstage/config@0.1.6
## 0.1.4
### Patch Changes
- 9d40fcb1e: - Bumping `material-ui/core` version to at least `4.12.2` as they made some breaking changes in later versions which broke `Pagination` of the `Table`.
- Switching out `material-table` to `@material-table/core` for support for the later versions of `material-ui/core`
- This causes a minor API change to `@backstage/core-components` as the interface for `Table` re-exports the `prop` from the underlying `Table` components.
- `onChangeRowsPerPage` has been renamed to `onRowsPerPageChange`
- `onChangePage` has been renamed to `onPageChange`
- Migration guide is here: https://material-table-core.com/docs/breaking-changes
- Updated dependencies
- @backstage/theme@0.2.9
## 0.1.3
### Patch Changes
+235
View File
@@ -13,21 +13,29 @@ import { ReactElement } from 'react';
import { ReactNode } from 'react';
import { SvgIconProps } from '@material-ui/core';
// Warning: (ae-missing-release-tag) "AlertApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type AlertApi = {
post(alert: AlertMessage): void;
alert$(): Observable<AlertMessage>;
};
// Warning: (ae-missing-release-tag) "alertApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const alertApiRef: ApiRef<AlertApi>;
// Warning: (ae-missing-release-tag) "AlertMessage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type AlertMessage = {
message: string;
severity?: 'success' | 'info' | 'warning' | 'error';
};
// Warning: (ae-missing-release-tag) "AnyApiFactory" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type AnyApiFactory = ApiFactory<
unknown,
@@ -37,9 +45,13 @@ export type AnyApiFactory = ApiFactory<
}
>;
// Warning: (ae-missing-release-tag) "AnyApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type AnyApiRef = ApiRef<unknown>;
// Warning: (ae-missing-release-tag) "ApiFactory" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type ApiFactory<
Api,
@@ -53,17 +65,23 @@ export type ApiFactory<
factory(deps: Deps): Impl;
};
// Warning: (ae-missing-release-tag) "ApiHolder" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type ApiHolder = {
get<T>(api: ApiRef<T>): T | undefined;
};
// Warning: (ae-missing-release-tag) "ApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type ApiRef<T> = {
id: string;
T: T;
};
// Warning: (ae-missing-release-tag) "ApiRefsToTypes" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type ApiRefsToTypes<
T extends {
@@ -73,9 +91,13 @@ export type ApiRefsToTypes<
[key in keyof T]: ApiRefType<T[key]>;
};
// Warning: (ae-missing-release-tag) "ApiRefType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type ApiRefType<T> = T extends ApiRef<infer U> ? U : never;
// Warning: (ae-missing-release-tag) "AppComponents" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type AppComponents = {
NotFoundErrorPage: ComponentType<{}>;
@@ -86,6 +108,8 @@ export type AppComponents = {
SignInPage?: ComponentType<SignInPageProps>;
};
// Warning: (ae-missing-release-tag) "AppContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type AppContext = {
getPlugins(): BackstagePlugin<any, any>[];
@@ -93,6 +117,8 @@ export type AppContext = {
getComponents(): AppComponents;
};
// Warning: (ae-missing-release-tag) "AppTheme" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type AppTheme = {
id: string;
@@ -102,6 +128,8 @@ export type AppTheme = {
icon?: React.ReactElement;
};
// Warning: (ae-missing-release-tag) "AppThemeApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type AppThemeApi = {
getInstalledThemes(): AppTheme[];
@@ -110,9 +138,13 @@ export type AppThemeApi = {
setActiveThemeId(themeId?: string): void;
};
// Warning: (ae-missing-release-tag) "appThemeApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const appThemeApiRef: ApiRef<AppThemeApi>;
// Warning: (ae-missing-release-tag) "attachComponentData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function attachComponentData<P>(
component: ComponentType<P>,
@@ -120,40 +152,56 @@ export function attachComponentData<P>(
data: unknown,
): void;
// Warning: (ae-missing-release-tag) "auth0AuthApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const auth0AuthApiRef: ApiRef<
OpenIdConnectApi & ProfileInfoApi & BackstageIdentityApi & SessionApi
>;
// Warning: (ae-missing-release-tag) "AuthProvider" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type AuthProvider = {
title: string;
icon: IconComponent;
};
// Warning: (ae-missing-release-tag) "AuthRequester" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type AuthRequester<AuthResponse> = (
scopes: Set<string>,
) => Promise<AuthResponse>;
// Warning: (ae-missing-release-tag) "AuthRequesterOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type AuthRequesterOptions<AuthResponse> = {
provider: AuthProvider;
onAuthRequest(scopes: Set<string>): Promise<AuthResponse>;
};
// Warning: (ae-missing-release-tag) "AuthRequestOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type AuthRequestOptions = {
optional?: boolean;
instantPopup?: boolean;
};
// Warning: (ae-missing-release-tag) "BackstageIdentity" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type BackstageIdentity = {
id: string;
idToken: string;
token: string;
};
// Warning: (tsdoc-undefined-tag) The TSDoc tag "@IdentityApi" is not defined in this configuration
// Warning: (ae-missing-release-tag) "BackstageIdentityApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type BackstageIdentityApi = {
getBackstageIdentity(
@@ -161,6 +209,10 @@ export type BackstageIdentityApi = {
): Promise<BackstageIdentity | undefined>;
};
// Warning: (ae-forgotten-export) The symbol "AnyRoutes" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "AnyExternalRoutes" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "BackstagePlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type BackstagePlugin<
Routes extends AnyRoutes = {},
@@ -174,18 +226,27 @@ export type BackstagePlugin<
externalRoutes: ExternalRoutes;
};
// Warning: (ae-missing-release-tag) "BootErrorPageProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type BootErrorPageProps = {
step: 'load-config' | 'load-chunk';
error: Error;
};
// Warning: (ae-missing-release-tag) "ConfigApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type ConfigApi = Config;
// Warning: (ae-missing-release-tag) "configApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const configApiRef: ApiRef<ConfigApi>;
// Warning: (ae-missing-release-tag) "createApiFactory" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
// Warning: (ae-missing-release-tag) "createApiFactory" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function createApiFactory<
Api,
@@ -201,14 +262,22 @@ export function createApiFactory<Api, Impl extends Api>(
instance: Impl,
): ApiFactory<Api, Impl, {}>;
// Warning: (ae-forgotten-export) The symbol "ApiRefConfig" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "createApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function createApiRef<T>(config: ApiRefConfig): ApiRef<T>;
// Warning: (ae-missing-release-tag) "createComponentExtension" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function createComponentExtension<
T extends (props: any) => JSX.Element | null
>(options: { component: ComponentLoader<T> }): Extension<T>;
// Warning: (ae-forgotten-export) The symbol "OptionalParams" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "createExternalRouteRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function createExternalRouteRef<
Params extends {
@@ -222,6 +291,8 @@ export function createExternalRouteRef<
optional?: Optional;
}): ExternalRouteRef<OptionalParams<Params>, Optional>;
// Warning: (ae-missing-release-tag) "createPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function createPlugin<
Routes extends AnyRoutes = {},
@@ -230,6 +301,8 @@ export function createPlugin<
config: PluginConfig<Routes, ExternalRoutes>,
): BackstagePlugin<Routes, ExternalRoutes>;
// Warning: (ae-missing-release-tag) "createReactExtension" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function createReactExtension<
T extends (props: any) => JSX.Element | null
@@ -238,11 +311,15 @@ export function createReactExtension<
data?: Record<string, unknown>;
}): Extension<T>;
// Warning: (ae-missing-release-tag) "createRoutableExtension" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function createRoutableExtension<
T extends (props: any) => JSX.Element | null
>(options: { component: () => Promise<T>; mountPoint: RouteRef }): Extension<T>;
// Warning: (ae-missing-release-tag) "createRouteRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function createRouteRef<
Params extends {
@@ -257,6 +334,11 @@ export function createRouteRef<
title?: string;
}): RouteRef<OptionalParams<Params>>;
// Warning: (ae-forgotten-export) The symbol "AnyParams" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "MakeSubRouteRef" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "PathParams" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "createSubRouteRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function createSubRouteRef<
Path extends string,
@@ -267,14 +349,20 @@ export function createSubRouteRef<
parent: RouteRef<ParentParams>;
}): MakeSubRouteRef<PathParams<Path>, ParentParams>;
// Warning: (ae-missing-release-tag) "DiscoveryApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type DiscoveryApi = {
getBaseUrl(pluginId: string): Promise<string>;
};
// Warning: (ae-missing-release-tag) "discoveryApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const discoveryApiRef: ApiRef<DiscoveryApi>;
// Warning: (ae-missing-release-tag) "ElementCollection" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export interface ElementCollection {
findComponentData<T>(query: { key: string }): T[];
@@ -289,6 +377,8 @@ export interface ElementCollection {
}): ElementCollection;
}
// Warning: (ae-missing-release-tag) "ErrorApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type ErrorApi = {
post(error: Error_2, context?: ErrorContext): void;
@@ -298,9 +388,13 @@ export type ErrorApi = {
}>;
};
// Warning: (ae-missing-release-tag) "errorApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const errorApiRef: ApiRef<ErrorApi>;
// Warning: (ae-missing-release-tag) "ErrorBoundaryFallbackProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type ErrorBoundaryFallbackProps = {
plugin?: BackstagePlugin;
@@ -308,16 +402,22 @@ export type ErrorBoundaryFallbackProps = {
resetError: () => void;
};
// Warning: (ae-missing-release-tag) "ErrorContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type ErrorContext = {
hidden?: boolean;
};
// Warning: (ae-missing-release-tag) "Extension" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type Extension<T> = {
expose(plugin: BackstagePlugin<any, any>): T;
};
// Warning: (ae-missing-release-tag) "ExternalRouteRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type ExternalRouteRef<
Params extends AnyParams = any,
@@ -328,18 +428,24 @@ export type ExternalRouteRef<
optional?: Optional;
};
// Warning: (ae-missing-release-tag) "FeatureFlag" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type FeatureFlag = {
name: string;
pluginId: string;
};
// Warning: (ae-missing-release-tag) "FeatureFlagOutput" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type FeatureFlagOutput = {
type: 'feature-flag';
name: string;
};
// Warning: (ae-missing-release-tag) "FeatureFlagsApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface FeatureFlagsApi {
getRegisteredFlags(): FeatureFlag[];
@@ -348,20 +454,28 @@ export interface FeatureFlagsApi {
save(options: FeatureFlagsSaveOptions): void;
}
// Warning: (ae-missing-release-tag) "featureFlagsApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const featureFlagsApiRef: ApiRef<FeatureFlagsApi>;
// Warning: (ae-missing-release-tag) "FeatureFlagsHooks" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type FeatureFlagsHooks = {
register(name: string): void;
};
// Warning: (ae-missing-release-tag) "FeatureFlagsSaveOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type FeatureFlagsSaveOptions = {
states: Record<string, FeatureFlagState>;
merge?: boolean;
};
// Warning: (ae-missing-release-tag) "FeatureFlagState" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export enum FeatureFlagState {
// (undocumented)
@@ -370,22 +484,30 @@ export enum FeatureFlagState {
None = 0,
}
// Warning: (ae-missing-release-tag) "getComponentData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function getComponentData<T>(
node: ReactNode,
type: string,
): T | undefined;
// Warning: (ae-missing-release-tag) "githubAuthApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const githubAuthApiRef: ApiRef<
OAuthApi & ProfileInfoApi & BackstageIdentityApi & SessionApi
>;
// Warning: (ae-missing-release-tag) "gitlabAuthApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const gitlabAuthApiRef: ApiRef<
OAuthApi & ProfileInfoApi & BackstageIdentityApi & SessionApi
>;
// Warning: (ae-missing-release-tag) "googleAuthApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const googleAuthApiRef: ApiRef<
OAuthApi &
@@ -395,11 +517,15 @@ export const googleAuthApiRef: ApiRef<
SessionApi
>;
// Warning: (ae-missing-release-tag) "IconComponent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type IconComponent = ComponentType<{
fontSize?: 'default' | 'small' | 'large';
}>;
// Warning: (ae-missing-release-tag) "IdentityApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type IdentityApi = {
getUserId(): string;
@@ -408,9 +534,13 @@ export type IdentityApi = {
signOut(): Promise<void>;
};
// Warning: (ae-missing-release-tag) "identityApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const identityApiRef: ApiRef<IdentityApi>;
// Warning: (ae-missing-release-tag) "microsoftAuthApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const microsoftAuthApiRef: ApiRef<
OAuthApi &
@@ -420,6 +550,8 @@ export const microsoftAuthApiRef: ApiRef<
SessionApi
>;
// Warning: (ae-missing-release-tag) "oauth2ApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const oauth2ApiRef: ApiRef<
OAuthApi &
@@ -429,6 +561,8 @@ export const oauth2ApiRef: ApiRef<
SessionApi
>;
// Warning: (ae-missing-release-tag) "OAuthApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type OAuthApi = {
getAccessToken(
@@ -437,6 +571,8 @@ export type OAuthApi = {
): Promise<string>;
};
// Warning: (ae-missing-release-tag) "OAuthRequestApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type OAuthRequestApi = {
createAuthRequester<AuthResponse>(
@@ -445,12 +581,18 @@ export type OAuthRequestApi = {
authRequest$(): Observable<PendingAuthRequest[]>;
};
// Warning: (ae-missing-release-tag) "oauthRequestApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const oauthRequestApiRef: ApiRef<OAuthRequestApi>;
// Warning: (ae-missing-release-tag) "OAuthScope" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type OAuthScope = string | string[];
// Warning: (ae-missing-release-tag) "Observable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type Observable<T> = {
[Symbol.observable](): Observable<T>;
@@ -462,6 +604,8 @@ export type Observable<T> = {
): Subscription;
};
// Warning: (ae-missing-release-tag) "Observer" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type Observer<T> = {
next?(value: T): void;
@@ -469,6 +613,8 @@ export type Observer<T> = {
complete?(): void;
};
// Warning: (ae-missing-release-tag) "oidcAuthApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const oidcAuthApiRef: ApiRef<
OAuthApi &
@@ -478,6 +624,8 @@ export const oidcAuthApiRef: ApiRef<
SessionApi
>;
// Warning: (ae-missing-release-tag) "oktaAuthApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const oktaAuthApiRef: ApiRef<
OAuthApi &
@@ -487,6 +635,8 @@ export const oktaAuthApiRef: ApiRef<
SessionApi
>;
// Warning: (ae-missing-release-tag) "oneloginAuthApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const oneloginAuthApiRef: ApiRef<
OAuthApi &
@@ -496,11 +646,15 @@ export const oneloginAuthApiRef: ApiRef<
SessionApi
>;
// Warning: (ae-missing-release-tag) "OpenIdConnectApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type OpenIdConnectApi = {
getIdToken(options?: AuthRequestOptions): Promise<string>;
};
// Warning: (ae-missing-release-tag) "PendingAuthRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type PendingAuthRequest = {
provider: AuthProvider;
@@ -508,6 +662,8 @@ export type PendingAuthRequest = {
trigger(): Promise<void>;
};
// Warning: (ae-missing-release-tag) "PluginConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type PluginConfig<
Routes extends AnyRoutes,
@@ -520,14 +676,20 @@ export type PluginConfig<
externalRoutes?: ExternalRoutes;
};
// Warning: (ae-missing-release-tag) "PluginHooks" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type PluginHooks = {
featureFlags: FeatureFlagsHooks;
};
// Warning: (ae-missing-release-tag) "PluginOutput" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type PluginOutput = FeatureFlagOutput;
// Warning: (ae-missing-release-tag) "ProfileInfo" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type ProfileInfo = {
email?: string;
@@ -535,19 +697,27 @@ export type ProfileInfo = {
picture?: string;
};
// Warning: (ae-missing-release-tag) "ProfileInfoApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type ProfileInfoApi = {
getProfile(options?: AuthRequestOptions): Promise<ProfileInfo | undefined>;
};
// Warning: (ae-missing-release-tag) "RouteOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type RouteOptions = {
exact?: boolean;
};
// Warning: (ae-missing-release-tag) "RoutePath" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type RoutePath = string;
// Warning: (ae-missing-release-tag) "RouteRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type RouteRef<Params extends AnyParams = any> = {
readonly [routeRefType]: 'absolute';
@@ -557,11 +727,15 @@ export type RouteRef<Params extends AnyParams = any> = {
title?: string;
};
// Warning: (ae-missing-release-tag) "samlAuthApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const samlAuthApiRef: ApiRef<
ProfileInfoApi & BackstageIdentityApi & SessionApi
>;
// Warning: (ae-missing-release-tag) "SessionApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type SessionApi = {
signIn(): Promise<void>;
@@ -569,6 +743,8 @@ export type SessionApi = {
sessionState$(): Observable<SessionState>;
};
// Warning: (ae-missing-release-tag) "SessionState" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export enum SessionState {
// (undocumented)
@@ -577,11 +753,15 @@ export enum SessionState {
SignedOut = 'SignedOut',
}
// Warning: (ae-missing-release-tag) "SignInPageProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type SignInPageProps = {
onResult(result: SignInResult): void;
};
// Warning: (ae-missing-release-tag) "SignInResult" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type SignInResult = {
userId: string;
@@ -590,24 +770,45 @@ export type SignInResult = {
signOut?: () => Promise<void>;
};
// Warning: (ae-missing-release-tag) "StorageApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface StorageApi {
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
forBucket(name: string): StorageApi;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
// Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
// Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
// Warning: (tsdoc-undefined-tag) The TSDoc tag "@return" is not defined in this configuration
get<T>(key: string): T | undefined;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
observe$<T>(key: string): Observable<StorageValueChange<T>>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
remove(key: string): Promise<void>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
set(key: string, data: any): Promise<void>;
}
// Warning: (ae-missing-release-tag) "storageApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const storageApiRef: ApiRef<StorageApi>;
// Warning: (ae-missing-release-tag) "StorageValueChange" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type StorageValueChange<T = any> = {
key: string;
newValue?: T;
};
// Warning: (ae-missing-release-tag) "SubRouteRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type SubRouteRef<Params extends AnyParams = any> = {
readonly [routeRefType]: 'sub';
@@ -616,26 +817,38 @@ export type SubRouteRef<Params extends AnyParams = any> = {
params: ParamKeys<Params>;
};
// Warning: (ae-missing-release-tag) "Subscription" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type Subscription = {
unsubscribe(): void;
readonly closed: boolean;
};
// Warning: (ae-missing-release-tag) "TypesToApiRefs" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type TypesToApiRefs<T> = {
[key in keyof T]: ApiRef<T[key]>;
};
// Warning: (ae-missing-release-tag) "useApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function useApi<T>(apiRef: ApiRef<T>): T;
// Warning: (ae-missing-release-tag) "useApiHolder" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function useApiHolder(): ApiHolder;
// Warning: (ae-missing-release-tag) "useApp" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const useApp: () => AppContext;
// Warning: (ae-missing-release-tag) "useElementFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export function useElementFilter<T>(
node: ReactNode,
@@ -643,9 +856,15 @@ export function useElementFilter<T>(
dependencies?: any[],
): T;
// Warning: (ae-missing-release-tag) "UserFlags" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type UserFlags = {};
// Warning: (ae-forgotten-export) The symbol "RouteFunc" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "useRouteRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
// Warning: (ae-missing-release-tag) "useRouteRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function useRouteRef<Optional extends boolean, Params extends AnyParams>(
routeRef: ExternalRouteRef<Params, Optional>,
@@ -656,11 +875,15 @@ export function useRouteRef<Params extends AnyParams>(
routeRef: RouteRef<Params> | SubRouteRef<Params>,
): RouteFunc<Params>;
// Warning: (ae-missing-release-tag) "useRouteRefParams" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function useRouteRefParams<Params extends AnyParams>(
_routeRef: RouteRef<Params> | SubRouteRef<Params>,
): Params;
// Warning: (ae-missing-release-tag) "withApis" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function withApis<T>(
apis: TypesToApiRefs<T>,
@@ -671,5 +894,17 @@ export function withApis<T>(
displayName: string;
};
// Warnings were encountered during analysis:
//
// src/apis/definitions/ErrorApi.d.ts:37:5 - (ae-forgotten-export) The symbol "Error" needs to be exported by the entry point index.d.ts
// src/apis/definitions/auth.d.ts:29:8 - (tsdoc-undefined-tag) The TSDoc tag "@default" is not defined in this configuration
// src/apis/definitions/auth.d.ts:38:8 - (tsdoc-undefined-tag) The TSDoc tag "@default" is not defined in this configuration
// src/apis/definitions/auth.d.ts:96:68 - (tsdoc-undefined-tag) The TSDoc tag "@AuthRequestOptions" is not defined in this configuration
// src/apis/definitions/auth.d.ts:110:16 - (tsdoc-undefined-tag) The TSDoc tag "@IdentityApi" is not defined in this configuration
// src/apis/definitions/auth.d.ts:113:68 - (tsdoc-undefined-tag) The TSDoc tag "@AuthRequestOptions" is not defined in this configuration
// src/extensions/extensions.d.ts:14:5 - (ae-forgotten-export) The symbol "ComponentLoader" needs to be exported by the entry point index.d.ts
// src/routing/RouteRef.d.ts:34:5 - (ae-forgotten-export) The symbol "OldIconComponent" needs to be exported by the entry point index.d.ts
// src/routing/types.d.ts:30:5 - (ae-forgotten-export) The symbol "ParamKeys" needs to be exported by the entry point index.d.ts
// (No @packageDocumentation comment for this package)
```
+8 -8
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/core-plugin-api",
"description": "Core API used by Backstage plugins",
"version": "0.1.3",
"version": "0.1.5",
"private": false,
"publishConfig": {
"access": "public",
@@ -29,10 +29,10 @@
"clean": "backstage-cli clean"
},
"dependencies": {
"@backstage/config": "^0.1.3",
"@backstage/theme": "^0.2.8",
"@material-ui/core": "^4.11.0",
"@types/react": "^16.9",
"@backstage/config": "^0.1.6",
"@backstage/theme": "^0.2.9",
"@material-ui/core": "^4.12.2",
"@types/react": "*",
"history": "^5.0.0",
"prop-types": "^15.7.2",
"react": "^16.12.0",
@@ -41,9 +41,9 @@
"zen-observable": "^0.8.15"
},
"devDependencies": {
"@backstage/cli": "^0.7.2",
"@backstage/core-app-api": "^0.1.3",
"@backstage/test-utils": "^0.1.14",
"@backstage/cli": "^0.7.7",
"@backstage/core-app-api": "^0.1.7",
"@backstage/test-utils": "^0.1.16",
"@backstage/test-utils-core": "^0.1.1",
"@testing-library/jest-dom": "^5.10.1",
"@testing-library/react": "^11.2.5",
@@ -151,9 +151,14 @@ export type BackstageIdentity = {
id: string;
/**
* An ID token that can be used to authenticate the user within Backstage.
* @deprecated This is deprecated, use `token` instead.
*/
idToken: string;
/**
* The token used to authenticate the user within Backstage.
*/
token: string;
};
/**
+72
View File
@@ -1,5 +1,77 @@
# @backstage/create-app
## 0.3.34
### Patch Changes
- c189c5da5: fix typo in the comments of EntityPage component
- 48ea3d25b: The recommended value for a `backstage.io/techdocs-ref` annotation is now
`dir:.`, indicating "documentation source files are located in the same
directory relative to the catalog entity." Note that `url:<location>` values
are still supported.
- 98dda80b4: Update `techdocs.generators` with the latest `techdocs.generator` config in `app-config.yaml`. See
https://backstage.io/docs/features/techdocs/configuration for reference and relevant PR
https://github.com/backstage/backstage/pull/6071/files for the changes.
## 0.3.33
### Patch Changes
- 9d40fcb1e: - Bumping `material-ui/core` version to at least `4.12.2` as they made some breaking changes in later versions which broke `Pagination` of the `Table`.
- Switching out `material-table` to `@material-table/core` for support for the later versions of `material-ui/core`
- This causes a minor API change to `@backstage/core-components` as the interface for `Table` re-exports the `prop` from the underlying `Table` components.
- `onChangeRowsPerPage` has been renamed to `onRowsPerPageChange`
- `onChangePage` has been renamed to `onPageChange`
- Migration guide is here: https://material-table-core.com/docs/breaking-changes
- d50c9e7c0: Update the `software-templates` to point to `main` branch instead of `master`
- 224e54484: Added an `EntityProcessingErrorsPanel` component to show any errors that occurred when refreshing an entity from its source location.
If upgrading, this should be added to your `EntityPage` in your Backstage application:
```diff
// packages/app/src/components/catalog/EntityPage.tsx
const overviewContent = (
...
<EntityOrphanWarning />
</Grid>
</EntitySwitch.Case>
</EntitySwitch>
+ <EntitySwitch>
+ <EntitySwitch.Case if={hasCatalogProcessingErrors}>
+ <Grid item xs={12}>
+ <EntityProcessingErrorsPanel />
+ </Grid>
+ </EntitySwitch.Case>
+ </EntitySwitch>
```
Additionally, `WarningPanel` now changes color based on the provided severity.
## 0.3.32
### Patch Changes
- 03bf17e9b: Improve the responsiveness of the EntityPage UI. With this the Header component should scale with the screen size & wrapping should not cause overflowing/blocking of links. Additionally enforce the Pages using the Grid Layout to use it across all screen sizes & to wrap as intended.
To benefit from the improved responsive layout, the `EntityPage` in existing Backstage applications should be updated to set the `xs` column size on each grid item in the page, as this does not default. For example:
```diff
- <Grid item md={6}>
+ <Grid item xs={12} md={6}>
```
- eb740ee24: Moved sample software templates to the [backstage/software-templates](https://github.com/backstage/software-templates) repository. If you previously referenced the sample templates straight from `scaffolder-backend` plugin in the main [backstage/backstage](https://github.com/backstage/backstage) repository in your `app-config.yaml`, these references will need to be updated.
See https://github.com/backstage/software-templates
## 0.3.31
### Patch Changes
- ae84b20cf: Revert the upgrade to `fs-extra@10.0.0` as that seemed to have broken all installs inexplicably.
## 0.3.30
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/create-app",
"description": "Create app package for Backstage",
"version": "0.3.30",
"version": "0.3.34",
"private": false,
"publishConfig": {
"access": "public"

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