Skip to main content
Glama
verify-npm-setup.jsโ€ข2.26 kB
#!/usr/bin/env node /** * NPM Publish Verification Script * Run this to check if everything is ready for publishing */ import { execSync } from 'child_process'; import { readFileSync } from 'fs'; console.log('๐Ÿ” NPM Publish Verification\n'); // Check package.json console.log('๐Ÿ“ฆ Package Information:'); try { const pkg = JSON.parse(readFileSync('./package.json', 'utf8')); console.log(` Name: ${pkg.name}`); console.log(` Version: ${pkg.version}`); console.log(` License: ${pkg.license}`); console.log(''); } catch (error) { console.error('โŒ Could not read package.json'); process.exit(1); } // Check npm login console.log('๐Ÿ‘ค NPM Authentication:'); try { const user = execSync('npm whoami', { encoding: 'utf8' }).trim(); console.log(` โœ… Logged in as: ${user}`); } catch (error) { console.log(' โŒ Not logged in to npm'); console.log(' Run: npm login'); } console.log(''); // Check if package exists console.log('๐Ÿ” Package Registry Check:'); try { execSync('npm view context-continue-mcp', { encoding: 'utf8' }); console.log(' โš ๏ธ Package already exists on npm'); } catch (error) { if (error.message.includes('404')) { console.log(' โœ… Package name available'); } else { console.log(' โŒ Registry check failed'); } } console.log(''); // Check build console.log('๐Ÿ”จ Build Check:'); try { console.log(' Building project...'); execSync('npm run build', { stdio: 'ignore' }); console.log(' โœ… Build successful'); } catch (error) { console.log(' โŒ Build failed'); console.log(' Run: npm run build'); } console.log(''); // Test publish (dry run) console.log('๐Ÿงช Publish Test (Dry Run):'); try { const output = execSync('npm publish --dry-run', { encoding: 'utf8' }); console.log(' โœ… Dry run successful'); console.log(' Ready to publish!'); } catch (error) { console.log(' โŒ Dry run failed'); console.log(' Check the error above'); } console.log(''); console.log('๐Ÿš€ Next Steps:'); console.log(' 1. Fix any issues shown above'); console.log(' 2. Ensure NPM_TOKEN is in GitHub Secrets'); console.log(' 3. Run "Simple NPM Publish" workflow with dry_run=true'); console.log(' 4. If successful, run again with dry_run=false');

Latest Blog Posts

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/core3-coder/context-continue-mcp'

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