@salesforce/lds-runtime-bridge 1.245.0 → 1.247.0

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.
@@ -1340,6 +1340,7 @@ class NimbusSqliteStore {
1340
1340
  ...additionalTableMap,
1341
1341
  [DefaultDurableSegment]: new LdsDataTable(plugin),
1342
1342
  };
1343
+ this.supportsBatchUpdates = plugin.supportsBatchUpdates !== undefined;
1343
1344
  }
1344
1345
  isEvalSupported() {
1345
1346
  return true;
@@ -1374,16 +1375,15 @@ class NimbusSqliteStore {
1374
1375
  setMetadata(entries, segment) {
1375
1376
  const table = this.getTable(segment);
1376
1377
  let operation;
1377
- if (this.plugin.supportsBatchUpdates === undefined ||
1378
- this.plugin.supportsBatchUpdates() === false) {
1378
+ if (this.supportsBatchUpdates) {
1379
+ operation = table.metadataToUpdateOperations(entries, segment);
1380
+ }
1381
+ else {
1379
1382
  operation = table.entriesToUpsertOperations(entries, segment);
1380
1383
  // manually set the context type on the upsert so notifications do not notify rebuilds without
1381
1384
  // plugin updates
1382
1385
  operation.context.type = 'setMetadata';
1383
1386
  }
1384
- else {
1385
- operation = table.metadataToUpdateOperations(entries, segment);
1386
- }
1387
1387
  return this.batchOperationAsPromise([operation]);
1388
1388
  }
1389
1389
  batchOperations(operations) {
@@ -1394,17 +1394,16 @@ class NimbusSqliteStore {
1394
1394
  }
1395
1395
  else if (cur.type === 'setMetadata') {
1396
1396
  const table = this.getTable(cur.segment);
1397
- if (this.plugin.supportsBatchUpdates === undefined ||
1398
- this.plugin.supportsBatchUpdates() === false) {
1397
+ if (this.supportsBatchUpdates) {
1398
+ acc.push(table.metadataToUpdateOperations(cur.entries, cur.segment));
1399
+ }
1400
+ else {
1399
1401
  const upsert = table.entriesToUpsertOperations(cur.entries, cur.segment);
1400
1402
  // manually set the context type on the upsert so notifications do not notify rebuilds without
1401
1403
  // plugin updates
1402
1404
  upsert.context.type = 'setMetadata';
1403
1405
  acc.push(upsert);
1404
1406
  }
1405
- else {
1406
- acc.push(table.metadataToUpdateOperations(cur.entries, cur.segment));
1407
- }
1408
1407
  }
1409
1408
  else {
1410
1409
  acc.push(this.idsToDeleteOperation(cur.ids, cur.segment));
@@ -5998,4 +5997,4 @@ function ldsRuntimeBridge() {
5998
5997
  }
5999
5998
 
6000
5999
  export { ldsRuntimeBridge as default };
6001
- // version: 1.245.0-0ea124370
6000
+ // version: 1.247.0-4fe38c091
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-bridge",
3
- "version": "1.245.0",
3
+ "version": "1.247.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS runtime for bridge.app.",
6
6
  "main": "dist/ldsRuntimeBridge.js",