Skip to main content
Glama

Frontend Test Generation & Code Review MCP Server

fingerprint.ts975 B
import { createHash } from 'node:crypto'; /** * 生成稳定指纹(SHA256 hash) */ export function generateFingerprint(...parts: (string | number)[]): string { const combined = parts.map(p => String(p)).join('|'); return createHash('sha256').update(combined).digest('hex').substring(0, 16); } /** * 生成问题的稳定指纹 */ export function generateIssueFingerprint( file: string, lineRange: [number, number], category: string, messageSummary: string ): string { return generateFingerprint(file, lineRange[0], lineRange[1], category, messageSummary); } /** * 生成测试的稳定指纹 */ export function generateTestFingerprint( file: string, testName: string, scenario: string ): string { return generateFingerprint(file, testName, scenario); } /** * 计算内容的哈希值(用于 diff 指纹) */ export function computeContentHash(content: string): string { return createHash('sha256').update(content).digest('hex'); }

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/NorthSeacoder/fe-testgen-mcp'

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