@salesforce/lds-worker-api 1.266.0 → 1.268.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.
|
@@ -1034,4 +1034,4 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
1034
1034
|
}
|
|
1035
1035
|
|
|
1036
1036
|
export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
|
|
1037
|
-
// version: 1.
|
|
1037
|
+
// version: 1.268.0-cd9e2e269
|
|
@@ -4140,7 +4140,7 @@ function withDefaultLuvio(callback) {
|
|
|
4140
4140
|
}
|
|
4141
4141
|
callbacks.push(callback);
|
|
4142
4142
|
}
|
|
4143
|
-
// version: 1.
|
|
4143
|
+
// version: 1.268.0-cd9e2e269
|
|
4144
4144
|
|
|
4145
4145
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
4146
4146
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -15648,7 +15648,7 @@ function gql(literals, ...subs) {
|
|
|
15648
15648
|
}
|
|
15649
15649
|
return superResult;
|
|
15650
15650
|
}
|
|
15651
|
-
// version: 1.
|
|
15651
|
+
// version: 1.268.0-cd9e2e269
|
|
15652
15652
|
|
|
15653
15653
|
function unwrap(data) {
|
|
15654
15654
|
// The lwc-luvio bindings import a function from lwc called "unwrap".
|
|
@@ -16573,7 +16573,7 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
|
|
|
16573
16573
|
const { apiFamily, name } = metadata;
|
|
16574
16574
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
16575
16575
|
}
|
|
16576
|
-
// version: 1.
|
|
16576
|
+
// version: 1.268.0-cd9e2e269
|
|
16577
16577
|
|
|
16578
16578
|
/**
|
|
16579
16579
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -43141,7 +43141,7 @@ withDefaultLuvio((luvio) => {
|
|
|
43141
43141
|
throttle(60, 60000, createLDSAdapter(luvio, 'notifyListInfoUpdateAvailable', notifyUpdateAvailableFactory$1));
|
|
43142
43142
|
throttle(60, 60000, createLDSAdapter(luvio, 'notifyQuickActionDefaultsUpdateAvailable', notifyUpdateAvailableFactory));
|
|
43143
43143
|
});
|
|
43144
|
-
// version: 1.
|
|
43144
|
+
// version: 1.268.0-59af8a121
|
|
43145
43145
|
|
|
43146
43146
|
var ldsIdempotencyWriteDisabled = {
|
|
43147
43147
|
isOpen: function (e) {
|
|
@@ -47639,9 +47639,12 @@ function rootRecordQuery(selection, input) {
|
|
|
47639
47639
|
// If there is no metadata for this query or it somehow lacks a timestamp
|
|
47640
47640
|
// skip setting the root timestamp
|
|
47641
47641
|
if (queryMetadata !== undefined && queryMetadata.ingestionTimestamp !== undefined) {
|
|
47642
|
-
|
|
47643
|
-
|
|
47644
|
-
|
|
47642
|
+
const timestamp = Number(queryMetadata.ingestionTimestamp);
|
|
47643
|
+
if (!isNaN(timestamp)) {
|
|
47644
|
+
// adjust the timestamp to account for ingestion processing time
|
|
47645
|
+
// 30s is used because this is the default record TTL
|
|
47646
|
+
input.rootTimestamp = timestamp - 30000;
|
|
47647
|
+
}
|
|
47645
47648
|
}
|
|
47646
47649
|
}
|
|
47647
47650
|
return recordQuery(selection, alias, apiName, [], input);
|
|
@@ -52292,6 +52295,26 @@ function findFieldInfo(objectInfo, fieldName) {
|
|
|
52292
52295
|
return values$2(objectInfo.fields).find((field) => field.apiName === fieldName ||
|
|
52293
52296
|
(field.dataType === 'Reference' && field.relationshipName === fieldName));
|
|
52294
52297
|
}
|
|
52298
|
+
async function readIngestionTimestampForKey(key, query) {
|
|
52299
|
+
let ingestionTimestamp = 0;
|
|
52300
|
+
const sql = `
|
|
52301
|
+
SELECT json_extract(metadata, '${JSON_EXTRACT_PATH_INGESTION_TIMESTAMP}')
|
|
52302
|
+
FROM lds_data
|
|
52303
|
+
WHERE key IS ?
|
|
52304
|
+
`;
|
|
52305
|
+
const results = await query(sql, [key]);
|
|
52306
|
+
const [timestamp] = results.rows.map((row) => row[0]);
|
|
52307
|
+
if (timestamp !== null) {
|
|
52308
|
+
const numericalTimestamp = Number(timestamp);
|
|
52309
|
+
if (isNaN(numericalTimestamp)) {
|
|
52310
|
+
return ingestionTimestamp;
|
|
52311
|
+
}
|
|
52312
|
+
// adjust the timestamp to account for ingestion processing time
|
|
52313
|
+
// 30s is used because this is the default record TTL
|
|
52314
|
+
ingestionTimestamp = numericalTimestamp - 30000;
|
|
52315
|
+
}
|
|
52316
|
+
return ingestionTimestamp;
|
|
52317
|
+
}
|
|
52295
52318
|
|
|
52296
52319
|
function findSpanningField(name) {
|
|
52297
52320
|
return (field) => {
|
|
@@ -52811,18 +52834,7 @@ async function fetchIngestionTimeStampFromDatabase(apiName, info, args, query) {
|
|
|
52811
52834
|
const key = buildKeyStringForRecordQuery(operation,
|
|
52812
52835
|
// join varables passed from query to the argument variables given from the AST
|
|
52813
52836
|
{ ...variableValues, ...args }, info.fieldNodes[0].arguments, apiName);
|
|
52814
|
-
|
|
52815
|
-
SELECT json_extract(metadata, '${JSON_EXTRACT_PATH_INGESTION_TIMESTAMP}')
|
|
52816
|
-
FROM lds_data
|
|
52817
|
-
WHERE key IS ?
|
|
52818
|
-
`;
|
|
52819
|
-
const results = await query(sql, [key]);
|
|
52820
|
-
const [timestamp] = results.rows.map((row) => row[0]);
|
|
52821
|
-
if (timestamp !== null && typeof timestamp === 'number') {
|
|
52822
|
-
// adjust the timestamp to account for ingestion processing time
|
|
52823
|
-
// 30s is used because this is the default record TTL
|
|
52824
|
-
ingestionTimestamp = timestamp - 30000;
|
|
52825
|
-
}
|
|
52837
|
+
return readIngestionTimestampForKey(key, query);
|
|
52826
52838
|
}
|
|
52827
52839
|
return ingestionTimestamp;
|
|
52828
52840
|
}
|
|
@@ -61019,7 +61031,7 @@ register$1({
|
|
|
61019
61031
|
id: '@salesforce/lds-network-adapter',
|
|
61020
61032
|
instrument: instrument$2,
|
|
61021
61033
|
});
|
|
61022
|
-
// version: 1.
|
|
61034
|
+
// version: 1.268.0-cd9e2e269
|
|
61023
61035
|
|
|
61024
61036
|
const { create: create$3, keys: keys$3 } = Object;
|
|
61025
61037
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
@@ -79348,7 +79360,7 @@ register$1({
|
|
|
79348
79360
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
79349
79361
|
instrument: instrument$1,
|
|
79350
79362
|
});
|
|
79351
|
-
// version: 1.
|
|
79363
|
+
// version: 1.268.0-59af8a121
|
|
79352
79364
|
|
|
79353
79365
|
// On core the unstable adapters are re-exported with different names,
|
|
79354
79366
|
// we want to match them here.
|
|
@@ -81599,7 +81611,7 @@ withDefaultLuvio((luvio) => {
|
|
|
81599
81611
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
81600
81612
|
graphQLImperative = ldsAdapter;
|
|
81601
81613
|
});
|
|
81602
|
-
// version: 1.
|
|
81614
|
+
// version: 1.268.0-59af8a121
|
|
81603
81615
|
|
|
81604
81616
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
81605
81617
|
__proto__: null,
|
|
@@ -82297,7 +82309,7 @@ const callbacks$1 = [];
|
|
|
82297
82309
|
function register(r) {
|
|
82298
82310
|
callbacks$1.forEach((callback) => callback(r));
|
|
82299
82311
|
}
|
|
82300
|
-
// version: 1.
|
|
82312
|
+
// version: 1.268.0-cd9e2e269
|
|
82301
82313
|
|
|
82302
82314
|
/**
|
|
82303
82315
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -87202,4 +87214,4 @@ const { luvio } = getRuntime();
|
|
|
87202
87214
|
setDefaultLuvio({ luvio });
|
|
87203
87215
|
|
|
87204
87216
|
export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
|
|
87205
|
-
// version: 1.
|
|
87217
|
+
// version: 1.268.0-cd9e2e269
|
|
@@ -4146,7 +4146,7 @@
|
|
|
4146
4146
|
}
|
|
4147
4147
|
callbacks.push(callback);
|
|
4148
4148
|
}
|
|
4149
|
-
// version: 1.
|
|
4149
|
+
// version: 1.268.0-cd9e2e269
|
|
4150
4150
|
|
|
4151
4151
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
4152
4152
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -15654,7 +15654,7 @@
|
|
|
15654
15654
|
}
|
|
15655
15655
|
return superResult;
|
|
15656
15656
|
}
|
|
15657
|
-
// version: 1.
|
|
15657
|
+
// version: 1.268.0-cd9e2e269
|
|
15658
15658
|
|
|
15659
15659
|
function unwrap(data) {
|
|
15660
15660
|
// The lwc-luvio bindings import a function from lwc called "unwrap".
|
|
@@ -16579,7 +16579,7 @@
|
|
|
16579
16579
|
const { apiFamily, name } = metadata;
|
|
16580
16580
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
16581
16581
|
}
|
|
16582
|
-
// version: 1.
|
|
16582
|
+
// version: 1.268.0-cd9e2e269
|
|
16583
16583
|
|
|
16584
16584
|
/**
|
|
16585
16585
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -43147,7 +43147,7 @@
|
|
|
43147
43147
|
throttle(60, 60000, createLDSAdapter(luvio, 'notifyListInfoUpdateAvailable', notifyUpdateAvailableFactory$1));
|
|
43148
43148
|
throttle(60, 60000, createLDSAdapter(luvio, 'notifyQuickActionDefaultsUpdateAvailable', notifyUpdateAvailableFactory));
|
|
43149
43149
|
});
|
|
43150
|
-
// version: 1.
|
|
43150
|
+
// version: 1.268.0-59af8a121
|
|
43151
43151
|
|
|
43152
43152
|
var ldsIdempotencyWriteDisabled = {
|
|
43153
43153
|
isOpen: function (e) {
|
|
@@ -47645,9 +47645,12 @@
|
|
|
47645
47645
|
// If there is no metadata for this query or it somehow lacks a timestamp
|
|
47646
47646
|
// skip setting the root timestamp
|
|
47647
47647
|
if (queryMetadata !== undefined && queryMetadata.ingestionTimestamp !== undefined) {
|
|
47648
|
-
|
|
47649
|
-
|
|
47650
|
-
|
|
47648
|
+
const timestamp = Number(queryMetadata.ingestionTimestamp);
|
|
47649
|
+
if (!isNaN(timestamp)) {
|
|
47650
|
+
// adjust the timestamp to account for ingestion processing time
|
|
47651
|
+
// 30s is used because this is the default record TTL
|
|
47652
|
+
input.rootTimestamp = timestamp - 30000;
|
|
47653
|
+
}
|
|
47651
47654
|
}
|
|
47652
47655
|
}
|
|
47653
47656
|
return recordQuery(selection, alias, apiName, [], input);
|
|
@@ -52298,6 +52301,26 @@
|
|
|
52298
52301
|
return values$2(objectInfo.fields).find((field) => field.apiName === fieldName ||
|
|
52299
52302
|
(field.dataType === 'Reference' && field.relationshipName === fieldName));
|
|
52300
52303
|
}
|
|
52304
|
+
async function readIngestionTimestampForKey(key, query) {
|
|
52305
|
+
let ingestionTimestamp = 0;
|
|
52306
|
+
const sql = `
|
|
52307
|
+
SELECT json_extract(metadata, '${JSON_EXTRACT_PATH_INGESTION_TIMESTAMP}')
|
|
52308
|
+
FROM lds_data
|
|
52309
|
+
WHERE key IS ?
|
|
52310
|
+
`;
|
|
52311
|
+
const results = await query(sql, [key]);
|
|
52312
|
+
const [timestamp] = results.rows.map((row) => row[0]);
|
|
52313
|
+
if (timestamp !== null) {
|
|
52314
|
+
const numericalTimestamp = Number(timestamp);
|
|
52315
|
+
if (isNaN(numericalTimestamp)) {
|
|
52316
|
+
return ingestionTimestamp;
|
|
52317
|
+
}
|
|
52318
|
+
// adjust the timestamp to account for ingestion processing time
|
|
52319
|
+
// 30s is used because this is the default record TTL
|
|
52320
|
+
ingestionTimestamp = numericalTimestamp - 30000;
|
|
52321
|
+
}
|
|
52322
|
+
return ingestionTimestamp;
|
|
52323
|
+
}
|
|
52301
52324
|
|
|
52302
52325
|
function findSpanningField(name) {
|
|
52303
52326
|
return (field) => {
|
|
@@ -52817,18 +52840,7 @@
|
|
|
52817
52840
|
const key = buildKeyStringForRecordQuery(operation,
|
|
52818
52841
|
// join varables passed from query to the argument variables given from the AST
|
|
52819
52842
|
{ ...variableValues, ...args }, info.fieldNodes[0].arguments, apiName);
|
|
52820
|
-
|
|
52821
|
-
SELECT json_extract(metadata, '${JSON_EXTRACT_PATH_INGESTION_TIMESTAMP}')
|
|
52822
|
-
FROM lds_data
|
|
52823
|
-
WHERE key IS ?
|
|
52824
|
-
`;
|
|
52825
|
-
const results = await query(sql, [key]);
|
|
52826
|
-
const [timestamp] = results.rows.map((row) => row[0]);
|
|
52827
|
-
if (timestamp !== null && typeof timestamp === 'number') {
|
|
52828
|
-
// adjust the timestamp to account for ingestion processing time
|
|
52829
|
-
// 30s is used because this is the default record TTL
|
|
52830
|
-
ingestionTimestamp = timestamp - 30000;
|
|
52831
|
-
}
|
|
52843
|
+
return readIngestionTimestampForKey(key, query);
|
|
52832
52844
|
}
|
|
52833
52845
|
return ingestionTimestamp;
|
|
52834
52846
|
}
|
|
@@ -61025,7 +61037,7 @@
|
|
|
61025
61037
|
id: '@salesforce/lds-network-adapter',
|
|
61026
61038
|
instrument: instrument$2,
|
|
61027
61039
|
});
|
|
61028
|
-
// version: 1.
|
|
61040
|
+
// version: 1.268.0-cd9e2e269
|
|
61029
61041
|
|
|
61030
61042
|
const { create: create$3, keys: keys$3 } = Object;
|
|
61031
61043
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
@@ -79354,7 +79366,7 @@
|
|
|
79354
79366
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
79355
79367
|
instrument: instrument$1,
|
|
79356
79368
|
});
|
|
79357
|
-
// version: 1.
|
|
79369
|
+
// version: 1.268.0-59af8a121
|
|
79358
79370
|
|
|
79359
79371
|
// On core the unstable adapters are re-exported with different names,
|
|
79360
79372
|
// we want to match them here.
|
|
@@ -81605,7 +81617,7 @@
|
|
|
81605
81617
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
81606
81618
|
graphQLImperative = ldsAdapter;
|
|
81607
81619
|
});
|
|
81608
|
-
// version: 1.
|
|
81620
|
+
// version: 1.268.0-59af8a121
|
|
81609
81621
|
|
|
81610
81622
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
81611
81623
|
__proto__: null,
|
|
@@ -82303,7 +82315,7 @@
|
|
|
82303
82315
|
function register(r) {
|
|
82304
82316
|
callbacks$1.forEach((callback) => callback(r));
|
|
82305
82317
|
}
|
|
82306
|
-
// version: 1.
|
|
82318
|
+
// version: 1.268.0-cd9e2e269
|
|
82307
82319
|
|
|
82308
82320
|
/**
|
|
82309
82321
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -87226,4 +87238,4 @@
|
|
|
87226
87238
|
exports.subscribeToAdapter = subscribeToAdapter;
|
|
87227
87239
|
|
|
87228
87240
|
}));
|
|
87229
|
-
// version: 1.
|
|
87241
|
+
// version: 1.268.0-cd9e2e269
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-worker-api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.268.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "dist/standalone/es/lds-worker-api.js",
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@oat-sa/rollup-plugin-wildcard-external": "^1.0.0",
|
|
38
|
-
"@salesforce/lds-adapters-graphql": "^1.
|
|
39
|
-
"@salesforce/lds-adapters-uiapi": "^1.
|
|
40
|
-
"@salesforce/lds-default-luvio": "^1.
|
|
41
|
-
"@salesforce/lds-drafts": "^1.
|
|
42
|
-
"@salesforce/lds-graphql-parser": "^1.
|
|
43
|
-
"@salesforce/lds-luvio-engine": "^1.
|
|
44
|
-
"@salesforce/lds-priming": "^1.
|
|
45
|
-
"@salesforce/lds-runtime-mobile": "^1.
|
|
46
|
-
"@salesforce/nimbus-plugin-lds": "^1.
|
|
38
|
+
"@salesforce/lds-adapters-graphql": "^1.268.0",
|
|
39
|
+
"@salesforce/lds-adapters-uiapi": "^1.268.0",
|
|
40
|
+
"@salesforce/lds-default-luvio": "^1.268.0",
|
|
41
|
+
"@salesforce/lds-drafts": "^1.268.0",
|
|
42
|
+
"@salesforce/lds-graphql-parser": "^1.268.0",
|
|
43
|
+
"@salesforce/lds-luvio-engine": "^1.268.0",
|
|
44
|
+
"@salesforce/lds-priming": "^1.268.0",
|
|
45
|
+
"@salesforce/lds-runtime-mobile": "^1.268.0",
|
|
46
|
+
"@salesforce/nimbus-plugin-lds": "^1.268.0",
|
|
47
47
|
"ajv": "^8.11.0",
|
|
48
48
|
"glob": "^7.1.5",
|
|
49
49
|
"nimbus-types": "^2.0.0-alpha1",
|