@salesforce/lds-runtime-mobile 1.273.0 → 1.274.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.
Files changed (3) hide show
  1. package/dist/main.js +5 -15
  2. package/package.json +16 -16
  3. package/sfdc/main.js +5 -15
package/dist/main.js CHANGED
@@ -4400,9 +4400,7 @@ function rootRecordQuery(selection, input) {
4400
4400
  if (queryMetadata !== undefined && queryMetadata.ingestionTimestamp !== undefined) {
4401
4401
  const timestamp = Number(queryMetadata.ingestionTimestamp);
4402
4402
  if (!isNaN(timestamp)) {
4403
- // adjust the timestamp to account for ingestion processing time
4404
- // 30s is used because this is the default record TTL
4405
- input.rootTimestamp = timestamp - 30000;
4403
+ input.rootTimestamp = timestamp;
4406
4404
  }
4407
4405
  }
4408
4406
  }
@@ -8359,7 +8357,7 @@ function buildQuery(config) {
8359
8357
  SELECT "${config.alias}".data
8360
8358
  FROM lds_data "${config.alias}" ${joins.sql}
8361
8359
  WHERE "${config.alias}".key like 'UiApi::RecordRepresentation:%'
8362
- AND json_extract("${config.alias}".data, '${JSON_EXTRACT_PATH_INGESTION_APINAME}') = ?
8360
+ AND json_extract("${config.alias}".data, '${JSON_EXTRACT_PATH_INGESTION_APINAME}') = '${config.alias}'
8363
8361
  ${staleRecordsSql}
8364
8362
  ${predicates.sql}
8365
8363
  ${orderBy.sql}
@@ -8371,8 +8369,6 @@ function buildQuery(config) {
8371
8369
  const bindings = [
8372
8370
  // bindings from predicates on joins
8373
8371
  ...joins.bindings,
8374
- // the api name for the main record type
8375
- config.alias,
8376
8372
  ...(excludeStaleRecordsGate.isOpen({ fallback: false }) ? [config.ingestionTimestamp] : []),
8377
8373
  // where clause and parent scope bindings
8378
8374
  ...predicates.bindings,
@@ -9070,11 +9066,7 @@ function findFieldInfo(objectInfo, fieldName) {
9070
9066
  }
9071
9067
  async function readIngestionTimestampForKey(key, query) {
9072
9068
  let ingestionTimestamp = 0;
9073
- const sql = `
9074
- SELECT json_extract(metadata, '${JSON_EXTRACT_PATH_INGESTION_TIMESTAMP}')
9075
- FROM lds_data
9076
- WHERE key IS ?
9077
- `;
9069
+ const sql = `SELECT json_extract(metadata, '${JSON_EXTRACT_PATH_INGESTION_TIMESTAMP}') FROM lds_data WHERE key IS ?`;
9078
9070
  const results = await query(sql, [key]);
9079
9071
  const [timestamp] = results.rows.map((row) => row[0]);
9080
9072
  if (timestamp !== null) {
@@ -9082,9 +9074,7 @@ async function readIngestionTimestampForKey(key, query) {
9082
9074
  if (isNaN(numericalTimestamp)) {
9083
9075
  return ingestionTimestamp;
9084
9076
  }
9085
- // adjust the timestamp to account for ingestion processing time
9086
- // 30s is used because this is the default record TTL
9087
- ingestionTimestamp = numericalTimestamp - 30000;
9077
+ ingestionTimestamp = numericalTimestamp;
9088
9078
  }
9089
9079
  return ingestionTimestamp;
9090
9080
  }
@@ -17970,4 +17960,4 @@ register({
17970
17960
  });
17971
17961
 
17972
17962
  export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, registerReportObserver, reportGraphqlQueryParseError };
17973
- // version: 1.273.0-f97941e01
17963
+ // version: 1.274.0-67da496e8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-mobile",
3
- "version": "1.273.0",
3
+ "version": "1.274.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS runtime for mobile/hybrid environments.",
6
6
  "main": "dist/main.js",
@@ -32,25 +32,25 @@
32
32
  "release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-mobile"
33
33
  },
34
34
  "dependencies": {
35
- "@salesforce/lds-adapters-uiapi": "^1.273.0",
36
- "@salesforce/lds-bindings": "^1.273.0",
37
- "@salesforce/lds-instrumentation": "^1.273.0",
38
- "@salesforce/lds-priming": "^1.273.0",
35
+ "@salesforce/lds-adapters-uiapi": "^1.274.0",
36
+ "@salesforce/lds-bindings": "^1.274.0",
37
+ "@salesforce/lds-instrumentation": "^1.274.0",
38
+ "@salesforce/lds-priming": "^1.274.0",
39
39
  "@salesforce/user": "0.0.21",
40
40
  "o11y": "244.0.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@salesforce/lds-adapters-graphql": "^1.273.0",
44
- "@salesforce/lds-drafts": "^1.273.0",
45
- "@salesforce/lds-drafts-adapters-uiapi": "^1.273.0",
46
- "@salesforce/lds-graphql-eval": "^1.273.0",
47
- "@salesforce/lds-network-adapter": "^1.273.0",
48
- "@salesforce/lds-network-nimbus": "^1.273.0",
49
- "@salesforce/lds-store-binary": "^1.273.0",
50
- "@salesforce/lds-store-nimbus": "^1.273.0",
51
- "@salesforce/lds-store-sql": "^1.273.0",
52
- "@salesforce/lds-utils-adapters": "^1.273.0",
53
- "@salesforce/nimbus-plugin-lds": "^1.273.0",
43
+ "@salesforce/lds-adapters-graphql": "^1.274.0",
44
+ "@salesforce/lds-drafts": "^1.274.0",
45
+ "@salesforce/lds-drafts-adapters-uiapi": "^1.274.0",
46
+ "@salesforce/lds-graphql-eval": "^1.274.0",
47
+ "@salesforce/lds-network-adapter": "^1.274.0",
48
+ "@salesforce/lds-network-nimbus": "^1.274.0",
49
+ "@salesforce/lds-store-binary": "^1.274.0",
50
+ "@salesforce/lds-store-nimbus": "^1.274.0",
51
+ "@salesforce/lds-store-sql": "^1.274.0",
52
+ "@salesforce/lds-utils-adapters": "^1.274.0",
53
+ "@salesforce/nimbus-plugin-lds": "^1.274.0",
54
54
  "babel-plugin-dynamic-import-node": "^2.3.3",
55
55
  "wait-for-expect": "^3.0.2"
56
56
  },
package/sfdc/main.js CHANGED
@@ -4400,9 +4400,7 @@ function rootRecordQuery(selection, input) {
4400
4400
  if (queryMetadata !== undefined && queryMetadata.ingestionTimestamp !== undefined) {
4401
4401
  const timestamp = Number(queryMetadata.ingestionTimestamp);
4402
4402
  if (!isNaN(timestamp)) {
4403
- // adjust the timestamp to account for ingestion processing time
4404
- // 30s is used because this is the default record TTL
4405
- input.rootTimestamp = timestamp - 30000;
4403
+ input.rootTimestamp = timestamp;
4406
4404
  }
4407
4405
  }
4408
4406
  }
@@ -8359,7 +8357,7 @@ function buildQuery(config) {
8359
8357
  SELECT "${config.alias}".data
8360
8358
  FROM lds_data "${config.alias}" ${joins.sql}
8361
8359
  WHERE "${config.alias}".key like 'UiApi::RecordRepresentation:%'
8362
- AND json_extract("${config.alias}".data, '${JSON_EXTRACT_PATH_INGESTION_APINAME}') = ?
8360
+ AND json_extract("${config.alias}".data, '${JSON_EXTRACT_PATH_INGESTION_APINAME}') = '${config.alias}'
8363
8361
  ${staleRecordsSql}
8364
8362
  ${predicates.sql}
8365
8363
  ${orderBy.sql}
@@ -8371,8 +8369,6 @@ function buildQuery(config) {
8371
8369
  const bindings = [
8372
8370
  // bindings from predicates on joins
8373
8371
  ...joins.bindings,
8374
- // the api name for the main record type
8375
- config.alias,
8376
8372
  ...(excludeStaleRecordsGate.isOpen({ fallback: false }) ? [config.ingestionTimestamp] : []),
8377
8373
  // where clause and parent scope bindings
8378
8374
  ...predicates.bindings,
@@ -9070,11 +9066,7 @@ function findFieldInfo(objectInfo, fieldName) {
9070
9066
  }
9071
9067
  async function readIngestionTimestampForKey(key, query) {
9072
9068
  let ingestionTimestamp = 0;
9073
- const sql = `
9074
- SELECT json_extract(metadata, '${JSON_EXTRACT_PATH_INGESTION_TIMESTAMP}')
9075
- FROM lds_data
9076
- WHERE key IS ?
9077
- `;
9069
+ const sql = `SELECT json_extract(metadata, '${JSON_EXTRACT_PATH_INGESTION_TIMESTAMP}') FROM lds_data WHERE key IS ?`;
9078
9070
  const results = await query(sql, [key]);
9079
9071
  const [timestamp] = results.rows.map((row) => row[0]);
9080
9072
  if (timestamp !== null) {
@@ -9082,9 +9074,7 @@ async function readIngestionTimestampForKey(key, query) {
9082
9074
  if (isNaN(numericalTimestamp)) {
9083
9075
  return ingestionTimestamp;
9084
9076
  }
9085
- // adjust the timestamp to account for ingestion processing time
9086
- // 30s is used because this is the default record TTL
9087
- ingestionTimestamp = numericalTimestamp - 30000;
9077
+ ingestionTimestamp = numericalTimestamp;
9088
9078
  }
9089
9079
  return ingestionTimestamp;
9090
9080
  }
@@ -17970,4 +17960,4 @@ register({
17970
17960
  });
17971
17961
 
17972
17962
  export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, registerReportObserver, reportGraphqlQueryParseError };
17973
- // version: 1.273.0-f97941e01
17963
+ // version: 1.274.0-67da496e8