Skip to content

Commit

Permalink
fix api-report error
Browse files Browse the repository at this point in the history
Signed-off-by: Stephanie <[email protected]>
  • Loading branch information
yangcao77 committed Nov 18, 2024
1 parent d12338c commit b11216d
Show file tree
Hide file tree
Showing 11 changed files with 84 additions and 5 deletions.
4 changes: 2 additions & 2 deletions workspaces/lightspeed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"tsc": "tsc",
"tsc:full": "tsc --skipLibCheck true --incremental false",
"build:all": "backstage-cli repo build --all",
"build:api-reports": "yarn build:api-reports:only --tsc",
"build:api-reports:only": "backstage-repo-tools api-reports -o ae-wrong-input-file-type --validate-release-tags",
"build:api-reports": "yarn build:api-reports:only",
"build:api-reports:only": "backstage-repo-tools api-reports -o ae-wrong-input-file-type,ae-undocumented --validate-release-tags",
"clean": "backstage-cli repo clean",
"test": "backstage-cli repo test",
"test:all": "backstage-cli repo test --coverage",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@ianvs/prettier-plugin-sort-imports": "^4.4.0",
"@langchain/core": "^0.2.30",
"@langchain/openai": "^0.2.8",
"express": "^4.18.2",
"express": "^4.21.1",
"http-proxy-middleware": "^3.0.2"
},
"devDependencies": {
Expand Down
31 changes: 31 additions & 0 deletions workspaces/lightspeed/plugins/lightspeed-backend/report.api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## API Report File for "@red-hat-developer-hub/backstage-plugin-lightspeed-backend"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts

import { BackendFeature } from '@backstage/backend-plugin-api';
import type { Config } from '@backstage/config';
import express from 'express';
import type { HttpAuthService } from '@backstage/backend-plugin-api';
import type { LoggerService } from '@backstage/backend-plugin-api';
import type { UserInfoService } from '@backstage/backend-plugin-api';

// @public
export function createRouter(options: RouterOptions): Promise<express.Router>;

// @public
const lightspeedPlugin: BackendFeature;
export default lightspeedPlugin;

// @public
export type RouterOptions = {
logger: LoggerService;
config: Config;
httpAuth: HttpAuthService;
userInfo: UserInfoService;
};

// (No @packageDocumentation comment for this package)

```
2 changes: 2 additions & 0 deletions workspaces/lightspeed/plugins/lightspeed-backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@

export { lightspeedPlugin as default } from './plugin';
export * from './service/router';

export type { RouterOptions } from './service/types';
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
import { createRouter } from './service/router';

/**
* @public
* The lightspeed backend plugin.
*/
export const lightspeedPlugin = createBackendPlugin({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ import {
validateLoadHistoryRequest,
} from './validation';

/**
* @public
* The lightspeed backend router
*/
export async function createRouter(
options: RouterOptions,
): Promise<express.Router> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ import type {
} from '@backstage/backend-plugin-api';
import type { Config } from '@backstage/config';

/**
* @public
* The lightspeed backend router options
*/
export type RouterOptions = {
logger: LoggerService;
config: Config;
Expand Down
25 changes: 25 additions & 0 deletions workspaces/lightspeed/plugins/lightspeed/report.api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## API Report File for "@red-hat-developer-hub/backstage-plugin-lightspeed"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts

import { BackstagePlugin } from '@backstage/core-plugin-api';
import { JSX as JSX_2 } from 'react';
import * as React_2 from 'react';
import { RouteRef } from '@backstage/core-plugin-api';

// @public
export const LightspeedIcon: () => React_2.JSX.Element;

// @public
export const LightspeedPage: () => JSX_2.Element;

// @public
export const lightspeedPlugin: BackstagePlugin< {
root: RouteRef<undefined>;
}, {}, {}>;

// (No @packageDocumentation comment for this package)

```
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ import * as React from 'react';

import logo from '../images/logo.svg';

/**
* @public
* Lightspeed Icon
*/
export const LightspeedIcon = () => {
return (
<img src={logo as any} alt="lightspeed icon" style={{ height: '25px' }} />
Expand Down
8 changes: 8 additions & 0 deletions workspaces/lightspeed/plugins/lightspeed/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ import { lightspeedApiRef } from './api/api';
import { LightspeedApiClient } from './api/LightspeedApiClient';
import { rootRouteRef } from './routes';

/**
* Lightspeed Plugin
* @public
*/
export const lightspeedPlugin = createPlugin({
id: 'lightspeed',
routes: {
Expand All @@ -46,6 +50,10 @@ export const lightspeedPlugin = createPlugin({
],
});

/**
* Lightspeed Page
* @public
*/
export const LightspeedPage = lightspeedPlugin.provide(
createRoutableExtension({
name: 'LightspeedPage',
Expand Down
4 changes: 2 additions & 2 deletions workspaces/lightspeed/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6549,7 +6549,7 @@ __metadata:
"@spotify/prettier-config": ^15.0.0
"@types/express": 4.17.21
"@types/supertest": 2.0.16
express: ^4.18.2
express: ^4.21.1
http-proxy-middleware: ^3.0.2
msw: 2.4.0
prettier: 3.3.3
Expand Down Expand Up @@ -14309,7 +14309,7 @@ __metadata:
languageName: node
linkType: hard

"express@npm:^4.17.1, express@npm:^4.18.2, express@npm:^4.19.2":
"express@npm:^4.17.1, express@npm:^4.19.2, express@npm:^4.21.1":
version: 4.21.1
resolution: "express@npm:4.21.1"
dependencies:
Expand Down

0 comments on commit b11216d

Please sign in to comment.