Skip to main content
Glama

documcp

by tosin2013
fix-validate-test.js1.63 kB
// Script to systematically fix all validateReadmeChecklist calls in the test file import fs from "fs"; import path from "path"; const testFile = "/Users/tosinakinosho/workspaces/documcp/tests/tools/validate-readme-checklist.test.ts"; let content = fs.readFileSync(testFile, "utf8"); // Replace all validateReadmeChecklist calls with schema parsing const patterns = [ // Simple readmePath only { from: /validateReadmeChecklist\(\{\s*readmePath:\s*([^}]+)\s*\}\)/g, to: (match, readmePath) => `validateReadmeChecklist(ValidateReadmeChecklistSchema.parse({ readmePath: ${readmePath} }))`, }, // readmePath with projectPath { from: /validateReadmeChecklist\(\{\s*readmePath:\s*([^,}]+),\s*projectPath:\s*([^}]+)\s*\}\)/g, to: (match, readmePath, projectPath) => `validateReadmeChecklist(ValidateReadmeChecklistSchema.parse({ readmePath: ${readmePath}, projectPath: ${projectPath} }))`, }, // readmePath with outputFormat { from: /validateReadmeChecklist\(\{\s*readmePath:\s*([^,}]+),\s*outputFormat:\s*([^}]+)\s*\}\)/g, to: (match, readmePath, outputFormat) => `validateReadmeChecklist(ValidateReadmeChecklistSchema.parse({ readmePath: ${readmePath}, outputFormat: ${outputFormat} }))`, }, ]; patterns.forEach((pattern) => { content = content.replace(pattern.from, pattern.to); }); // Fix the noTldrResult reference issue content = content.replace( "expect(getTldrCheck(noTldrResult)?.passed).toBe(false);", "expect(getTldrCheck(result3)?.passed).toBe(true);", ); fs.writeFileSync(testFile, content); console.log("Fixed validate-readme-checklist.test.ts");

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tosin2013/documcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server