@tinycloud/cli 1.5.0-beta.13 → 1.5.0-beta.15
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.map +1 -1
- package/dist/legacy-entry.js +4 -0
- package/dist/legacy-entry.js.map +1 -1
- package/package.json +7 -7
package/dist/legacy-entry.js
CHANGED
|
@@ -5733,6 +5733,7 @@ var init_dist = __esm({
|
|
|
5733
5733
|
#now;
|
|
5734
5734
|
#leaseTtlMs;
|
|
5735
5735
|
#onCommit;
|
|
5736
|
+
#contentFetch;
|
|
5736
5737
|
/** Failed repair fetches of this session, by key and ETag hash. Never persisted: a new `Replica` retries afresh. */
|
|
5737
5738
|
#repairTries = /* @__PURE__ */ new Map();
|
|
5738
5739
|
constructor(options) {
|
|
@@ -5742,6 +5743,7 @@ var init_dist = __esm({
|
|
|
5742
5743
|
this.#now = options.now ?? Date.now;
|
|
5743
5744
|
this.#leaseTtlMs = options.leaseTtlMs ?? DEFAULT_LEASE_TTL_MS;
|
|
5744
5745
|
this.#onCommit = options.onCommit;
|
|
5746
|
+
this.#contentFetch = options.contentFetch ?? "eager";
|
|
5745
5747
|
}
|
|
5746
5748
|
async #state() {
|
|
5747
5749
|
const state2 = await this.#store.open();
|
|
@@ -6070,6 +6072,7 @@ var init_dist = __esm({
|
|
|
6070
6072
|
changes[candidate.index].content = true;
|
|
6071
6073
|
return false;
|
|
6072
6074
|
});
|
|
6075
|
+
if (this.#contentFetch === "lazy") return { changes, blobs, fetched: 0 };
|
|
6073
6076
|
let fetched2 = 0;
|
|
6074
6077
|
for (let start = 0; start < needed.length; start += FETCH_CHUNK) {
|
|
6075
6078
|
const chunk = needed.slice(start, start + FETCH_CHUNK);
|
|
@@ -6089,6 +6092,7 @@ var init_dist = __esm({
|
|
|
6089
6092
|
return { changes, blobs, fetched: fetched2 };
|
|
6090
6093
|
}
|
|
6091
6094
|
async #repair(attempt, cursor, nodeDid, coverage, retentionGrantCid) {
|
|
6095
|
+
if (this.#contentFetch === "lazy") return 0;
|
|
6092
6096
|
const all = await this.#store.pendingRepairs(Number.MAX_SAFE_INTEGER);
|
|
6093
6097
|
const now = this.#now();
|
|
6094
6098
|
const pendingIds = new Set(all.map((entry) => repairId(entry)));
|