MCPcopy Index your code
hub / github.com/cursor/community-plugins / fingerprintComponent

Function fingerprintComponent

apps/cursor/src/actions/update-plugin.ts:29–43  ·  view source on GitHub ↗
(c: {
  type: string;
  slug?: string | null;
  name: string;
  content?: string | null;
  metadata?: Record<string, unknown> | null;
})

Source from the content-addressed store, hash-verified

27// description, or sort_order must not trigger a rescan. MCP install links and
28// configs can live in metadata, so compare the metadata that will be saved.
29function fingerprintComponent(c: {
30 type: string;
31 slug?: string | null;
32 name: string;
33 content?: string | null;
34 metadata?: Record<string, unknown> | null;
35}): string {
36 const slug = resolveComponentSlug(c);
37 return JSON.stringify({
38 type: c.type,
39 slug,
40 content: c.content ?? "",
41 metadata: c.metadata ?? {},
42 });
43}
44
45function resolveComponentMetadata(
46 comp: ComponentInput,

Callers 1

installRelevantChangedFunction · 0.85

Calls 1

resolveComponentSlugFunction · 0.90

Tested by

no test coverage detected