MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / stampModuleConfigSnapshotIfMoved

Method stampModuleConfigSnapshotIfMoved

src/index.ts:1062–1068  ·  view source on GitHub ↗

The same, only when the snapshot differs from the stored one: a config changed, or resolution read one the index had not recorded.

()

Source from the content-addressed store, hash-verified

1060
1061 /** The same, only when the snapshot differs from the stored one: a config changed, or resolution read one the index had not recorded. */
1062 private stampModuleConfigSnapshotIfMoved(): void {
1063 try {
1064 const stored = this.queries.getMetadata(MODULE_CONFIG_METADATA_KEY);
1065 const now = JSON.stringify(this.resolver.getModuleConfigSnapshot(stored));
1066 if (now !== stored) this.queries.setMetadata(MODULE_CONFIG_METADATA_KEY, now);
1067 } catch { /* metadata is advisory */ }
1068 }
1069
1070 /** Record the workspace-package digest a later sync compares against (see sync). */
1071 private stampWorkspaceFingerprint(fingerprint = this.resolver.getWorkspaceFingerprint()): void {

Callers 1

syncMethod · 0.95

Calls 3

getMetadataMethod · 0.80
setMetadataMethod · 0.80

Tested by

no test coverage detected