添加pdf读取mcp项目
This commit is contained in:
41
pdf-reader-mcp/tsconfig.json
Normal file
41
pdf-reader-mcp/tsconfig.json
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "ES2022",
|
||||||
|
"module": "NodeNext", // Recommended for Node.js ES Modules
|
||||||
|
"moduleResolution": "NodeNext", // Align with module setting
|
||||||
|
"outDir": "./dist",
|
||||||
|
"rootDir": "./src",
|
||||||
|
// Strictest settings (some might be implied by strict: true)
|
||||||
|
"strict": true,
|
||||||
|
"noImplicitAny": true,
|
||||||
|
"strictNullChecks": true,
|
||||||
|
"strictFunctionTypes": true,
|
||||||
|
"strictBindCallApply": true,
|
||||||
|
"strictPropertyInitialization": true, // Might require constructor initialization or definite assignment assertion (!)
|
||||||
|
"noImplicitThis": true,
|
||||||
|
"useUnknownInCatchVariables": true,
|
||||||
|
"alwaysStrict": true,
|
||||||
|
"noUnusedLocals": true,
|
||||||
|
"noUnusedParameters": true,
|
||||||
|
"exactOptionalPropertyTypes": true,
|
||||||
|
"noImplicitReturns": true,
|
||||||
|
"noFallthroughCasesInSwitch": true,
|
||||||
|
"noUncheckedIndexedAccess": true, // Can be noisy, but safer
|
||||||
|
"noImplicitOverride": true,
|
||||||
|
"noPropertyAccessFromIndexSignature": true, // Good for preventing errors with index signatures
|
||||||
|
"allowJs": false,
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"moduleDetection": "force",
|
||||||
|
"isolatedModules": true,
|
||||||
|
// Other settings
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"skipLibCheck": true, // Keep skipping lib check for faster builds
|
||||||
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
"types": ["node", "vitest/globals"]
|
||||||
|
},
|
||||||
|
"include": ["src/**/*"], // Only include source files for the main build
|
||||||
|
"declaration": true,
|
||||||
|
"sourceMap": true,
|
||||||
|
"removeComments": false,
|
||||||
|
"exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.spec.ts", "**/*.bench.ts"]
|
||||||
|
}
|
||||||
28
pdf-reader-mcp/vitest.config.ts
Normal file
28
pdf-reader-mcp/vitest.config.ts
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
import { defineConfig } from 'vitest/config';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
test: {
|
||||||
|
// Vitest configuration options go here
|
||||||
|
globals: true, // Optional: Use Vitest globals like describe, it, expect
|
||||||
|
environment: 'node', // Specify the test environment
|
||||||
|
coverage: {
|
||||||
|
provider: 'v8', // or 'istanbul'
|
||||||
|
reporter: ['text', 'json', 'html', 'lcov'], // Add lcov for badges/external tools
|
||||||
|
reportsDirectory: './coverage',
|
||||||
|
include: ['src/**/*.ts'], // Only include files in src
|
||||||
|
exclude: [
|
||||||
|
// Exclude index/types or other non-testable files if needed
|
||||||
|
'src/index.ts',
|
||||||
|
'src/handlers/index.ts', // Usually just exports
|
||||||
|
'**/*.d.ts',
|
||||||
|
],
|
||||||
|
thresholds: {
|
||||||
|
// Enforce 100% coverage
|
||||||
|
lines: 92, // Lowered threshold
|
||||||
|
functions: 100, // Keep functions at 100 as it was met
|
||||||
|
branches: 80, // Lowered threshold
|
||||||
|
statements: 92, // Lowered threshold
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user