MCPcopy
hub / github.com/inkeep/open-knowledge / deferStore

Function deferStore

packages/server/src/persistence.ts:1094–1108  ·  view source on GitHub ↗
({
    document,
    documentName,
    lastTransactionOrigin,
  }: {
    document: Y.Doc;
    documentName: string;
    lastTransactionOrigin: unknown;
  })

Source from the content-addressed store, hash-verified

1092 }
1093
1094 function deferStore({
1095 document,
1096 documentName,
1097 lastTransactionOrigin,
1098 }: {
1099 document: Y.Doc;
1100 documentName: string;
1101 lastTransactionOrigin: unknown;
1102 }): void {
1103 deferredStores.set(documentName, {
1104 branch: getActiveBranch(),
1105 document,
1106 lastTransactionOrigin,
1107 });
1108 }
1109
1110 async function flushDeferredStores(mode: 'within-branch' | 'discard-stale' = 'within-branch') {
1111 if (deferredStoreDrainInFlight) {

Callers 1

onStoreDocumentFunction · 0.85

Calls 2

getActiveBranchFunction · 0.85
setMethod · 0.65

Tested by

no test coverage detected