@salesforce/lds-runtime-bridge 1.284.0 → 1.286.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.
- package/dist/ldsRuntimeBridge.js +32 -17
- package/package.json +9 -9
package/dist/ldsRuntimeBridge.js
CHANGED
|
@@ -1389,11 +1389,17 @@ class NimbusSqliteStore {
|
|
|
1389
1389
|
return this.getTable(segment).getAll(segment);
|
|
1390
1390
|
}
|
|
1391
1391
|
setEntries(entries, segment) {
|
|
1392
|
+
if (keys$2(entries).length === 0) {
|
|
1393
|
+
return Promise.resolve();
|
|
1394
|
+
}
|
|
1392
1395
|
const table = this.getTable(segment);
|
|
1393
1396
|
const upsertOperation = table.entriesToUpsertOperations(entries, segment);
|
|
1394
1397
|
return this.batchOperationAsPromise([upsertOperation]);
|
|
1395
1398
|
}
|
|
1396
1399
|
setMetadata(entries, segment) {
|
|
1400
|
+
if (keys$2(entries).length === 0) {
|
|
1401
|
+
return Promise.resolve();
|
|
1402
|
+
}
|
|
1397
1403
|
const table = this.getTable(segment);
|
|
1398
1404
|
let operation;
|
|
1399
1405
|
if (this.supportsBatchUpdates) {
|
|
@@ -1410,32 +1416,41 @@ class NimbusSqliteStore {
|
|
|
1410
1416
|
batchOperations(operations) {
|
|
1411
1417
|
const sqliteOperations = operations.reduce((acc, cur) => {
|
|
1412
1418
|
if (cur.type === 'setEntries') {
|
|
1413
|
-
|
|
1414
|
-
|
|
1419
|
+
if (keys$2(cur.entries).length > 0) {
|
|
1420
|
+
const table = this.getTable(cur.segment);
|
|
1421
|
+
acc.push(table.entriesToUpsertOperations(cur.entries, cur.segment));
|
|
1422
|
+
}
|
|
1415
1423
|
}
|
|
1416
1424
|
else if (cur.type === 'setMetadata') {
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1425
|
+
if (keys$2(cur.entries).length > 0) {
|
|
1426
|
+
const table = this.getTable(cur.segment);
|
|
1427
|
+
if (this.supportsBatchUpdates) {
|
|
1428
|
+
acc.push(table.metadataToUpdateOperations(cur.entries, cur.segment));
|
|
1429
|
+
}
|
|
1430
|
+
else {
|
|
1431
|
+
const upsert = table.entriesToUpsertOperations(cur.entries, cur.segment);
|
|
1432
|
+
// manually set the context type on the upsert so notifications do not notify rebuilds without
|
|
1433
|
+
// plugin updates
|
|
1434
|
+
upsert.context.type = 'setMetadata';
|
|
1435
|
+
acc.push(upsert);
|
|
1436
|
+
}
|
|
1427
1437
|
}
|
|
1428
1438
|
}
|
|
1429
1439
|
else {
|
|
1430
|
-
|
|
1440
|
+
if (cur.ids.length > 0) {
|
|
1441
|
+
acc.push(this.idsToDeleteOperation(cur.ids, cur.segment));
|
|
1442
|
+
}
|
|
1431
1443
|
}
|
|
1432
1444
|
return acc;
|
|
1433
1445
|
}, []);
|
|
1434
|
-
return
|
|
1446
|
+
return sqliteOperations.length === 0
|
|
1447
|
+
? Promise.resolve()
|
|
1448
|
+
: this.batchOperationAsPromise(sqliteOperations);
|
|
1435
1449
|
}
|
|
1436
1450
|
evictEntries(entryIds, segment) {
|
|
1437
|
-
|
|
1438
|
-
|
|
1451
|
+
return entryIds.length === 0
|
|
1452
|
+
? Promise.resolve()
|
|
1453
|
+
: this.batchOperationAsPromise([this.idsToDeleteOperation(entryIds, segment)]);
|
|
1439
1454
|
}
|
|
1440
1455
|
registerOnChangedListener(listener) {
|
|
1441
1456
|
let unsubscribeId = undefined;
|
|
@@ -4084,4 +4099,4 @@ function ldsRuntimeBridge() {
|
|
|
4084
4099
|
}
|
|
4085
4100
|
|
|
4086
4101
|
export { ldsRuntimeBridge as default };
|
|
4087
|
-
// version: 1.
|
|
4102
|
+
// version: 1.286.0-09e7e5207
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-bridge",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.286.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "LDS runtime for bridge.app.",
|
|
6
6
|
"main": "dist/ldsRuntimeBridge.js",
|
|
@@ -34,17 +34,17 @@
|
|
|
34
34
|
"release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-bridge"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@salesforce/lds-adapters-uiapi": "^1.
|
|
38
|
-
"@salesforce/lds-instrumentation": "^1.
|
|
37
|
+
"@salesforce/lds-adapters-uiapi": "^1.286.0",
|
|
38
|
+
"@salesforce/lds-instrumentation": "^1.286.0",
|
|
39
39
|
"@salesforce/user": "0.0.21",
|
|
40
|
-
"o11y": "
|
|
40
|
+
"o11y": "250.7.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@salesforce/lds-drafts-adapters-uiapi": "^1.
|
|
44
|
-
"@salesforce/lds-network-aura": "^1.
|
|
45
|
-
"@salesforce/lds-runtime-aura": "^1.
|
|
46
|
-
"@salesforce/lds-store-nimbus": "^1.
|
|
47
|
-
"@salesforce/nimbus-plugin-lds": "^1.
|
|
43
|
+
"@salesforce/lds-drafts-adapters-uiapi": "^1.286.0",
|
|
44
|
+
"@salesforce/lds-network-aura": "^1.286.0",
|
|
45
|
+
"@salesforce/lds-runtime-aura": "^1.286.0",
|
|
46
|
+
"@salesforce/lds-store-nimbus": "^1.286.0",
|
|
47
|
+
"@salesforce/nimbus-plugin-lds": "^1.286.0",
|
|
48
48
|
"babel-plugin-dynamic-import-node": "^2.3.3"
|
|
49
49
|
},
|
|
50
50
|
"luvioBundlesize": [
|