@harperfast/harper 5.0.20 → 5.0.21
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/resources/Table.js +5 -3
- package/dist/resources/Table.js.map +1 -1
- package/package.json +1 -1
- package/resources/Table.ts +5 -2
- package/studio/web/assets/{index-DfcUUI7w.js → index-CWeBJPXe.js} +6 -6
- package/studio/web/assets/index-CWeBJPXe.js.map +1 -0
- package/studio/web/assets/{index.lazy-fbJWTW5l.js → index.lazy-DI14kJT2.js} +2 -2
- package/studio/web/assets/{index.lazy-fbJWTW5l.js.map → index.lazy-DI14kJT2.js.map} +1 -1
- package/studio/web/assets/{profile-IcGoxtBp.js → profile-BeDlmXju.js} +2 -2
- package/studio/web/assets/{profile-IcGoxtBp.js.map → profile-BeDlmXju.js.map} +1 -1
- package/studio/web/assets/{status-CxrkcGr7.js → status-26y1EUMG.js} +2 -2
- package/studio/web/assets/{status-CxrkcGr7.js.map → status-26y1EUMG.js.map} +1 -1
- package/studio/web/index.html +1 -1
- package/studio/web/assets/index-DfcUUI7w.js.map +0 -1
package/dist/resources/Table.js
CHANGED
|
@@ -272,6 +272,8 @@ function makeTable(options) {
|
|
|
272
272
|
ensureLoaded: false,
|
|
273
273
|
nodeId: event.nodeId,
|
|
274
274
|
viaNodeId: event.viaNodeId,
|
|
275
|
+
// use per-event expiresAt: batched txn context only holds the first event's expiration
|
|
276
|
+
expiresAt: event.expiresAt,
|
|
275
277
|
async: true,
|
|
276
278
|
};
|
|
277
279
|
const id = event.id;
|
|
@@ -1578,7 +1580,7 @@ function makeTable(options) {
|
|
|
1578
1580
|
let residencyId;
|
|
1579
1581
|
if (options?.residencyId != undefined)
|
|
1580
1582
|
residencyId = options.residencyId;
|
|
1581
|
-
const expiresAt = context?.expiresAt ?? (expirationMs ? expirationMs + Date.now() : -1);
|
|
1583
|
+
const expiresAt = options?.expiresAt ?? context?.expiresAt ?? (expirationMs ? expirationMs + Date.now() : -1);
|
|
1582
1584
|
const additionalAuditRefs = []; // track additional audit refs to store
|
|
1583
1585
|
if (precedesExisting <= 0) {
|
|
1584
1586
|
// This block is to handle the case of saving an update where the transaction timestamp is older than the
|
|
@@ -1759,8 +1761,8 @@ function makeTable(options) {
|
|
|
1759
1761
|
})());
|
|
1760
1762
|
updateIndices(id, existingRecord, recordToStore, transaction && { transaction });
|
|
1761
1763
|
writeCommit(true);
|
|
1762
|
-
if (
|
|
1763
|
-
scheduleCleanup();
|
|
1764
|
+
if (expiresAt >= 0)
|
|
1765
|
+
scheduleCleanup(); // arm for replicated writes too, not just local-context writes
|
|
1764
1766
|
function writeCommit(storeRecord) {
|
|
1765
1767
|
// we need to write the commit. if storeRecord then we need to store the record, otherwise we just need to store the audit record
|
|
1766
1768
|
updateRecord(id, storeRecord ? recordToStore : undefined, storeRecord ? existingEntry : { ...existingEntry, value: undefined }, isRocksDB
|