@salesforce/lds-runtime-mobile 1.265.0 → 1.267.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/main.js +28 -16
- package/package.json +16 -16
- package/sfdc/main.js +28 -16
package/dist/main.js
CHANGED
|
@@ -4374,9 +4374,12 @@ function rootRecordQuery(selection, input) {
|
|
|
4374
4374
|
// If there is no metadata for this query or it somehow lacks a timestamp
|
|
4375
4375
|
// skip setting the root timestamp
|
|
4376
4376
|
if (queryMetadata !== undefined && queryMetadata.ingestionTimestamp !== undefined) {
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4377
|
+
const timestamp = Number(queryMetadata.ingestionTimestamp);
|
|
4378
|
+
if (!isNaN(timestamp)) {
|
|
4379
|
+
// adjust the timestamp to account for ingestion processing time
|
|
4380
|
+
// 30s is used because this is the default record TTL
|
|
4381
|
+
input.rootTimestamp = timestamp - 30000;
|
|
4382
|
+
}
|
|
4380
4383
|
}
|
|
4381
4384
|
}
|
|
4382
4385
|
return recordQuery(selection, alias, apiName, [], input);
|
|
@@ -9041,6 +9044,26 @@ function findFieldInfo(objectInfo, fieldName) {
|
|
|
9041
9044
|
return values$2(objectInfo.fields).find((field) => field.apiName === fieldName ||
|
|
9042
9045
|
(field.dataType === 'Reference' && field.relationshipName === fieldName));
|
|
9043
9046
|
}
|
|
9047
|
+
async function readIngestionTimestampForKey(key, query) {
|
|
9048
|
+
let ingestionTimestamp = 0;
|
|
9049
|
+
const sql = `
|
|
9050
|
+
SELECT json_extract(metadata, '${JSON_EXTRACT_PATH_INGESTION_TIMESTAMP}')
|
|
9051
|
+
FROM lds_data
|
|
9052
|
+
WHERE key IS ?
|
|
9053
|
+
`;
|
|
9054
|
+
const results = await query(sql, [key]);
|
|
9055
|
+
const [timestamp] = results.rows.map((row) => row[0]);
|
|
9056
|
+
if (timestamp !== null) {
|
|
9057
|
+
const numericalTimestamp = Number(timestamp);
|
|
9058
|
+
if (isNaN(numericalTimestamp)) {
|
|
9059
|
+
return ingestionTimestamp;
|
|
9060
|
+
}
|
|
9061
|
+
// adjust the timestamp to account for ingestion processing time
|
|
9062
|
+
// 30s is used because this is the default record TTL
|
|
9063
|
+
ingestionTimestamp = numericalTimestamp - 30000;
|
|
9064
|
+
}
|
|
9065
|
+
return ingestionTimestamp;
|
|
9066
|
+
}
|
|
9044
9067
|
|
|
9045
9068
|
function findSpanningField(name) {
|
|
9046
9069
|
return (field) => {
|
|
@@ -9560,18 +9583,7 @@ async function fetchIngestionTimeStampFromDatabase(apiName, info, args, query) {
|
|
|
9560
9583
|
const key = buildKeyStringForRecordQuery(operation,
|
|
9561
9584
|
// join varables passed from query to the argument variables given from the AST
|
|
9562
9585
|
{ ...variableValues, ...args }, info.fieldNodes[0].arguments, apiName);
|
|
9563
|
-
|
|
9564
|
-
SELECT json_extract(metadata, '${JSON_EXTRACT_PATH_INGESTION_TIMESTAMP}')
|
|
9565
|
-
FROM lds_data
|
|
9566
|
-
WHERE key IS ?
|
|
9567
|
-
`;
|
|
9568
|
-
const results = await query(sql, [key]);
|
|
9569
|
-
const [timestamp] = results.rows.map((row) => row[0]);
|
|
9570
|
-
if (timestamp !== null && typeof timestamp === 'number') {
|
|
9571
|
-
// adjust the timestamp to account for ingestion processing time
|
|
9572
|
-
// 30s is used because this is the default record TTL
|
|
9573
|
-
ingestionTimestamp = timestamp - 30000;
|
|
9574
|
-
}
|
|
9586
|
+
return readIngestionTimestampForKey(key, query);
|
|
9575
9587
|
}
|
|
9576
9588
|
return ingestionTimestamp;
|
|
9577
9589
|
}
|
|
@@ -17916,4 +17928,4 @@ register({
|
|
|
17916
17928
|
});
|
|
17917
17929
|
|
|
17918
17930
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, registerReportObserver, reportGraphqlQueryParseError };
|
|
17919
|
-
// version: 1.
|
|
17931
|
+
// version: 1.267.0-b96a89847
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-mobile",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.267.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.
|
|
36
|
-
"@salesforce/lds-bindings": "^1.
|
|
37
|
-
"@salesforce/lds-instrumentation": "^1.
|
|
38
|
-
"@salesforce/lds-priming": "^1.
|
|
35
|
+
"@salesforce/lds-adapters-uiapi": "^1.267.0",
|
|
36
|
+
"@salesforce/lds-bindings": "^1.267.0",
|
|
37
|
+
"@salesforce/lds-instrumentation": "^1.267.0",
|
|
38
|
+
"@salesforce/lds-priming": "^1.267.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.
|
|
44
|
-
"@salesforce/lds-drafts": "^1.
|
|
45
|
-
"@salesforce/lds-drafts-adapters-uiapi": "^1.
|
|
46
|
-
"@salesforce/lds-graphql-eval": "^1.
|
|
47
|
-
"@salesforce/lds-network-adapter": "^1.
|
|
48
|
-
"@salesforce/lds-network-nimbus": "^1.
|
|
49
|
-
"@salesforce/lds-store-binary": "^1.
|
|
50
|
-
"@salesforce/lds-store-nimbus": "^1.
|
|
51
|
-
"@salesforce/lds-store-sql": "^1.
|
|
52
|
-
"@salesforce/lds-utils-adapters": "^1.
|
|
53
|
-
"@salesforce/nimbus-plugin-lds": "^1.
|
|
43
|
+
"@salesforce/lds-adapters-graphql": "^1.267.0",
|
|
44
|
+
"@salesforce/lds-drafts": "^1.267.0",
|
|
45
|
+
"@salesforce/lds-drafts-adapters-uiapi": "^1.267.0",
|
|
46
|
+
"@salesforce/lds-graphql-eval": "^1.267.0",
|
|
47
|
+
"@salesforce/lds-network-adapter": "^1.267.0",
|
|
48
|
+
"@salesforce/lds-network-nimbus": "^1.267.0",
|
|
49
|
+
"@salesforce/lds-store-binary": "^1.267.0",
|
|
50
|
+
"@salesforce/lds-store-nimbus": "^1.267.0",
|
|
51
|
+
"@salesforce/lds-store-sql": "^1.267.0",
|
|
52
|
+
"@salesforce/lds-utils-adapters": "^1.267.0",
|
|
53
|
+
"@salesforce/nimbus-plugin-lds": "^1.267.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
|
@@ -4374,9 +4374,12 @@ function rootRecordQuery(selection, input) {
|
|
|
4374
4374
|
// If there is no metadata for this query or it somehow lacks a timestamp
|
|
4375
4375
|
// skip setting the root timestamp
|
|
4376
4376
|
if (queryMetadata !== undefined && queryMetadata.ingestionTimestamp !== undefined) {
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4377
|
+
const timestamp = Number(queryMetadata.ingestionTimestamp);
|
|
4378
|
+
if (!isNaN(timestamp)) {
|
|
4379
|
+
// adjust the timestamp to account for ingestion processing time
|
|
4380
|
+
// 30s is used because this is the default record TTL
|
|
4381
|
+
input.rootTimestamp = timestamp - 30000;
|
|
4382
|
+
}
|
|
4380
4383
|
}
|
|
4381
4384
|
}
|
|
4382
4385
|
return recordQuery(selection, alias, apiName, [], input);
|
|
@@ -9041,6 +9044,26 @@ function findFieldInfo(objectInfo, fieldName) {
|
|
|
9041
9044
|
return values$2(objectInfo.fields).find((field) => field.apiName === fieldName ||
|
|
9042
9045
|
(field.dataType === 'Reference' && field.relationshipName === fieldName));
|
|
9043
9046
|
}
|
|
9047
|
+
async function readIngestionTimestampForKey(key, query) {
|
|
9048
|
+
let ingestionTimestamp = 0;
|
|
9049
|
+
const sql = `
|
|
9050
|
+
SELECT json_extract(metadata, '${JSON_EXTRACT_PATH_INGESTION_TIMESTAMP}')
|
|
9051
|
+
FROM lds_data
|
|
9052
|
+
WHERE key IS ?
|
|
9053
|
+
`;
|
|
9054
|
+
const results = await query(sql, [key]);
|
|
9055
|
+
const [timestamp] = results.rows.map((row) => row[0]);
|
|
9056
|
+
if (timestamp !== null) {
|
|
9057
|
+
const numericalTimestamp = Number(timestamp);
|
|
9058
|
+
if (isNaN(numericalTimestamp)) {
|
|
9059
|
+
return ingestionTimestamp;
|
|
9060
|
+
}
|
|
9061
|
+
// adjust the timestamp to account for ingestion processing time
|
|
9062
|
+
// 30s is used because this is the default record TTL
|
|
9063
|
+
ingestionTimestamp = numericalTimestamp - 30000;
|
|
9064
|
+
}
|
|
9065
|
+
return ingestionTimestamp;
|
|
9066
|
+
}
|
|
9044
9067
|
|
|
9045
9068
|
function findSpanningField(name) {
|
|
9046
9069
|
return (field) => {
|
|
@@ -9560,18 +9583,7 @@ async function fetchIngestionTimeStampFromDatabase(apiName, info, args, query) {
|
|
|
9560
9583
|
const key = buildKeyStringForRecordQuery(operation,
|
|
9561
9584
|
// join varables passed from query to the argument variables given from the AST
|
|
9562
9585
|
{ ...variableValues, ...args }, info.fieldNodes[0].arguments, apiName);
|
|
9563
|
-
|
|
9564
|
-
SELECT json_extract(metadata, '${JSON_EXTRACT_PATH_INGESTION_TIMESTAMP}')
|
|
9565
|
-
FROM lds_data
|
|
9566
|
-
WHERE key IS ?
|
|
9567
|
-
`;
|
|
9568
|
-
const results = await query(sql, [key]);
|
|
9569
|
-
const [timestamp] = results.rows.map((row) => row[0]);
|
|
9570
|
-
if (timestamp !== null && typeof timestamp === 'number') {
|
|
9571
|
-
// adjust the timestamp to account for ingestion processing time
|
|
9572
|
-
// 30s is used because this is the default record TTL
|
|
9573
|
-
ingestionTimestamp = timestamp - 30000;
|
|
9574
|
-
}
|
|
9586
|
+
return readIngestionTimestampForKey(key, query);
|
|
9575
9587
|
}
|
|
9576
9588
|
return ingestionTimestamp;
|
|
9577
9589
|
}
|
|
@@ -17916,4 +17928,4 @@ register({
|
|
|
17916
17928
|
});
|
|
17917
17929
|
|
|
17918
17930
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, registerReportObserver, reportGraphqlQueryParseError };
|
|
17919
|
-
// version: 1.
|
|
17931
|
+
// version: 1.267.0-b96a89847
|