Merge branch 'master' of github.com:backstage/backstage into scaffolder-examples

This commit is contained in:
Brian Fletcher
2022-12-22 08:26:18 +00:00
121 changed files with 2129 additions and 741 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-scaffolder': patch
---
rollback `@rjsf/validator-ajv8` to `@rjsf/validator-v6`
+8
View File
@@ -0,0 +1,8 @@
---
'@backstage/catalog-model': patch
'@backstage/plugin-scaffolder-common': patch
'@backstage/plugin-search-backend-module-elasticsearch': patch
'@backstage/plugin-search-backend-node': patch
---
Fixed spelling mistakes in documentation.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/catalog-client': minor
---
Implemented support for the `order` directive on `getEntities`
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core-components': patch
---
Applied fix from v1.9.1
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-stack-overflow-backend': minor
---
Enable configuration override for StackOverflow backend plugin when instantiating the search indexer. This makes it possible to set different configuration for frontend and backend of the plugin.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/repo-tools': patch
---
Updated dependency `@microsoft/tsdoc-config` to `0.16.2`.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend': minor
---
Implemented server side ordering in the entities endpoint
@@ -34,7 +34,7 @@ jobs:
diffRef: 'origin/master'
marker: <!-- changeset-feedback -->
issue-number: ${{ github.event.pull_request.number }}
botUsername: github-actions[bot]
botUsername: backstage-goalie[bot]
app-id: ${{ secrets.BACKSTAGE_GOALIE_APPLICATION_ID }}
private-key: ${{ secrets.BACKSTAGE_GOALIE_PRIVATE_KEY }}
installation-id: ${{ secrets.BACKSTAGE_GOALIE_INSTALLATION_ID }}
+4
View File
@@ -37,6 +37,8 @@ auth:
audience: ${AUTH_AUTH0_AUDIENCE}
connection: ${AUTH_AUTH0_CONNECTION}
connectionScope: ${AUTH_AUTH0_CONNECTION_SCOPE}
session:
secret: ${AUTH_SESSION_SECRET}
```
The Auth0 provider is a structure with three configuration keys:
@@ -46,6 +48,8 @@ The Auth0 provider is a structure with three configuration keys:
page
- `domain`: The Application domain, found on the Auth0 Application page
Because Auth0 requires a session you need to give the session a secret key.
## Optional Configuration
- `audience`: The intended recipients of the token
+23
View File
@@ -154,6 +154,29 @@ Some more real world usable examples:
`/entities?fields=kind,metadata.namespace,metadata.name`
### Ordering
By default the entities are returned in an undefined, but stable order. You can
pass in one or more `order` query parameters to affect that ordering.
Each parameter starts either with `asc:` for ascending lexicographical order or
`desc:` for descending (reverse) lexicographical order, followed by a
dot-separated path into an entity's keys. The ordering is case insensitive. If
more than one order directive is given, later directives have lower precedence
(they are applied only when directives of higher precedence have equal values).
Example:
```text
/entities?order=asc:kind&order=desc:metadata.name
```
This will order the output first by kind ascending, and then within each kind
(if there's more than one of a given kind) by their name descending. When given
a field that does NOT exist on all entities in the result set, those entities
that do not have the field will always be sorted last in that particular order
step, no matter what the desired order was.
#### Pagination
You may pass the `offset` and `limit` query parameters to do classical
@@ -1309,3 +1309,7 @@ resolved relative to the location of this Location entity itself.
A list of targets as strings. They can all be either absolute paths/URLs
(depending on the type), or relative paths such as `./details/catalog-info.yaml`
which are resolved relative to the location of this Location entity itself.
### `spec.presence` [optional]
Describes whether the target of a location is required to exist or not. It defaults to `'required'` if not specified, can also be `'optional'`.
@@ -333,3 +333,85 @@ reading the search context.
If you produce something generic and reusable, consider contributing your
component upstream so that all users of the Backstage Search Platform can
benefit. Issues and pull requests welcome.
#### Custom search results
Search results throughout Backstage are rendered as lists so that list items can easily be customized; although a [default result list item](https://backstage.io/storybook/?path=/story/plugins-search-defaultresultlistitem--default) is available, plugins are in the best position to provide custom result list items that surface relevant information only known to the plugin.
The example below imagines `YourCustomSearchResult` as a type of search result that contains associated `tags` which could be rendered as chips below the title/text.
```tsx
import { Link } from '@backstage/core-components';
import { useAnalytics } from '@backstage/core-plugin-api';
import { ResultHighlight } from '@backstage/plugin-search-common';
import { HighlightedSearchResultText } from '@backstage/plugin-search-react';
type CustomSearchResultListItemProps = {
result: YourCustomSearchResult;
rank?: number;
highlight?: ResultHighlight;
};
export const CustomSearchResultListItem = (
props: CustomSearchResultListItemProps,
) => {
const { title, text, location, tags } = props.result;
const analytics = useAnalytics();
const handleClick = () => {
analytics.captureEvent('discover', title, {
attributes: { to: location },
value: props.rank,
});
};
return (
<Link noTrack to={location} onClick={handleClick}>
<ListItem alignItems="center">
<Box flexWrap="wrap">
<ListItemText
primaryTypographyProps={{ variant: 'h6' }}
primary={
highlight?.fields?.title ? (
<HighlightedSearchResultText
text={highlight.fields.title}
preTag={highlight.preTag}
postTag={highlight.postTag}
/>
) : (
title
)
}
secondary={
highlight?.fields?.text ? (
<HighlightedSearchResultText
text={highlight.fields.text}
preTag={highlight.preTag}
postTag={highlight.postTag}
/>
) : (
text
)
}
/>
{tags &&
tags.map((tag: string) => (
<Chip key={tag} label={`Tag: ${tag}`} size="small" />
))}
</Box>
</ListItem>
<Divider />
</Link>
);
};
```
The optional use of the `<HighlightedSearchResultText>` component makes it possible to highlight relevant parts of the result based on the user's search query.
**Note on Analytics**: In order for app integrators to track and improve search experiences across Backstage, it's important for them to understand when and what users search for, as well as what they click on after searching. When providing a custom result component, it's your responsibility as a plugin developer to instrument it according to search analytics conventions. In particular:
- You must use the `analytics.captureEvent` method, from the `useAnalytics()` hook (detailed [plugin analytics docs are here](./analytics.md)).
- You must ensure that the action of the event, representing a click on a search result item, is `discover`, and the subject is the `title` of the clicked result. In addition, the `to` attribute should be set to the result's `location`, and the `value` of the event must be set to the `rank` (passed in as a prop).
- You must ensure that the aforementioned `captureEvent` method is called when a user clicks the link; you should further ensure that the `noTrack` prop is added to the link (which disables default link click tracking, in favor of this custom instrumentation).
For other examples and inspiration on custom result list items, check out the [`<StackOverflowSearchResultListItem>`](https://github.com/backstage/backstage/blob/c981e83/plugins/stack-overflow/src/search/StackOverflowSearchResultListItem/StackOverflowSearchResultListItem.tsx) or [`<CatalogSearchResultListItem>`](https://github.com/backstage/backstage/blob/c981e83/plugins/catalog/src/components/CatalogSearchResultListItem/CatalogSearchResultListItem.tsx) components.
+14
View File
@@ -0,0 +1,14 @@
---
title: Hoop
author: hoop.dev
authorUrl: https://hoop.dev
category: Cloud-native ssh
description: hoop.dev is a cloud-native ssh implementation that lets you edit connections contents live.
documentation: https://github.com/hoophq/backstage-plugin
iconUrl: https://avatars.githubusercontent.com/u/113131551?s=200&v=4
npmPackageName: '@hoophq/backstage-plugin'
tags:
- cloud-native ssh
- monitoring
- redact
addedDate: '2022-12-20'
+10
View File
@@ -0,0 +1,10 @@
---
title: Q&A
author: drodil
authorUrl: https://github.com/drodil
category: Services
description: Ask and answer questions within Backstage
documentation: https://github.com/drodil/backstage-plugin-qeta
iconUrl: img/qeta-logo.png
npmPackageName: '@drodil/backstage-plugin-qeta'
addedDate: '2022-12-21'
+2 -2
View File
@@ -34,7 +34,7 @@ const Background = props => {
<Block.Container style={{ justifyContent: 'flex-start' }}>
<Block.MediaFrame>
<iframe
src="https://www.youtube.com/embed/q9EQLR1l2SM"
src="https://www.youtube.com/embed/aEX90BlhQVs"
title="YouTube video player"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
@@ -45,7 +45,7 @@ const Background = props => {
<iframe
width="300"
height="500"
src="https://www.youtube.com/live_chat?v=q9EQLR1l2SM&embed_domain=backstage.io&dark_theme=1"
src="https://www.youtube.com/live_chat?v=aEX90BlhQVs&embed_domain=backstage.io&dark_theme=1"
></iframe>
</Block.MediaFrame>
</Block.Container>
Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

+7
View File
@@ -1,5 +1,12 @@
# @backstage/app-defaults
## 1.0.10
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
## 1.0.9
### Patch Changes
+55
View File
@@ -1,5 +1,60 @@
# example-app
## 0.2.79
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/app-defaults@1.0.10
- @backstage/cli@0.22.0
- @backstage/integration-react@1.1.8
- @backstage/plugin-airbrake@0.3.13
- @backstage/plugin-apache-airflow@0.2.6
- @backstage/plugin-api-docs@0.8.13
- @backstage/plugin-azure-devops@0.2.4
- @backstage/plugin-azure-sites@0.1.2
- @backstage/plugin-badges@0.2.37
- @backstage/plugin-catalog-graph@0.2.25
- @backstage/plugin-catalog-import@0.9.3
- @backstage/plugin-catalog-react@1.2.3
- @backstage/plugin-circleci@0.3.13
- @backstage/plugin-cloudbuild@0.3.13
- @backstage/plugin-code-coverage@0.2.6
- @backstage/plugin-cost-insights@0.12.2
- @backstage/plugin-dynatrace@1.0.3
- @backstage/plugin-explore@0.3.44
- @backstage/plugin-gcalendar@0.3.9
- @backstage/plugin-gcp-projects@0.3.32
- @backstage/plugin-github-actions@0.5.13
- @backstage/plugin-gocd@0.1.19
- @backstage/plugin-graphiql@0.2.45
- @backstage/plugin-home@0.4.29
- @backstage/plugin-jenkins@0.7.12
- @backstage/plugin-kafka@0.3.13
- @backstage/plugin-kubernetes@0.7.6
- @backstage/plugin-lighthouse@0.3.13
- @backstage/plugin-newrelic@0.3.31
- @backstage/plugin-newrelic-dashboard@0.2.6
- @backstage/plugin-org@0.6.3
- @backstage/plugin-pagerduty@0.5.6
- @backstage/plugin-playlist@0.1.4
- @backstage/plugin-rollbar@0.4.13
- @backstage/plugin-scaffolder@1.9.1
- @backstage/plugin-search@1.0.6
- @backstage/plugin-search-react@1.3.1
- @backstage/plugin-sentry@0.4.6
- @backstage/plugin-shortcuts@0.3.5
- @backstage/plugin-stack-overflow@0.1.9
- @backstage/plugin-tech-insights@0.3.5
- @backstage/plugin-tech-radar@0.5.20
- @backstage/plugin-techdocs@1.4.2
- @backstage/plugin-techdocs-module-addons-contrib@1.0.8
- @backstage/plugin-techdocs-react@1.1.1
- @backstage/plugin-todo@0.2.15
- @backstage/plugin-user-settings@0.6.1
- @internal/plugin-catalog-customized@0.0.6
## 0.2.78
### Patch Changes
+12
View File
@@ -161,6 +161,17 @@ export type EntityFilterQuery =
| Record<string, string | symbol | (string | symbol)[]>[]
| Record<string, string | symbol | (string | symbol)[]>;
// @public
export type EntityOrderQuery =
| {
field: string;
order: 'asc' | 'desc';
}
| Array<{
field: string;
order: 'asc' | 'desc';
}>;
// @public
export interface GetEntitiesByRefsRequest {
entityRefs: string[];
@@ -179,6 +190,7 @@ export interface GetEntitiesRequest {
filter?: EntityFilterQuery;
limit?: number;
offset?: number;
order?: EntityOrderQuery;
}
// @public
@@ -193,6 +193,31 @@ describe('CatalogClient', () => {
expect(response.items).toEqual([]);
});
it('handles ordering properly', async () => {
expect.assertions(2);
server.use(
rest.get(`${mockBaseUrl}/entities`, (req, res, ctx) => {
expect(req.url.search).toBe(
'?order=asc:kind&order=desc:metadata.name',
);
return res(ctx.json([]));
}),
);
const response = await client.getEntities(
{
order: [
{ field: 'kind', order: 'asc' },
{ field: 'metadata.name', order: 'desc' },
],
},
{ token },
);
expect(response.items).toEqual([]);
});
});
describe('getEntitiesByRefs', () => {
+20 -1
View File
@@ -99,7 +99,14 @@ export class CatalogClient implements CatalogApi {
request?: GetEntitiesRequest,
options?: CatalogRequestOptions,
): Promise<GetEntitiesResponse> {
const { filter = [], fields = [], offset, limit, after } = request ?? {};
const {
filter = [],
fields = [],
order,
offset,
limit,
after,
} = request ?? {};
const params: string[] = [];
// filter param can occur multiple times, for example
@@ -129,6 +136,18 @@ export class CatalogClient implements CatalogApi {
params.push(`fields=${fields.map(encodeURIComponent).join(',')}`);
}
if (order) {
for (const directive of [order].flat()) {
if (directive) {
params.push(
`order=${encodeURIComponent(directive.order)}:${encodeURIComponent(
directive.field,
)}`,
);
}
}
}
if (offset !== undefined) {
params.push(`offset=${offset}`);
}
+46
View File
@@ -98,6 +98,48 @@ export type EntityFilterQuery =
*/
export type EntityFieldsQuery = string[];
/**
* Dot-separated field based ordering directives, controlling the sort order of
* the output entities.
*
* @remarks
*
* Each field is a dot-separated path into an entity's keys. The order is either
* ascending (`asc`, lexicographical order) or descending (`desc`, reverse
* lexicographical order). The ordering is case insensitive.
*
* If more than one order directive is given, later directives have lower
* precedence (they are applied only when directives of higher precedence have
* equal values).
*
* Example:
*
* ```
* [
* { field: 'kind', order: 'asc' },
* { field: 'metadata.name', order: 'desc' },
* ]
* ```
*
* This will order the output first by kind ascending, and then within each kind
* (if there's more than one of a given kind) by their name descending.
*
* When given a field that does NOT exist on all entities in the result set,
* those entities that do not have the field will always be sorted last in that
* particular order step, no matter what the desired order was.
*
* @public
*/
export type EntityOrderQuery =
| {
field: string;
order: 'asc' | 'desc';
}
| Array<{
field: string;
order: 'asc' | 'desc';
}>;
/**
* The request type for {@link CatalogClient.getEntities}.
*
@@ -113,6 +155,10 @@ export interface GetEntitiesRequest {
* declarations.
*/
fields?: EntityFieldsQuery;
/**
*If given, order the result set by those directives.
*/
order?: EntityOrderQuery;
/**
* If given, skips over the first N items in the result set.
*/
@@ -22,6 +22,7 @@ export type {
CatalogRequestOptions,
EntityFieldsQuery,
EntityFilterQuery,
EntityOrderQuery,
GetEntitiesByRefsRequest,
GetEntitiesByRefsResponse,
GetEntitiesRequest,
@@ -15,11 +15,11 @@
*/
import type { Entity } from '../entity/Entity';
import schema from '../schema/kinds/System.v1alpha1.schema.json';
import { ajvCompiledJsonSchemaValidator } from './util';
import schema from '../schema/kinds/System.v1alpha1.schema.json';
/**
* Backstage catalog System kind Entity. Systems group Comopnents, Resources and APIs together.
* Backstage catalog System kind Entity. Systems group Components, Resources and APIs together.
*
* @remarks
*
+6
View File
@@ -1,5 +1,11 @@
# @backstage/core-components
## 0.12.2
### Patch Changes
- Fixing the UPPERCASED links in the sidebar
## 0.12.1
### Patch Changes
@@ -63,6 +63,9 @@ const useStyles = makeStyles<BackstageTheme, { sidebarConfig: SidebarConfig }>(
'&::-webkit-scrollbar': {
display: 'none',
},
'& .MuiButtonBase-root': {
textTransform: 'none',
},
}),
drawerOpen: props => ({
width: props.sidebarConfig.drawerWidthOpen,
+10
View File
@@ -1,5 +1,15 @@
# @backstage/dev-utils
## 1.0.10
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/app-defaults@1.0.10
- @backstage/integration-react@1.1.8
- @backstage/plugin-catalog-react@1.2.3
## 1.0.9
### Patch Changes
+7
View File
@@ -1,5 +1,12 @@
# @backstage/integration-react
## 1.1.8
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
## 1.1.7
### Patch Changes
+1 -1
View File
@@ -37,7 +37,7 @@
"@microsoft/api-extractor": "^7.23.0",
"@microsoft/api-extractor-model": "^7.17.2",
"@microsoft/tsdoc": "0.14.1",
"@microsoft/tsdoc-config": "0.16.1",
"@microsoft/tsdoc-config": "0.16.2",
"chalk": "^4.0.0",
"commander": "^9.1.0",
"fs-extra": "10.1.0",
@@ -1,5 +1,18 @@
# techdocs-cli-embedded-app
## 0.2.78
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/app-defaults@1.0.10
- @backstage/cli@0.22.0
- @backstage/integration-react@1.1.8
- @backstage/plugin-catalog@1.7.1
- @backstage/plugin-techdocs@1.4.2
- @backstage/plugin-techdocs-react@1.1.1
## 0.2.77
### Patch Changes
+10
View File
@@ -1,5 +1,15 @@
# @backstage/plugin-adr
## 0.2.5
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/integration-react@1.1.8
- @backstage/plugin-catalog-react@1.2.3
- @backstage/plugin-search-react@1.3.1
## 0.2.4
### Patch Changes
+9
View File
@@ -1,5 +1,14 @@
# @backstage/plugin-airbrake
## 0.3.13
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/dev-utils@1.0.10
- @backstage/plugin-catalog-react@1.2.3
## 0.3.12
### Patch Changes
+8
View File
@@ -1,5 +1,13 @@
# @backstage/plugin-allure
## 0.1.29
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/plugin-catalog-react@1.2.3
## 0.1.28
### Patch Changes
+7
View File
@@ -1,5 +1,12 @@
# @backstage/plugin-analytics-module-ga
## 0.1.24
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
## 0.1.23
### Patch Changes
+7
View File
@@ -1,5 +1,12 @@
# @backstage/plugin-apache-airflow
## 0.2.6
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
## 0.2.5
### Patch Changes
+9
View File
@@ -1,5 +1,14 @@
# @backstage/plugin-api-docs
## 0.8.13
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/plugin-catalog@1.7.1
- @backstage/plugin-catalog-react@1.2.3
## 0.8.12
### Patch Changes
+7
View File
@@ -1,5 +1,12 @@
# @backstage/plugin-apollo-explorer
## 0.1.6
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
## 0.1.5
### Patch Changes
+8
View File
@@ -1,5 +1,13 @@
# @backstage/plugin-azure-devops
## 0.2.4
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/plugin-catalog-react@1.2.3
## 0.2.3
### Patch Changes
+8
View File
@@ -1,5 +1,13 @@
# @backstage/plugin-azure-sites
## 0.1.2
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/plugin-catalog-react@1.2.3
## 0.1.1
### Patch Changes
+8
View File
@@ -1,5 +1,13 @@
# @backstage/plugin-badges
## 0.2.37
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/plugin-catalog-react@1.2.3
## 0.2.36
### Patch Changes
+10
View File
@@ -1,5 +1,15 @@
# @backstage/plugin-bazaar
## 0.2.2
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/cli@0.22.0
- @backstage/plugin-catalog@1.7.1
- @backstage/plugin-catalog-react@1.2.3
## 0.2.1
### Patch Changes
+8
View File
@@ -1,5 +1,13 @@
# @backstage/plugin-bitrise
## 0.1.40
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/plugin-catalog-react@1.2.3
## 0.1.39
### Patch Changes
@@ -38,6 +38,14 @@ export type EntityPagination = {
after?: string;
};
/**
* A sorting rule for entities.
*/
export type EntityOrder = {
field: string;
order: 'asc' | 'desc';
};
/**
* Matches rows in the search table.
* @public
@@ -71,6 +79,7 @@ export type PageInfo =
export type EntitiesRequest = {
filter?: EntityFilter;
fields?: (entity: Entity) => Entity;
order?: EntityOrder[];
pagination?: EntityPagination;
authorizationToken?: string;
};
@@ -28,6 +28,7 @@ import {
import { Stitcher } from '../stitching/Stitcher';
import { buildEntitySearch } from '../stitching/buildEntitySearch';
import { DefaultEntitiesCatalog } from './DefaultEntitiesCatalog';
import { EntitiesRequest } from '../catalog/types';
describe('DefaultEntitiesCatalog', () => {
const databases = TestDatabases.create({
@@ -254,7 +255,7 @@ describe('DefaultEntitiesCatalog', () => {
describe('entities', () => {
it.each(databases.eachSupportedId())(
'should return correct entity for simple filter',
'should return correct entity for simple filter, %p',
async databaseId => {
const { knex } = await createDatabase(databaseId);
const entity1: Entity = {
@@ -284,10 +285,11 @@ describe('DefaultEntitiesCatalog', () => {
expect(entities.length).toBe(1);
expect(entities[0]).toEqual(entity2);
},
60_000,
);
it.each(databases.eachSupportedId())(
'should return correct entity for negation filter',
'should return correct entity for negation filter, %p',
async databaseId => {
const { knex } = await createDatabase(databaseId);
const entity1: Entity = {
@@ -319,10 +321,11 @@ describe('DefaultEntitiesCatalog', () => {
expect(entities.length).toBe(1);
expect(entities[0]).toEqual(entity1);
},
60_000,
);
it.each(databases.eachSupportedId())(
'should return correct entities for nested filter',
'should return correct entities for nested filter, %p',
async databaseId => {
const { knex } = await createDatabase(databaseId);
const entity1: Entity = {
@@ -388,10 +391,11 @@ describe('DefaultEntitiesCatalog', () => {
expect(entities).toContainEqual(entity2);
expect(entities).toContainEqual(entity4);
},
60_000,
);
it.each(databases.eachSupportedId())(
'should return correct entities for complex negation filter',
'should return correct entities for complex negation filter, %p',
async databaseId => {
const { knex } = await createDatabase(databaseId);
const entity1: Entity = {
@@ -429,10 +433,11 @@ describe('DefaultEntitiesCatalog', () => {
expect(entities.length).toBe(1);
expect(entities).toContainEqual(entity1);
},
60_000,
);
it.each(databases.eachSupportedId())(
'should return no matches for an empty values array',
'should return no matches for an empty values array, %p',
// NOTE: An empty values array is not a sensible input in a realistic scenario.
async databaseId => {
const { knex } = await createDatabase(databaseId);
@@ -461,6 +466,7 @@ describe('DefaultEntitiesCatalog', () => {
expect(entities.length).toBe(0);
},
60_000,
);
it.each(databases.eachSupportedId())(
@@ -517,12 +523,105 @@ describe('DefaultEntitiesCatalog', () => {
},
]);
},
60_000,
);
it.each(databases.eachSupportedId())(
'can order and combine with filtering, %p',
async databaseId => {
const { knex } = await createDatabase(databaseId);
const entity1: Entity = {
apiVersion: 'a',
kind: 'k',
metadata: { name: 'n1' },
spec: { a: 'foo' },
};
const entity2: Entity = {
apiVersion: 'a',
kind: 'k',
metadata: { name: 'n2' },
spec: { a: 'bar' },
};
const entity3: Entity = {
apiVersion: 'a',
kind: 'k',
metadata: { name: 'n3' },
spec: { a: 'bar', b: 'lonely' },
};
const entity4: Entity = {
apiVersion: 'a',
kind: 'k',
metadata: { name: 'n4' },
spec: { a: 'baz', b: 'only' },
};
await addEntityToSearch(knex, entity1);
await addEntityToSearch(knex, entity2);
await addEntityToSearch(knex, entity3);
await addEntityToSearch(knex, entity4);
const catalog = new DefaultEntitiesCatalog(knex, stitcher);
function f(request: EntitiesRequest): Promise<string[]> {
return catalog
.entities(request)
.then(response => response.entities.map(e => e.metadata.name));
}
await expect(
f({ order: [{ field: 'metadata.name', order: 'asc' }] }),
).resolves.toEqual(['n1', 'n2', 'n3', 'n4']);
await expect(
f({ order: [{ field: 'metadata.name', order: 'desc' }] }),
).resolves.toEqual(['n4', 'n3', 'n2', 'n1']);
await expect(
f({
order: [
{ field: 'spec.a', order: 'asc' },
{ field: 'metadata.name', order: 'desc' },
],
}),
).resolves.toEqual(['n3', 'n2', 'n4', 'n1']);
await expect(
f({
filter: { not: { key: 'spec.b', values: ['lonely'] } },
order: [
{ field: 'spec.a', order: 'asc' },
{ field: 'metadata.name', order: 'desc' },
],
}),
).resolves.toEqual(['n2', 'n4', 'n1']);
// only n3 and n4 has spec.b, nulls (no match) always goes last no matter the order
await expect(
f({
order: [
{ field: 'spec.b', order: 'asc' },
{ field: 'metadata.name', order: 'asc' },
],
}),
).resolves.toEqual(['n3', 'n4', 'n1', 'n2']);
// only n3 and n4 has spec.b, nulls (no match) always goes last no matter the order
await expect(
f({
order: [
{ field: 'spec.b', order: 'desc' },
{ field: 'metadata.name', order: 'asc' },
],
}),
).resolves.toEqual(['n4', 'n3', 'n1', 'n2']);
},
60_000,
);
});
describe('entitiesBatch', () => {
it.each(databases.eachSupportedId())(
'queries for entities by ref, including duplicates, and gracefully returns null for missing entities',
'queries for entities by ref, including duplicates, and gracefully returns null for missing entities, %p',
async databaseId => {
const { knex } = await createDatabase(databaseId);
@@ -571,12 +670,13 @@ describe('DefaultEntitiesCatalog', () => {
'k:default/two',
]);
},
60_000,
);
});
describe('removeEntityByUid', () => {
it.each(databases.eachSupportedId())(
'also clears parent hashes',
'also clears parent hashes, %p',
async databaseId => {
const { knex } = await createDatabase(databaseId);
@@ -659,12 +759,13 @@ describe('DefaultEntitiesCatalog', () => {
new Set(['k:default/unrelated1', 'k:default/unrelated2']),
);
},
60_000,
);
});
describe('facets', () => {
it.each(databases.eachSupportedId())(
'can filter and collect properly',
'can filter and collect properly, %p',
async databaseId => {
const { knex } = await createDatabase(databaseId);
@@ -697,10 +798,11 @@ describe('DefaultEntitiesCatalog', () => {
},
});
},
60_000,
);
it.each(databases.eachSupportedId())(
'can match on annotations and labels with dots in them',
'can match on annotations and labels with dots in them, %p',
async databaseId => {
const { knex } = await createDatabase(databaseId);
@@ -743,10 +845,11 @@ describe('DefaultEntitiesCatalog', () => {
},
});
},
60_000,
);
it.each(databases.eachSupportedId())(
'can match on strings in arrays',
'can match on strings in arrays, %p',
async databaseId => {
const { knex } = await createDatabase(databaseId);
@@ -784,6 +887,7 @@ describe('DefaultEntitiesCatalog', () => {
},
});
},
60_000,
);
});
});
@@ -97,7 +97,7 @@ function addCondition(
// make a lot of sense. However, it had abysmal performance on sqlite
// when datasets grew large, so we're using IN instead.
const matchQuery = db<DbSearchRow>('search')
.select(entityIdField)
.select('search.entity_id')
.where({ key: filter.key.toLowerCase() })
.andWhere(function keyFilter() {
if (filter.values) {
@@ -178,14 +178,48 @@ export class DefaultEntitiesCatalog implements EntitiesCatalog {
let entitiesQuery =
db<DbFinalEntitiesRow>('final_entities').select('final_entities.*');
request?.order?.forEach(({ field }, index) => {
const alias = `order_${index}`;
entitiesQuery = entitiesQuery.leftOuterJoin(
{ [alias]: 'search' },
function search(inner) {
inner
.on(`${alias}.entity_id`, 'final_entities.entity_id')
.andOn(`${alias}.key`, db.raw('?', [field]));
},
);
});
entitiesQuery = entitiesQuery.whereNotNull('final_entities.final_entity');
if (request?.filter) {
entitiesQuery = parseFilter(request.filter, entitiesQuery, db);
entitiesQuery = parseFilter(
request.filter,
entitiesQuery,
db,
false,
'final_entities.entity_id',
);
}
// TODO: move final_entities to use entity_ref
entitiesQuery = entitiesQuery
.whereNotNull('final_entities.final_entity')
.orderBy('entity_id', 'asc');
request?.order?.forEach(({ order }, index) => {
if (db.client.config.client === 'pg') {
// pg correctly orders by the column value and handling nulls in one go
entitiesQuery = entitiesQuery.orderBy([
{ column: `order_${index}.value`, order, nulls: 'last' },
]);
} else {
// sqlite and mysql translate the above statement ONLY into "order by (value is null) asc"
// no matter what the order is, for some reason, so we have to manually add back the statement
// that translates to "order by value <order>" while avoiding to give an order
entitiesQuery = entitiesQuery.orderBy([
{ column: `order_${index}.value`, order: undefined, nulls: 'last' },
{ column: `order_${index}.value`, order },
]);
}
});
entitiesQuery = entitiesQuery.orderBy('final_entities.entity_id', 'asc'); // stable sort
const { limit, offset } = parsePagination(request?.pagination);
if (limit !== undefined) {
@@ -41,6 +41,7 @@ import {
parseEntityTransformParams,
} from './request';
import { parseEntityFacetParams } from './request/parseEntityFacetParams';
import { parseEntityOrderParams } from './request/parseEntityOrderParams';
import { LocationService, RefreshOptions, RefreshService } from './types';
import {
disallowReadonlyMode,
@@ -113,6 +114,7 @@ export async function createRouter(
const { entities, pageInfo } = await entitiesCatalog.entities({
filter: parseEntityFilterParams(req.query),
fields: parseEntityTransformParams(req.query),
order: parseEntityOrderParams(req.query),
pagination: parseEntityPaginationParams(req.query),
authorizationToken: getBearerToken(req.header('authorization')),
});
@@ -0,0 +1,42 @@
/*
* 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 { parseEntityOrderParams } from './parseEntityOrderParams';
describe('parseEntityOrderParams', () => {
it('handles missing parameter', () => {
expect(parseEntityOrderParams({})).toBeUndefined();
});
it('handles parameters with various orders', () => {
expect(
parseEntityOrderParams({ order: ['asc:a', 'desc:b', 'asc:c:d'] }),
).toEqual([
{ field: 'a', order: 'asc' },
{ field: 'b', order: 'desc' },
{ field: 'c:d', order: 'asc' },
]);
});
it.each(['', ':', 'ascii:', 'ascii:ebcdic', ':colon'])(
'rejects missing/bad order or key, %p',
order => {
expect(() => parseEntityOrderParams({ order: [order] })).toThrow(
`Invalid order parameter "${order}", expected "<asc or desc>:<field name>"`,
);
},
);
});
@@ -0,0 +1,37 @@
/*
* 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 { InputError } from '@backstage/errors';
import { EntityOrder } from '../../catalog/types';
import { parseStringsParam } from './common';
export function parseEntityOrderParams(
params: Record<string, unknown>,
): EntityOrder[] | undefined {
return parseStringsParam(params.order, 'order')?.map(item => {
const match = item.match(/^(asc|desc):(.+)$/);
if (!match) {
throw new InputError(
`Invalid order parameter "${item}", expected "<asc or desc>:<field name>"`,
);
}
return {
order: match[1] as 'asc' | 'desc',
field: match[2],
};
});
}
+8
View File
@@ -1,5 +1,13 @@
# @internal/plugin-catalog-customized
## 0.0.6
### Patch Changes
- Updated dependencies
- @backstage/plugin-catalog@1.7.1
- @backstage/plugin-catalog-react@1.2.3
## 0.0.5
### Patch Changes
+8
View File
@@ -1,5 +1,13 @@
# @backstage/plugin-catalog-graph
## 0.2.25
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/plugin-catalog-react@1.2.3
## 0.2.24
### Patch Changes
+9
View File
@@ -1,5 +1,14 @@
# @backstage/plugin-catalog-import
## 0.9.3
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/integration-react@1.1.8
- @backstage/plugin-catalog-react@1.2.3
## 0.9.2
### Patch Changes
+7
View File
@@ -1,5 +1,12 @@
# @backstage/plugin-catalog-react
## 1.2.3
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
## 1.2.2
### Patch Changes
+10
View File
@@ -1,5 +1,15 @@
# @backstage/plugin-catalog
## 1.7.1
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/integration-react@1.1.8
- @backstage/plugin-catalog-react@1.2.3
- @backstage/plugin-search-react@1.3.1
## 1.7.0
### Minor Changes
@@ -1,5 +1,12 @@
# @backstage/plugin-cicd-statistics-module-gitlab
## 0.1.9
### Patch Changes
- Updated dependencies
- @backstage/plugin-cicd-statistics@0.1.15
## 0.1.8
### Patch Changes
+7
View File
@@ -1,5 +1,12 @@
# @backstage/plugin-cicd-statistics
## 0.1.15
### Patch Changes
- Updated dependencies
- @backstage/plugin-catalog-react@1.2.3
## 0.1.14
### Patch Changes
+8
View File
@@ -1,5 +1,13 @@
# @backstage/plugin-circleci
## 0.3.13
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/plugin-catalog-react@1.2.3
## 0.3.12
### Patch Changes
+8
View File
@@ -1,5 +1,13 @@
# @backstage/plugin-cloudbuild
## 0.3.13
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/plugin-catalog-react@1.2.3
## 0.3.12
### Patch Changes
+8
View File
@@ -1,5 +1,13 @@
# @backstage/plugin-code-climate
## 0.1.13
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/plugin-catalog-react@1.2.3
## 0.1.12
### Patch Changes
+8
View File
@@ -1,5 +1,13 @@
# @backstage/plugin-code-coverage
## 0.2.6
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/plugin-catalog-react@1.2.3
## 0.2.5
### Patch Changes
+7
View File
@@ -1,5 +1,12 @@
# @backstage/plugin-codescene
## 0.1.8
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
## 0.1.7
### Patch Changes
+7
View File
@@ -1,5 +1,12 @@
# @backstage/plugin-config-schema
## 0.1.36
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
## 0.1.35
### Patch Changes
+8
View File
@@ -1,5 +1,13 @@
# @backstage/plugin-cost-insights
## 0.12.2
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/plugin-catalog-react@1.2.3
## 0.12.1
### Patch Changes
+8
View File
@@ -1,5 +1,13 @@
# @backstage/plugin-dynatrace
## 1.0.3
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/plugin-catalog-react@1.2.3
## 1.0.2
### Patch Changes
+7
View File
@@ -1,5 +1,12 @@
# @internal/plugin-todo-list
## 1.0.9
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
## 1.0.8
### Patch Changes
+10
View File
@@ -1,5 +1,15 @@
# @backstage/plugin-explore
## 0.3.44
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/plugin-catalog-react@1.2.3
- @backstage/plugin-search-react@1.3.1
- @backstage/plugin-explore-react@0.0.24
## 0.3.43
### Patch Changes
+8
View File
@@ -1,5 +1,13 @@
# @backstage/plugin-firehydrant
## 0.1.30
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/plugin-catalog-react@1.2.3
## 0.1.29
### Patch Changes
+8
View File
@@ -1,5 +1,13 @@
# @backstage/plugin-fossa
## 0.2.45
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/plugin-catalog-react@1.2.3
## 0.2.44
### Patch Changes
+7
View File
@@ -1,5 +1,12 @@
# @backstage/plugin-gcalendar
## 0.3.9
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
## 0.3.8
### Patch Changes
+7
View File
@@ -1,5 +1,12 @@
# @backstage/plugin-gcp-projects
## 0.3.32
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
## 0.3.31
### Patch Changes
+7
View File
@@ -1,5 +1,12 @@
# @backstage/plugin-git-release-manager
## 0.3.26
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
## 0.3.25
### Patch Changes
+8
View File
@@ -1,5 +1,13 @@
# @backstage/plugin-github-actions
## 0.5.13
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/plugin-catalog-react@1.2.3
## 0.5.12
### Patch Changes
@@ -3,6 +3,7 @@
"name": "Build",
"node_id": "MDEyOldvcmtmbG93IFJ1bjI2OTI4OQ==",
"check_suite_id": 42,
"display_title": "foo",
"check_suite_node_id": "MDEwOkNoZWNrU3VpdGU0Mg==",
"head_branch": "main",
"head_sha": "acb5820ced9479c074f688cc328bf03f341a511d",
+9
View File
@@ -1,5 +1,14 @@
# @backstage/plugin-github-deployments
## 0.1.44
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/integration-react@1.1.8
- @backstage/plugin-catalog-react@1.2.3
## 0.1.43
### Patch Changes
+8
View File
@@ -1,5 +1,13 @@
# @backstage/plugin-github-issues
## 0.2.2
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/plugin-catalog-react@1.2.3
## 0.2.1
### Patch Changes
@@ -1,5 +1,13 @@
# @backstage/plugin-github-pull-requests-board
## 0.1.7
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/plugin-catalog-react@1.2.3
## 0.1.6
### Patch Changes
+7
View File
@@ -1,5 +1,12 @@
# @backstage/plugin-gitops-profiles
## 0.3.31
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
## 0.3.30
### Patch Changes
+8
View File
@@ -1,5 +1,13 @@
# @backstage/plugin-gocd
## 0.1.19
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/plugin-catalog-react@1.2.3
## 0.1.18
### Patch Changes
+7
View File
@@ -1,5 +1,12 @@
# @backstage/plugin-graphiql
## 0.2.45
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
## 0.2.44
### Patch Changes
+9
View File
@@ -1,5 +1,14 @@
# @backstage/plugin-home
## 0.4.29
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/plugin-catalog-react@1.2.3
- @backstage/plugin-stack-overflow@0.1.9
## 0.4.28
### Patch Changes
+8
View File
@@ -1,5 +1,13 @@
# @backstage/plugin-ilert
## 0.2.2
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/plugin-catalog-react@1.2.3
## 0.2.1
### Patch Changes
+8
View File
@@ -1,5 +1,13 @@
# @backstage/plugin-jenkins
## 0.7.12
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/plugin-catalog-react@1.2.3
## 0.7.11
### Patch Changes
+8
View File
@@ -1,5 +1,13 @@
# @backstage/plugin-kafka
## 0.3.13
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/plugin-catalog-react@1.2.3
## 0.3.12
### Patch Changes
+8
View File
@@ -1,5 +1,13 @@
# @backstage/plugin-kubernetes
## 0.7.6
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/plugin-catalog-react@1.2.3
## 0.7.5
### Patch Changes
+8
View File
@@ -1,5 +1,13 @@
# @backstage/plugin-lighthouse
## 0.3.13
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/plugin-catalog-react@1.2.3
## 0.3.12
### Patch Changes
+8
View File
@@ -1,5 +1,13 @@
# @backstage/plugin-newrelic-dashboard
## 0.2.6
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/plugin-catalog-react@1.2.3
## 0.2.5
### Patch Changes
+7
View File
@@ -1,5 +1,12 @@
# @backstage/plugin-newrelic
## 0.3.31
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
## 0.3.30
### Patch Changes
+8
View File
@@ -1,5 +1,13 @@
# @backstage/plugin-org-react
## 0.1.2
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/plugin-catalog-react@1.2.3
## 0.1.1
### Patch Changes
+8
View File
@@ -1,5 +1,13 @@
# @backstage/plugin-org
## 0.6.3
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/plugin-catalog-react@1.2.3
## 0.6.2
### Patch Changes
+8
View File
@@ -1,5 +1,13 @@
# @backstage/plugin-pagerduty
## 0.5.6
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/plugin-catalog-react@1.2.3
## 0.5.5
### Patch Changes
+8
View File
@@ -1,5 +1,13 @@
# @backstage/plugin-periskop
## 0.1.11
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/plugin-catalog-react@1.2.3
## 0.1.10
### Patch Changes
+9
View File
@@ -1,5 +1,14 @@
# @backstage/plugin-playlist
## 0.1.4
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/plugin-catalog-react@1.2.3
- @backstage/plugin-search-react@1.3.1
## 0.1.3
### Patch Changes
+8
View File
@@ -1,5 +1,13 @@
# @backstage/plugin-rollbar
## 0.4.13
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/plugin-catalog-react@1.2.3
## 0.4.12
### Patch Changes
+2 -2
View File
@@ -15,7 +15,7 @@
*/
import type { EntityMeta, UserEntity } from '@backstage/catalog-model';
import type { JsonValue, JsonObject } from '@backstage/types';
import type { JsonObject, JsonValue } from '@backstage/types';
/**
* Information about a template that is stored on a task specification.
@@ -51,7 +51,7 @@ export type TemplateInfo = {
*/
export interface TaskStep {
/**
* A unqiue identifier for this step.
* A unique identifier for this step.
*/
id: string;
/**
+9
View File
@@ -1,5 +1,14 @@
# @backstage/plugin-scaffolder
## 1.9.1
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
- @backstage/integration-react@1.1.8
- @backstage/plugin-catalog-react@1.2.3
## 1.9.0
### Minor Changes
+1 -1
View File
@@ -59,7 +59,7 @@
"@rjsf/material-ui": "^3.2.1",
"@rjsf/material-ui-v5": "npm:@rjsf/material-ui@^5.0.0-beta.14",
"@rjsf/utils": "^5.0.0-beta.14",
"@rjsf/validator-ajv8": "^5.0.0-beta.14",
"@rjsf/validator-ajv6": "^5.0.0-beta.14",
"@types/json-schema": "^7.0.9",
"@uiw/react-codemirror": "^4.9.3",
"classnames": "^2.2.6",
@@ -34,7 +34,7 @@ import { TemplateParameterSchema } from '../../../types';
import { createAsyncValidators } from './createAsyncValidators';
import { useTemplateSchema } from './useTemplateSchema';
import { ReviewState } from './ReviewState';
import validator from '@rjsf/validator-ajv8';
import validator from '@rjsf/validator-ajv6';
import { selectedTemplateRouteRef } from '../../../routes';
import { getDefaultFormState } from '@rjsf/utils';
import { useFormData } from './useFormData';
@@ -14,8 +14,6 @@
* limitations under the License.
*/
import { awsGetCredentials, createAWSConnection } from 'aws-os-connection';
import { Config } from '@backstage/config';
import {
IndexableDocument,
IndexableResult,
@@ -23,15 +21,18 @@ import {
SearchEngine,
SearchQuery,
} from '@backstage/plugin-search-common';
import { awsGetCredentials, createAWSConnection } from 'aws-os-connection';
import { isEmpty, isNumber, isNaN as nan } from 'lodash';
import { Config } from '@backstage/config';
import { ElasticSearchClientOptions } from './ElasticSearchClientOptions';
import { ElasticSearchClientWrapper } from './ElasticSearchClientWrapper';
import { ElasticSearchCustomIndexTemplate } from './types';
import { ElasticSearchSearchEngineIndexer } from './ElasticSearchSearchEngineIndexer';
import { Logger } from 'winston';
import { MissingIndexError } from '@backstage/plugin-search-backend-node';
import esb from 'elastic-builder';
import { isEmpty, isNaN as nan, isNumber } from 'lodash';
import { v4 as uuid } from 'uuid';
import { Logger } from 'winston';
import { ElasticSearchClientOptions } from './ElasticSearchClientOptions';
import { ElasticSearchSearchEngineIndexer } from './ElasticSearchSearchEngineIndexer';
import { ElasticSearchCustomIndexTemplate } from './types';
import { ElasticSearchClientWrapper } from './ElasticSearchClientWrapper';
export type { ElasticSearchClientOptions };
@@ -63,7 +64,7 @@ export type ElasticSearchQueryTranslator = (
) => ElasticSearchConcreteQuery;
/**
* Options for instansiate ElasticSearchSearchEngine
* Options for instantiate ElasticSearchSearchEngine
* @public
*/
export type ElasticSearchOptions = {
@@ -15,13 +15,13 @@
*/
import { BatchSearchEngineIndexer } from '@backstage/plugin-search-backend-node';
import { IndexableDocument } from '@backstage/plugin-search-common';
import { Readable } from 'stream';
import { Logger } from 'winston';
import { ElasticSearchClientWrapper } from './ElasticSearchClientWrapper';
import { IndexableDocument } from '@backstage/plugin-search-common';
import { Logger } from 'winston';
import { Readable } from 'stream';
/**
* Options for instansiate ElasticSearchSearchEngineIndexer
* Options for instantiate ElasticSearchSearchEngineIndexer
* @public
*/
export type ElasticSearchSearchEngineIndexerOptions = {
@@ -14,16 +14,16 @@
* limitations under the License.
*/
import { UrlReader } from '@backstage/backend-common';
import { Config } from '@backstage/config';
import { Permission } from '@backstage/plugin-permission-common';
import { DocumentCollatorFactory } from '@backstage/plugin-search-common';
import { parse as parseNdjson } from 'ndjson';
import { Readable } from 'stream';
import { Logger } from 'winston';
import { Permission } from '@backstage/plugin-permission-common';
import { Readable } from 'stream';
import { UrlReader } from '@backstage/backend-common';
import { parse as parseNdjson } from 'ndjson';
/**
* Options for instansiate NewlineDelimitedJsonCollatorFactory
* Options for instantiate NewlineDelimitedJsonCollatorFactory
* @public
*/
export type NewlineDelimitedJsonCollatorFactoryOptions = {
+7
View File
@@ -1,5 +1,12 @@
# @backstage/plugin-search-react
## 1.3.1
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.2
## 1.3.0
### Minor Changes

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