@salesforce/lds-runtime-mobile 1.115.0 → 1.116.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.
package/dist/main.js CHANGED
@@ -12146,10 +12146,21 @@ const GRAPHQL_ROOT_KEY = `GraphQL::graphql`;
12146
12146
  function isLocalEvalSnapshot(snapshot) {
12147
12147
  return 'rebuildWithLocalEval' in snapshot;
12148
12148
  }
12149
- function createSeenRecords(ids) {
12150
- return ids
12149
+ function createSeenRecords(ids, currentSnapshot) {
12150
+ let seenRecords = ids
12151
12151
  .map((id) => `UiApi::RecordRepresentation:${id}`)
12152
12152
  .reduce((acc, curr) => (acc.add(curr), acc), new StoreKeySet());
12153
+ if (currentSnapshot.state !== 'Error') {
12154
+ currentSnapshot.seenRecords.forEach((record) => {
12155
+ let keyString = typeof record !== 'string' ? serializeStructuredKey(record) : record;
12156
+ if (keyString !== 'UiApi::GraphQLRepresentation__uiapi' &&
12157
+ keyString !== 'UiApi::GraphQLRepresentation__uiapi__query' &&
12158
+ seenRecords.has(record) === false) {
12159
+ seenRecords.add(record);
12160
+ }
12161
+ });
12162
+ }
12163
+ return seenRecords;
12153
12164
  }
12154
12165
  function createErrorSnapshot(result, snapshot) {
12155
12166
  return {
@@ -12334,7 +12345,7 @@ function draftAwareGraphQLAdapterFactory(userId, objectInfoService, store, luvio
12334
12345
  if (!gqlResult.errors) {
12335
12346
  gqlResult = removeSyntheticFields(gqlResult, config.query);
12336
12347
  }
12337
- const seenRecords = createSeenRecords(seenRecordIds);
12348
+ const seenRecords = createSeenRecords(seenRecordIds, nonEvaluatedSnapshot);
12338
12349
  const recordId = generateUniqueRecordId();
12339
12350
  const rebuildWithLocalEval = async (originalSnapshot) => {
12340
12351
  let { result: rebuildResult, seenRecordIds } = await evaluate({
@@ -12348,7 +12359,7 @@ function draftAwareGraphQLAdapterFactory(userId, objectInfoService, store, luvio
12348
12359
  ...nonEvaluatedSnapshot,
12349
12360
  data: rebuildResult,
12350
12361
  recordId,
12351
- seenRecords: createSeenRecords(seenRecordIds),
12362
+ seenRecords: createSeenRecords(seenRecordIds, nonEvaluatedSnapshot),
12352
12363
  rebuildWithLocalEval,
12353
12364
  };
12354
12365
  };
@@ -15600,4 +15611,4 @@ register({
15600
15611
  });
15601
15612
 
15602
15613
  export { getRuntime, registerReportObserver, reportGraphqlQueryParseError };
15603
- // version: 1.115.0-d56477e9a
15614
+ // version: 1.116.1-c33d74bf7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-mobile",
3
- "version": "1.115.0",
3
+ "version": "1.116.1",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS runtime for mobile/hybrid environments.",
6
6
  "main": "dist/main.js",
@@ -27,7 +27,7 @@
27
27
  "build": "rollup --config rollup.config.js",
28
28
  "test:debug": "node --inspect-brk ../../node_modules/.bin/jest --runInBand",
29
29
  "test:unit": "NODE_ENV=production jest",
30
- "test:size": "bundlesize",
30
+ "test:size": "luvioBundlesize",
31
31
  "clean": "rm -rf dist sfdc",
32
32
  "release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-mobile"
33
33
  },
@@ -53,16 +53,22 @@
53
53
  "babel-plugin-dynamic-import-node": "^2.3.3",
54
54
  "wait-for-expect": "^3.0.2"
55
55
  },
56
- "bundlesize": [
56
+ "luvioBundlesize": [
57
57
  {
58
58
  "path": "./dist/main.js",
59
- "maxSize": "100 kB",
60
- "compression": "brotli"
59
+ "maxSize": {
60
+ "none": "650 kB",
61
+ "min": "250 kB",
62
+ "compressed": "100 kB"
63
+ }
61
64
  },
62
65
  {
63
66
  "path": "./sfdc/main.js",
64
- "maxSize": "100 kB",
65
- "compression": "brotli"
67
+ "maxSize": {
68
+ "none": "650 kB",
69
+ "min": "250 kB",
70
+ "compressed": "100 kB"
71
+ }
66
72
  }
67
73
  ],
68
74
  "sfdc": {
package/sfdc/main.js CHANGED
@@ -12146,10 +12146,21 @@ const GRAPHQL_ROOT_KEY = `GraphQL::graphql`;
12146
12146
  function isLocalEvalSnapshot(snapshot) {
12147
12147
  return 'rebuildWithLocalEval' in snapshot;
12148
12148
  }
12149
- function createSeenRecords(ids) {
12150
- return ids
12149
+ function createSeenRecords(ids, currentSnapshot) {
12150
+ let seenRecords = ids
12151
12151
  .map((id) => `UiApi::RecordRepresentation:${id}`)
12152
12152
  .reduce((acc, curr) => (acc.add(curr), acc), new StoreKeySet());
12153
+ if (currentSnapshot.state !== 'Error') {
12154
+ currentSnapshot.seenRecords.forEach((record) => {
12155
+ let keyString = typeof record !== 'string' ? serializeStructuredKey(record) : record;
12156
+ if (keyString !== 'UiApi::GraphQLRepresentation__uiapi' &&
12157
+ keyString !== 'UiApi::GraphQLRepresentation__uiapi__query' &&
12158
+ seenRecords.has(record) === false) {
12159
+ seenRecords.add(record);
12160
+ }
12161
+ });
12162
+ }
12163
+ return seenRecords;
12153
12164
  }
12154
12165
  function createErrorSnapshot(result, snapshot) {
12155
12166
  return {
@@ -12334,7 +12345,7 @@ function draftAwareGraphQLAdapterFactory(userId, objectInfoService, store, luvio
12334
12345
  if (!gqlResult.errors) {
12335
12346
  gqlResult = removeSyntheticFields(gqlResult, config.query);
12336
12347
  }
12337
- const seenRecords = createSeenRecords(seenRecordIds);
12348
+ const seenRecords = createSeenRecords(seenRecordIds, nonEvaluatedSnapshot);
12338
12349
  const recordId = generateUniqueRecordId();
12339
12350
  const rebuildWithLocalEval = async (originalSnapshot) => {
12340
12351
  let { result: rebuildResult, seenRecordIds } = await evaluate({
@@ -12348,7 +12359,7 @@ function draftAwareGraphQLAdapterFactory(userId, objectInfoService, store, luvio
12348
12359
  ...nonEvaluatedSnapshot,
12349
12360
  data: rebuildResult,
12350
12361
  recordId,
12351
- seenRecords: createSeenRecords(seenRecordIds),
12362
+ seenRecords: createSeenRecords(seenRecordIds, nonEvaluatedSnapshot),
12352
12363
  rebuildWithLocalEval,
12353
12364
  };
12354
12365
  };
@@ -15600,4 +15611,4 @@ register({
15600
15611
  });
15601
15612
 
15602
15613
  export { getRuntime, registerReportObserver, reportGraphqlQueryParseError };
15603
- // version: 1.115.0-d56477e9a
15614
+ // version: 1.116.1-c33d74bf7