search: move DocumentTypeInfo to search-common
Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
This commit is contained in:
@@ -5,22 +5,15 @@
|
||||
```ts
|
||||
import { DocumentCollator } from '@backstage/search-common';
|
||||
import { DocumentDecorator } from '@backstage/search-common';
|
||||
import { DocumentTypeInfo } from '@backstage/search-common';
|
||||
import { IndexableDocument } from '@backstage/search-common';
|
||||
import { Logger as Logger_2 } from 'winston';
|
||||
import { default as lunr_2 } from 'lunr';
|
||||
import { Permission } from '@backstage/plugin-permission-common';
|
||||
import { QueryTranslator } from '@backstage/search-common';
|
||||
import { SearchEngine } from '@backstage/search-common';
|
||||
import { SearchQuery } from '@backstage/search-common';
|
||||
import { SearchResultSet } from '@backstage/search-common';
|
||||
|
||||
// Warning: (ae-missing-release-tag) "DocumentTypeInfo" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export type DocumentTypeInfo = {
|
||||
visibilityPermission?: Permission;
|
||||
};
|
||||
|
||||
// Warning: (ae-missing-release-tag) "IndexBuilder" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
"clean": "backstage-cli clean"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/plugin-permission-common": "^0.4.0-next.0",
|
||||
"@backstage/search-common": "^0.2.1",
|
||||
"winston": "^3.2.1",
|
||||
"lunr": "^2.3.9",
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Permission } from '@backstage/plugin-permission-common';
|
||||
import {
|
||||
DocumentCollator,
|
||||
DocumentDecorator,
|
||||
DocumentTypeInfo,
|
||||
IndexableDocument,
|
||||
SearchEngine,
|
||||
} from '@backstage/search-common';
|
||||
@@ -38,14 +38,6 @@ type IndexBuilderOptions = {
|
||||
logger: Logger;
|
||||
};
|
||||
|
||||
export type DocumentTypeInfo = {
|
||||
/**
|
||||
* The {@link @backstage/plugin-permission-common#Permission} that controls
|
||||
* visibility of resources associated with this collator's documents.
|
||||
*/
|
||||
visibilityPermission?: Permission;
|
||||
};
|
||||
|
||||
export class IndexBuilder {
|
||||
private collators: Record<string, CollatorEnvelope>;
|
||||
private decorators: Record<string, DocumentDecorator[]>;
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
*/
|
||||
|
||||
export { IndexBuilder } from './IndexBuilder';
|
||||
export type { DocumentTypeInfo } from './IndexBuilder';
|
||||
export { Scheduler } from './Scheduler';
|
||||
export { LunrSearchEngine } from './engines';
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
```ts
|
||||
import { Config } from '@backstage/config';
|
||||
import { DocumentTypeInfo } from '@backstage/plugin-search-backend-node';
|
||||
import { DocumentTypeInfo } from '@backstage/search-common';
|
||||
import express from 'express';
|
||||
import { Logger as Logger_2 } from 'winston';
|
||||
import { PermissionAuthorizer } from '@backstage/plugin-permission-common';
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
"@backstage/backend-common": "^0.10.4",
|
||||
"@backstage/config": "^0.1.13",
|
||||
"@backstage/errors": "^0.2.0",
|
||||
"@backstage/search-common": "^0.2.0",
|
||||
"@backstage/search-common": "^0.2.1",
|
||||
"@backstage/plugin-auth-backend": "^0.7.0-next.0",
|
||||
"@backstage/plugin-permission-common": "^0.4.0-next.0",
|
||||
"@backstage/plugin-permission-node": "^0.4.0-next.0",
|
||||
|
||||
@@ -23,6 +23,7 @@ import {
|
||||
PermissionAuthorizer,
|
||||
} from '@backstage/plugin-permission-common';
|
||||
import {
|
||||
DocumentTypeInfo,
|
||||
IndexableDocument,
|
||||
QueryRequestOptions,
|
||||
QueryTranslator,
|
||||
@@ -31,7 +32,6 @@ import {
|
||||
SearchResult,
|
||||
SearchResultSet,
|
||||
} from '@backstage/search-common';
|
||||
import { DocumentTypeInfo } from '@backstage/plugin-search-backend-node';
|
||||
import { Config } from '@backstage/config';
|
||||
|
||||
export function decodePageCursor(pageCursor?: string): { page: number } {
|
||||
|
||||
@@ -24,11 +24,8 @@ import { Config } from '@backstage/config';
|
||||
import { JsonObject, JsonValue } from '@backstage/types';
|
||||
import { IdentityClient } from '@backstage/plugin-auth-backend';
|
||||
import { PermissionAuthorizer } from '@backstage/plugin-permission-common';
|
||||
import { SearchResultSet } from '@backstage/search-common';
|
||||
import {
|
||||
DocumentTypeInfo,
|
||||
SearchEngine,
|
||||
} from '@backstage/plugin-search-backend-node';
|
||||
import { DocumentTypeInfo, SearchResultSet } from '@backstage/search-common';
|
||||
import { SearchEngine } from '@backstage/plugin-search-backend-node';
|
||||
import { AuthorizedSearchEngine } from './AuthorizedSearchEngine';
|
||||
|
||||
const jsonObjectSchema: z.ZodSchema<JsonObject> = z.lazy(() => {
|
||||
|
||||
Reference in New Issue
Block a user