Skip to main content
Glama
publish-check.js•1.55 kB
#!/usr/bin/env node import { execSync } from 'child_process'; import { existsSync } from 'fs'; import { readFileSync } from 'fs'; console.log('šŸ” Running pre-publish checks...\n'); // Check if build directory exists if (!existsSync('build')) { console.error('āŒ Build directory not found. Run "npm run build" first.'); process.exit(1); } // Check if main entry point exists if (!existsSync('build/index.js')) { console.error('āŒ Main entry point build/index.js not found.'); process.exit(1); } // Check if package.json is valid try { const pkg = JSON.parse(readFileSync('package.json', 'utf8')); if (!pkg.name || !pkg.version || !pkg.description) { console.error('āŒ package.json is missing required fields (name, version, description).'); process.exit(1); } if (pkg.private === true) { console.error('āŒ Package is marked as private. Set "private": false to publish.'); process.exit(1); } console.log(`āœ… Package: ${pkg.name}@${pkg.version}`); console.log(`āœ… Description: ${pkg.description}`); } catch (error) { console.error('āŒ Invalid package.json:', error.message); process.exit(1); } // Check if README exists if (!existsSync('README.md')) { console.error('āŒ README.md not found.'); process.exit(1); } // Check if LICENSE exists if (!existsSync('LICENSE')) { console.error('āŒ LICENSE file not found.'); process.exit(1); } console.log('\nāœ… All pre-publish checks passed!'); console.log('\nšŸ“¦ Ready to publish. Run:'); console.log(' npm publish --access public');

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/mingdaocloud/hap-mcp'

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