chore: switch to module ESNext + moduleResolution bundler (#2095)
This commit is contained in:
parent
c59dc3aa1a
commit
ee732d64b6
4 changed files with 668 additions and 863 deletions
|
|
@ -26,10 +26,7 @@
|
|||
"lint:fix": "eslint src/ --fix && prettier --ignore-path ../../.prettierignore --write .",
|
||||
"check": "pnpm run typecheck && pnpm run lint",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
"start": "pnpm run server",
|
||||
"server": "tsx watch --clear-screen=false scripts/cli.ts server",
|
||||
"client": "tsx scripts/cli.ts client"
|
||||
"test:watch": "vitest"
|
||||
},
|
||||
"dependencies": {
|
||||
"@modelcontextprotocol/core": "workspace:^",
|
||||
|
|
@ -54,7 +51,6 @@
|
|||
"eslint-config-prettier": "catalog:devTools",
|
||||
"eslint-plugin-n": "catalog:devTools",
|
||||
"prettier": "catalog:devTools",
|
||||
"tsx": "catalog:devTools",
|
||||
"typescript": "catalog:devTools",
|
||||
"typescript-eslint": "catalog:devTools",
|
||||
"vitest": "catalog:devTools"
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ import cors from 'cors';
|
|||
import type { Request, Response as ExpressResponse, Router } from 'express';
|
||||
import express from 'express';
|
||||
|
||||
import type { DemoAuth } from './auth.js';
|
||||
import { createDemoAuth, DEMO_USER_CREDENTIALS } from './auth.js';
|
||||
import type { DemoAuth } from './auth';
|
||||
import { createDemoAuth, DEMO_USER_CREDENTIALS } from './auth';
|
||||
|
||||
export interface SetupAuthServerOptions {
|
||||
authServerUrl: URL;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Auth configuration
|
||||
export type { CreateDemoAuthOptions, DemoAuth } from './auth.js';
|
||||
export { createDemoAuth } from './auth.js';
|
||||
export type { CreateDemoAuthOptions, DemoAuth } from './auth';
|
||||
export { createDemoAuth } from './auth';
|
||||
|
||||
// Auth server setup + demo token verifier (pass to `requireBearerAuth` from @modelcontextprotocol/express)
|
||||
export type { SetupAuthServerOptions } from './authServer.js';
|
||||
export { createProtectedResourceMetadataRouter, demoTokenVerifier, getAuth, setupAuthServer } from './authServer.js';
|
||||
export type { SetupAuthServerOptions } from './authServer';
|
||||
export { createProtectedResourceMetadataRouter, demoTokenVerifier, getAuth, setupAuthServer } from './authServer';
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import type { CreateDemoAuthOptions } from '../src/auth.js';
|
||||
import { createDemoAuth } from '../src/auth.js';
|
||||
import type { CreateDemoAuthOptions } from '../src/auth';
|
||||
import { createDemoAuth } from '../src/auth';
|
||||
|
||||
describe('createDemoAuth', () => {
|
||||
const validOptions: CreateDemoAuthOptions = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue