@salesforce/lds-runtime-bridge 1.241.0 → 1.242.1

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.
@@ -14,7 +14,7 @@
14
14
  import { setDefaultLuvio } from 'force/ldsEngine';
15
15
  import { StoreKeySet, serializeStructuredKey, StringKeyInMemoryStore, Reader, deepFreeze, emitAdapterEvent, InMemoryStore, Environment, Luvio } from 'force/luvioEngine';
16
16
  import { instrumentLuvio } from 'force/ldsInstrumentation';
17
- import { keyBuilderRecord } from 'force/ldsAdaptersUiapi';
17
+ import { isStoreKeyRecordViewEntity, RECORD_ID_PREFIX, RECORD_FIELDS_KEY_JUNCTION, extractRecordIdFromStoreKey, RECORD_VIEW_ENTITY_ID_PREFIX, keyBuilderRecord } from 'force/ldsAdaptersUiapi';
18
18
  import '@salesforce/gate/lds.graphqlEvalExcludeStaleRecords';
19
19
  import networkAdapter from 'force/ldsNetwork';
20
20
  import ldsEngineCreator from 'force/ldsEngineCreator';
@@ -68,6 +68,9 @@ function handleDurableStoreRejection(instrument) {
68
68
  }
69
69
 
70
70
  function isStoreEntryError(storeRecord) {
71
+ if (!storeRecord || typeof storeRecord !== 'object') {
72
+ return false;
73
+ }
71
74
  return storeRecord.__type === 'error';
72
75
  }
73
76
 
@@ -1482,27 +1485,10 @@ class NimbusSqliteStore {
1482
1485
  * For full license text, see the LICENSE.txt file
1483
1486
  */
1484
1487
 
1485
- const API_NAMESPACE = 'UiApi';
1486
- const RECORD_REPRESENTATION_NAME = 'RecordRepresentation';
1487
- const RECORD_VIEW_ENTITY_REPRESENTATION_NAME = 'RecordViewEntityRepresentation';
1488
- const RECORD_ID_PREFIX = `${API_NAMESPACE}::${RECORD_REPRESENTATION_NAME}:`;
1489
- const RECORD_VIEW_ENTITY_ID_PREFIX = `${API_NAMESPACE}::${RECORD_VIEW_ENTITY_REPRESENTATION_NAME}:Name:`;
1490
- const RECORD_FIELDS_KEY_JUNCTION = '__fields__';
1488
+
1491
1489
  function isStoreKeyRecordId(key) {
1492
1490
  return key.indexOf(RECORD_ID_PREFIX) > -1 && key.indexOf(RECORD_FIELDS_KEY_JUNCTION) === -1;
1493
1491
  }
1494
- function isStoreKeyRecordViewEntity(key) {
1495
- return (key.indexOf(RECORD_VIEW_ENTITY_ID_PREFIX) > -1 &&
1496
- key.indexOf(RECORD_FIELDS_KEY_JUNCTION) === -1);
1497
- }
1498
- function extractRecordIdFromStoreKey(key) {
1499
- if (key === undefined ||
1500
- (key.indexOf(RECORD_ID_PREFIX) === -1 && key.indexOf(RECORD_VIEW_ENTITY_ID_PREFIX) === -1)) {
1501
- return undefined;
1502
- }
1503
- const parts = key.split(':');
1504
- return parts[parts.length - 1].split('_')[0];
1505
- }
1506
1492
  function buildRecordFieldStoreKey(recordKey, fieldName) {
1507
1493
  return `${recordKey}${RECORD_FIELDS_KEY_JUNCTION}${fieldName}`;
1508
1494
  }
@@ -5630,6 +5616,7 @@ var PredicateType;
5630
5616
  PredicateType["single"] = "single";
5631
5617
  PredicateType["not"] = "not";
5632
5618
  })(PredicateType || (PredicateType = {}));
5619
+ const PARENT_RELATIONSHIP = 'parentRelationship';
5633
5620
 
5634
5621
  ({
5635
5622
  kind: Kind.DIRECTIVE,
@@ -5646,7 +5633,7 @@ var PredicateType;
5646
5633
  },
5647
5634
  value: {
5648
5635
  kind: Kind.STRING,
5649
- value: 'parentRelationship',
5636
+ value: PARENT_RELATIONSHIP,
5650
5637
  block: false,
5651
5638
  },
5652
5639
  },
@@ -6005,4 +5992,4 @@ function ldsRuntimeBridge() {
6005
5992
  }
6006
5993
 
6007
5994
  export { ldsRuntimeBridge as default };
6008
- // version: 1.241.0-b14b649d4
5995
+ // version: 1.242.1-58f8f4bb1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-bridge",
3
- "version": "1.241.0",
3
+ "version": "1.242.1",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS runtime for bridge.app.",
6
6
  "main": "dist/ldsRuntimeBridge.js",
@@ -61,8 +61,8 @@
61
61
  "targets": {
62
62
  "build": {
63
63
  "outputs": [
64
- "packages/lds-runtime-bridge/dist",
65
- "packages/lds-runtime-bridge/src/__tests__/fixtures"
64
+ "{projectRoot}/dist",
65
+ "{projectRoot}/src/__tests__/fixtures"
66
66
  ]
67
67
  }
68
68
  }