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

Method stampModuleConfigSnapshot

src/index.ts:1033–1038  ·  view source on GitHub ↗

Record the module-config files the index was resolved by, for a later sync to compare against (see sync).

()

Source from the content-addressed store, hash-verified

1031
1032 /** Record the module-config files the index was resolved by, for a later sync to compare against (see sync). */
1033 private stampModuleConfigSnapshot(): void {
1034 try {
1035 const stored = this.queries.getMetadata(MODULE_CONFIG_METADATA_KEY);
1036 this.queries.setMetadata(MODULE_CONFIG_METADATA_KEY, JSON.stringify(this.resolver.getModuleConfigSnapshot(stored, true)));
1037 } catch { /* metadata is advisory */ }
1038 }
1039
1040 /** The same, only when the snapshot differs from the stored one: a config changed, or resolution read one the index had not recorded. */
1041 private stampModuleConfigSnapshotIfMoved(): void {

Callers 1

indexAllMethod · 0.95

Calls 3

getMetadataMethod · 0.80
setMetadataMethod · 0.80

Tested by

no test coverage detected