chore: update api reports and fix some code review comments

Signed-off-by: benjdlambert <ben@blam.sh>
This commit is contained in:
benjdlambert
2025-06-17 09:22:16 +02:00
parent 974d1ddebc
commit 398f9e9245
4 changed files with 20 additions and 5 deletions
+13
View File
@@ -0,0 +1,13 @@
## API Report File for "@backstage/plugin-mcp-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';
// @public
const mcpPlugin: BackendFeature;
export default mcpPlugin;
// (No @packageDocumentation comment for this package)
```
+1 -1
View File
@@ -13,4 +13,4 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { mcpPlugin } from './plugin';
export { mcpPlugin as default } from './plugin';
@@ -13,7 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import Router from 'express-promise-router';
import PromiseRouter from 'express-promise-router';
import { Router } from 'express';
import { McpService } from '../services/McpService';
import { SSEServerTransport } from '@modelcontextprotocol/sdk/server/sse.js';
import { HttpAuthService } from '@backstage/backend-plugin-api';
@@ -27,8 +28,8 @@ export const createSseRouter = ({
}: {
mcpService: McpService;
httpAuth: HttpAuthService;
}) => {
const router = Router();
}): Router => {
const router = PromiseRouter();
const transportsToSessionId = new Map<string, SSEServerTransport>();
router.get('/', async (req, res) => {
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import PromiseRouter from 'express-promise-router';
import { Router } from 'express';
import { McpService } from '../services/McpService';
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
@@ -28,7 +29,7 @@ export const createStreamableRouter = ({
logger: LoggerService;
httpAuth: HttpAuthService;
}): Router => {
const router = Router();
const router = PromiseRouter();
router.post('/', async (req, res) => {
try {