update api report & intial package versions

Signed-off-by: Andrew Thauer <athauer@wealthsimple.com>
This commit is contained in:
Andrew Thauer
2022-11-04 05:56:56 -04:00
parent 4dec6f16be
commit 3eaa4bdfbc
12 changed files with 62 additions and 40 deletions
+15 -16
View File
@@ -16,36 +16,29 @@ import { Logger } from 'winston';
import { PluginEndpointDiscovery } from '@backstage/backend-common';
import { Readable } from 'stream';
// Warning: (ae-forgotten-export) The symbol "RouterOptions" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "createRouter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function createRouter(options: RouterOptions): Promise<express.Router>;
// @public (undocumented)
export interface ExploreToolProvider {
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@backstage/plugin-explore-backend" does not have an export "GetExploreToolsRequest"
// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@backstage/plugin-explore-backend" does not have an export "GetExploreToolsResponse"
getTools(request: GetExploreToolsRequest): Promise<GetExploreToolsResponse>;
}
// Warning: (tsdoc-undefined-tag) The TSDoc tag "@private" is not defined in this configuration
// Warning: (ae-missing-release-tag) "getExampleTools" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface RouterOptions {
// (undocumented)
logger: Logger;
// (undocumented)
toolProvider: ExploreToolProvider;
}
// @public
export function getExampleTools(
request: GetExploreToolsRequest,
): Promise<GetExploreToolsResponse>;
export interface ToolDocument extends IndexableDocument, ExploreTool {}
// @public
export class ToolDocumentCollatorFactory implements DocumentCollatorFactory {
// Warning: (ae-forgotten-export) The symbol "ToolDocument" needs to be exported by the entry point index.d.ts
//
// (undocumented)
execute(): AsyncGenerator<ToolDocument>;
// Warning: (ae-forgotten-export) The symbol "ToolDocumentCollatorFactoryOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
static fromConfig(
_config: Config,
@@ -56,4 +49,10 @@ export class ToolDocumentCollatorFactory implements DocumentCollatorFactory {
// (undocumented)
readonly type: string;
}
// @public
export type ToolDocumentCollatorFactoryOptions = {
discovery: PluginEndpointDiscovery;
logger: Logger;
};
```
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/plugin-explore-backend",
"version": "0.1.0",
"version": "0.0.0",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
+2 -3
View File
@@ -21,10 +21,9 @@
*/
export * from './search';
export { createRouter } from './service/router';
export * from './service/types';
export * from './service';
/**
* @private Example only - do not use in production
* @internal Example only - do not use in production
*/
export { getExampleTools } from './example/getExampleTools';
@@ -14,16 +14,16 @@
* limitations under the License.
*/
import {
IndexableDocument,
DocumentCollatorFactory,
} from '@backstage/plugin-search-common';
import { PluginEndpointDiscovery } from '@backstage/backend-common';
import { Config } from '@backstage/config';
import { ExploreTool } from '@backstage/plugin-explore-common';
import {
DocumentCollatorFactory,
IndexableDocument,
} from '@backstage/plugin-search-common';
import fetch from 'node-fetch';
import { Readable } from 'stream';
import { Logger } from 'winston';
import { ExploreTool } from '@backstage/plugin-explore-common';
import fetch from 'node-fetch';
import { PluginEndpointDiscovery } from '@backstage/backend-common';
/**
* Extended IndexableDocument with explore tool specific properties
@@ -33,9 +33,11 @@ import { PluginEndpointDiscovery } from '@backstage/backend-common';
export interface ToolDocument extends IndexableDocument, ExploreTool {}
/**
* The options for the {@link CatalogClient.ToolDocumentCollatorFactory}.
* The options for the {@link ToolDocumentCollatorFactory}.
*
* @public
*/
type ToolDocumentCollatorFactoryOptions = {
export type ToolDocumentCollatorFactoryOptions = {
discovery: PluginEndpointDiscovery;
logger: Logger;
};
@@ -15,3 +15,7 @@
*/
export { ToolDocumentCollatorFactory } from './ToolDocumentCollatorFactory';
export type {
ToolDocument,
ToolDocumentCollatorFactoryOptions,
} from './ToolDocumentCollatorFactory';
@@ -0,0 +1,19 @@
/*
* Copyright 2022 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 { createRouter } from './router';
export type { RouterOptions } from './router';
export * from './types';
@@ -21,11 +21,17 @@ import Router from 'express-promise-router';
import { Logger } from 'winston';
import { ExploreToolProvider } from './types';
/**
* @public
*/
export interface RouterOptions {
logger: Logger;
toolProvider: ExploreToolProvider;
}
/**
* @public
*/
export async function createRouter(
options: RouterOptions,
): Promise<express.Router> {
+2 -2
View File
@@ -26,8 +26,8 @@ export interface ExploreToolProvider {
/**
* Gets a list of explore tools filtered by the request options.
*
* @param request The request options {@link GetExploreToolsRequest}.
* @returns The response {@link GetExploreToolsResponse}.
* @param request - The request options {@link @backstage/plugin-explore-common#GetExploreToolsRequest}.
* @returns The response {@link @backstage/plugin-explore-common#GetExploreToolsResponse}.
*/
getTools(request: GetExploreToolsRequest): Promise<GetExploreToolsResponse>;
}
+1 -1
View File
@@ -1,3 +1,3 @@
# explore-common
Shared types for the `explore*` plugins.
Shared types for the `explore` plugin.
-6
View File
@@ -28,10 +28,4 @@ export type GetExploreToolsRequest = {
export type GetExploreToolsResponse = {
tools: ExploreTool[];
};
// Warnings were encountered during analysis:
//
// src/index.d.ts:2:1 - (ae-misplaced-package-tag) The @packageDocumentation comment must appear at the top of entry point *.d.ts file
// (No @packageDocumentation comment for this package)
```
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/plugin-explore-common",
"description": "Common functionalities for the explore plugin",
"version": "0.1.0",
"version": "0.0.0",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
-1
View File
@@ -14,7 +14,6 @@
* limitations under the License.
*/
/***/
/**
* Common functionalities for the explore plugin.
*