@salesforce/lds-runtime-mobile 1.266.0-dev10 → 1.266.0-dev12
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 +20 -16
- package/package.json +16 -16
- package/sfdc/main.js +20 -16
package/dist/main.js
CHANGED
|
@@ -4379,9 +4379,10 @@ function rootRecordQuery(selection, input) {
|
|
|
4379
4379
|
// If there is no metadata for this query or it somehow lacks a timestamp
|
|
4380
4380
|
// skip setting the root timestamp
|
|
4381
4381
|
if (queryMetadata !== undefined && queryMetadata.ingestionTimestamp !== undefined) {
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4382
|
+
const timestamp = Number(queryMetadata.ingestionTimestamp);
|
|
4383
|
+
if (!isNaN(timestamp)) {
|
|
4384
|
+
input.rootTimestamp = timestamp;
|
|
4385
|
+
}
|
|
4385
4386
|
}
|
|
4386
4387
|
}
|
|
4387
4388
|
return recordQuery(selection, alias, apiName, [], input);
|
|
@@ -9046,6 +9047,20 @@ function findFieldInfo(objectInfo, fieldName) {
|
|
|
9046
9047
|
return values$2(objectInfo.fields).find((field) => field.apiName === fieldName ||
|
|
9047
9048
|
(field.dataType === 'Reference' && field.relationshipName === fieldName));
|
|
9048
9049
|
}
|
|
9050
|
+
async function readIngestionTimestampForKey(key, query) {
|
|
9051
|
+
let ingestionTimestamp = 0;
|
|
9052
|
+
const sql = `SELECT json_extract(metadata, '${JSON_EXTRACT_PATH_INGESTION_TIMESTAMP}') FROM lds_data WHERE key IS ?`;
|
|
9053
|
+
const results = await query(sql, [key]);
|
|
9054
|
+
const [timestamp] = results.rows.map((row) => row[0]);
|
|
9055
|
+
if (timestamp !== null) {
|
|
9056
|
+
const numericalTimestamp = Number(timestamp);
|
|
9057
|
+
if (isNaN(numericalTimestamp)) {
|
|
9058
|
+
return ingestionTimestamp;
|
|
9059
|
+
}
|
|
9060
|
+
ingestionTimestamp = numericalTimestamp;
|
|
9061
|
+
}
|
|
9062
|
+
return ingestionTimestamp;
|
|
9063
|
+
}
|
|
9049
9064
|
|
|
9050
9065
|
function findSpanningField(name) {
|
|
9051
9066
|
return (field) => {
|
|
@@ -9565,18 +9580,7 @@ async function fetchIngestionTimeStampFromDatabase(apiName, info, args, query) {
|
|
|
9565
9580
|
const key = buildKeyStringForRecordQuery(operation,
|
|
9566
9581
|
// join varables passed from query to the argument variables given from the AST
|
|
9567
9582
|
{ ...variableValues, ...args }, info.fieldNodes[0].arguments, apiName);
|
|
9568
|
-
|
|
9569
|
-
SELECT json_extract(metadata, '${JSON_EXTRACT_PATH_INGESTION_TIMESTAMP}')
|
|
9570
|
-
FROM lds_data
|
|
9571
|
-
WHERE key IS ?
|
|
9572
|
-
`;
|
|
9573
|
-
const results = await query(sql, [key]);
|
|
9574
|
-
const [timestamp] = results.rows.map((row) => row[0]);
|
|
9575
|
-
if (timestamp !== null && typeof timestamp === 'number') {
|
|
9576
|
-
// adjust the timestamp to account for ingestion processing time
|
|
9577
|
-
// 30s is used because this is the default record TTL
|
|
9578
|
-
ingestionTimestamp = timestamp - 30000;
|
|
9579
|
-
}
|
|
9583
|
+
return readIngestionTimestampForKey(key, query);
|
|
9580
9584
|
}
|
|
9581
9585
|
return ingestionTimestamp;
|
|
9582
9586
|
}
|
|
@@ -17939,4 +17943,4 @@ register({
|
|
|
17939
17943
|
});
|
|
17940
17944
|
|
|
17941
17945
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, registerReportObserver, reportGraphqlQueryParseError };
|
|
17942
|
-
// version: 1.266.0-
|
|
17946
|
+
// version: 1.266.0-dev12-070ceccd9
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-mobile",
|
|
3
|
-
"version": "1.266.0-
|
|
3
|
+
"version": "1.266.0-dev12",
|
|
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.266.0-
|
|
36
|
-
"@salesforce/lds-bindings": "^1.266.0-
|
|
37
|
-
"@salesforce/lds-instrumentation": "^1.266.0-
|
|
38
|
-
"@salesforce/lds-priming": "^1.266.0-
|
|
35
|
+
"@salesforce/lds-adapters-uiapi": "^1.266.0-dev12",
|
|
36
|
+
"@salesforce/lds-bindings": "^1.266.0-dev12",
|
|
37
|
+
"@salesforce/lds-instrumentation": "^1.266.0-dev12",
|
|
38
|
+
"@salesforce/lds-priming": "^1.266.0-dev12",
|
|
39
39
|
"@salesforce/user": "0.0.21",
|
|
40
40
|
"o11y": "244.0.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@salesforce/lds-adapters-graphql": "^1.266.0-
|
|
44
|
-
"@salesforce/lds-drafts": "^1.266.0-
|
|
45
|
-
"@salesforce/lds-drafts-adapters-uiapi": "^1.266.0-
|
|
46
|
-
"@salesforce/lds-graphql-eval": "^1.266.0-
|
|
47
|
-
"@salesforce/lds-network-adapter": "^1.266.0-
|
|
48
|
-
"@salesforce/lds-network-nimbus": "^1.266.0-
|
|
49
|
-
"@salesforce/lds-store-binary": "^1.266.0-
|
|
50
|
-
"@salesforce/lds-store-nimbus": "^1.266.0-
|
|
51
|
-
"@salesforce/lds-store-sql": "^1.266.0-
|
|
52
|
-
"@salesforce/lds-utils-adapters": "^1.266.0-
|
|
53
|
-
"@salesforce/nimbus-plugin-lds": "^1.266.0-
|
|
43
|
+
"@salesforce/lds-adapters-graphql": "^1.266.0-dev12",
|
|
44
|
+
"@salesforce/lds-drafts": "^1.266.0-dev12",
|
|
45
|
+
"@salesforce/lds-drafts-adapters-uiapi": "^1.266.0-dev12",
|
|
46
|
+
"@salesforce/lds-graphql-eval": "^1.266.0-dev12",
|
|
47
|
+
"@salesforce/lds-network-adapter": "^1.266.0-dev12",
|
|
48
|
+
"@salesforce/lds-network-nimbus": "^1.266.0-dev12",
|
|
49
|
+
"@salesforce/lds-store-binary": "^1.266.0-dev12",
|
|
50
|
+
"@salesforce/lds-store-nimbus": "^1.266.0-dev12",
|
|
51
|
+
"@salesforce/lds-store-sql": "^1.266.0-dev12",
|
|
52
|
+
"@salesforce/lds-utils-adapters": "^1.266.0-dev12",
|
|
53
|
+
"@salesforce/nimbus-plugin-lds": "^1.266.0-dev12",
|
|
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
|
@@ -4379,9 +4379,10 @@ function rootRecordQuery(selection, input) {
|
|
|
4379
4379
|
// If there is no metadata for this query or it somehow lacks a timestamp
|
|
4380
4380
|
// skip setting the root timestamp
|
|
4381
4381
|
if (queryMetadata !== undefined && queryMetadata.ingestionTimestamp !== undefined) {
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4382
|
+
const timestamp = Number(queryMetadata.ingestionTimestamp);
|
|
4383
|
+
if (!isNaN(timestamp)) {
|
|
4384
|
+
input.rootTimestamp = timestamp;
|
|
4385
|
+
}
|
|
4385
4386
|
}
|
|
4386
4387
|
}
|
|
4387
4388
|
return recordQuery(selection, alias, apiName, [], input);
|
|
@@ -9046,6 +9047,20 @@ function findFieldInfo(objectInfo, fieldName) {
|
|
|
9046
9047
|
return values$2(objectInfo.fields).find((field) => field.apiName === fieldName ||
|
|
9047
9048
|
(field.dataType === 'Reference' && field.relationshipName === fieldName));
|
|
9048
9049
|
}
|
|
9050
|
+
async function readIngestionTimestampForKey(key, query) {
|
|
9051
|
+
let ingestionTimestamp = 0;
|
|
9052
|
+
const sql = `SELECT json_extract(metadata, '${JSON_EXTRACT_PATH_INGESTION_TIMESTAMP}') FROM lds_data WHERE key IS ?`;
|
|
9053
|
+
const results = await query(sql, [key]);
|
|
9054
|
+
const [timestamp] = results.rows.map((row) => row[0]);
|
|
9055
|
+
if (timestamp !== null) {
|
|
9056
|
+
const numericalTimestamp = Number(timestamp);
|
|
9057
|
+
if (isNaN(numericalTimestamp)) {
|
|
9058
|
+
return ingestionTimestamp;
|
|
9059
|
+
}
|
|
9060
|
+
ingestionTimestamp = numericalTimestamp;
|
|
9061
|
+
}
|
|
9062
|
+
return ingestionTimestamp;
|
|
9063
|
+
}
|
|
9049
9064
|
|
|
9050
9065
|
function findSpanningField(name) {
|
|
9051
9066
|
return (field) => {
|
|
@@ -9565,18 +9580,7 @@ async function fetchIngestionTimeStampFromDatabase(apiName, info, args, query) {
|
|
|
9565
9580
|
const key = buildKeyStringForRecordQuery(operation,
|
|
9566
9581
|
// join varables passed from query to the argument variables given from the AST
|
|
9567
9582
|
{ ...variableValues, ...args }, info.fieldNodes[0].arguments, apiName);
|
|
9568
|
-
|
|
9569
|
-
SELECT json_extract(metadata, '${JSON_EXTRACT_PATH_INGESTION_TIMESTAMP}')
|
|
9570
|
-
FROM lds_data
|
|
9571
|
-
WHERE key IS ?
|
|
9572
|
-
`;
|
|
9573
|
-
const results = await query(sql, [key]);
|
|
9574
|
-
const [timestamp] = results.rows.map((row) => row[0]);
|
|
9575
|
-
if (timestamp !== null && typeof timestamp === 'number') {
|
|
9576
|
-
// adjust the timestamp to account for ingestion processing time
|
|
9577
|
-
// 30s is used because this is the default record TTL
|
|
9578
|
-
ingestionTimestamp = timestamp - 30000;
|
|
9579
|
-
}
|
|
9583
|
+
return readIngestionTimestampForKey(key, query);
|
|
9580
9584
|
}
|
|
9581
9585
|
return ingestionTimestamp;
|
|
9582
9586
|
}
|
|
@@ -17939,4 +17943,4 @@ register({
|
|
|
17939
17943
|
});
|
|
17940
17944
|
|
|
17941
17945
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, registerReportObserver, reportGraphqlQueryParseError };
|
|
17942
|
-
// version: 1.266.0-
|
|
17946
|
+
// version: 1.266.0-dev12-070ceccd9
|