@adhdev/daemon-core 0.9.77-rc.47 → 0.9.77-rc.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +0 -18
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +0 -18
- package/dist/index.mjs.map +1 -1
- package/dist/mesh/mesh-sync.d.ts +4 -12
- package/package.json +1 -1
- package/src/mesh/mesh-sync.ts +4 -34
package/dist/index.mjs
CHANGED
|
@@ -7133,26 +7133,8 @@ async function syncMeshes(transport) {
|
|
|
7133
7133
|
}
|
|
7134
7134
|
}
|
|
7135
7135
|
}
|
|
7136
|
-
if (transport.syncMeshLedger) {
|
|
7137
|
-
for (const local of localMeshes) {
|
|
7138
|
-
try {
|
|
7139
|
-
await syncMeshLedger(local.id, transport);
|
|
7140
|
-
} catch (e) {
|
|
7141
|
-
result.errors.push(`Ledger sync failed for "${local.name}": ${e.message}`);
|
|
7142
|
-
}
|
|
7143
|
-
}
|
|
7144
|
-
}
|
|
7145
7136
|
return result;
|
|
7146
7137
|
}
|
|
7147
|
-
async function syncMeshLedger(meshId, transport) {
|
|
7148
|
-
if (!transport.syncMeshLedger) return;
|
|
7149
|
-
const { readLedgerEntries: readLedgerEntries2, appendRemoteLedgerEntries: appendRemoteLedgerEntries2 } = await Promise.resolve().then(() => (init_mesh_ledger(), mesh_ledger_exports));
|
|
7150
|
-
const localEntries = readLedgerEntries2(meshId);
|
|
7151
|
-
const res = await transport.syncMeshLedger(meshId, { newEntries: localEntries });
|
|
7152
|
-
if (res.missingEntries && res.missingEntries.length > 0) {
|
|
7153
|
-
appendRemoteLedgerEntries2(meshId, res.missingEntries);
|
|
7154
|
-
}
|
|
7155
|
-
}
|
|
7156
7138
|
|
|
7157
7139
|
// src/index.ts
|
|
7158
7140
|
init_mesh_ledger();
|