@interncom/diplomatic 0.0.61 → 0.0.63
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.mjs +5 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -11533,10 +11533,13 @@ var DiplomaticClient = class {
|
|
|
11533
11533
|
return [];
|
|
11534
11534
|
}
|
|
11535
11535
|
const lastFetchedAt = await this.store.getLastFetchedAt();
|
|
11536
|
-
const begin = /* @__PURE__ */ new Date(0);
|
|
11536
|
+
const begin = lastFetchedAt ?? /* @__PURE__ */ new Date(0);
|
|
11537
11537
|
const { hostURL, hostKeyPair } = this;
|
|
11538
11538
|
const resp = await api_default.listDeltas(hostURL, begin, hostKeyPair);
|
|
11539
11539
|
for (const item of resp.deltas) {
|
|
11540
|
+
if (await this.store.hasOp(item.sha256)) {
|
|
11541
|
+
continue;
|
|
11542
|
+
}
|
|
11540
11543
|
await this.store.enqueueDownload(item.sha256, item.recordedAt);
|
|
11541
11544
|
this.emitXferUpdate();
|
|
11542
11545
|
}
|
|
@@ -11810,6 +11813,7 @@ var applier = async (op) => {
|
|
|
11810
11813
|
await db2.put("entities", {
|
|
11811
11814
|
eid: op.eid,
|
|
11812
11815
|
gid: op.gid,
|
|
11816
|
+
pid: op.pid,
|
|
11813
11817
|
type: op.type,
|
|
11814
11818
|
createdAt: curr?.createdAt ?? /* @__PURE__ */ new Date(),
|
|
11815
11819
|
updatedAt: new Date(op.ts),
|