@salesforce/lds-worker-api 1.284.0 → 1.286.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.
|
@@ -1074,4 +1074,4 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
1074
1074
|
}
|
|
1075
1075
|
|
|
1076
1076
|
export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
|
|
1077
|
-
// version: 1.
|
|
1077
|
+
// version: 1.286.0-09e7e5207
|
|
@@ -521,6 +521,25 @@ class StoreKeySet {
|
|
|
521
521
|
}
|
|
522
522
|
}
|
|
523
523
|
|
|
524
|
+
function defaultTrimPolicy(data, deallocateFn) {
|
|
525
|
+
return new Promise((resolve) => {
|
|
526
|
+
let deallocatedCount = 0;
|
|
527
|
+
const { pendingTrimKeys, retainedIds, metadata } = data;
|
|
528
|
+
const now = Date.now();
|
|
529
|
+
pendingTrimKeys.forEach((key) => {
|
|
530
|
+
const recordExpiration = metadata[key];
|
|
531
|
+
if (retainedIds[key] !== undefined ||
|
|
532
|
+
recordExpiration === undefined ||
|
|
533
|
+
(recordExpiration !== undefined && recordExpiration.expirationTimestamp >= now)) {
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
536
|
+
deallocateFn(key);
|
|
537
|
+
deallocatedCount++;
|
|
538
|
+
});
|
|
539
|
+
resolve({ deallocatedCount });
|
|
540
|
+
});
|
|
541
|
+
}
|
|
542
|
+
|
|
524
543
|
const Serialized_StringKey_Version = '1';
|
|
525
544
|
function hasOverlappingIds$1(snapshot, visitedIds) {
|
|
526
545
|
const { length: len } = visitedIds;
|
|
@@ -589,6 +608,7 @@ class StringKeyInMemoryStore {
|
|
|
589
608
|
if (options.initialData) {
|
|
590
609
|
this.deserialize(options.initialData, options.resetInitialDataTtls);
|
|
591
610
|
}
|
|
611
|
+
this.trimPolicy = options.customTrimPolicy || defaultTrimPolicy;
|
|
592
612
|
}
|
|
593
613
|
// interface methods
|
|
594
614
|
readEntry(key) {
|
|
@@ -962,22 +982,15 @@ class StringKeyInMemoryStore {
|
|
|
962
982
|
scheduleTrim() {
|
|
963
983
|
if (this.trimTask === null) {
|
|
964
984
|
this.trimTask = () => {
|
|
965
|
-
const { metadata, retainedIds,
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
recordExpiration === undefined ||
|
|
972
|
-
(recordExpiration !== undefined &&
|
|
973
|
-
recordExpiration.expirationTimestamp >= now)) {
|
|
974
|
-
return;
|
|
985
|
+
const { metadata, pendingTrimKeys, retainedIds, records: storeRecords, dealloc, } = this;
|
|
986
|
+
return this.trimPolicy({ metadata, pendingTrimKeys, retainedIds, storeRecords }, dealloc.bind(this)).then((result) => {
|
|
987
|
+
this.pendingTrimKeys.clear();
|
|
988
|
+
const { trimKeysSkipped } = result;
|
|
989
|
+
if (trimKeysSkipped !== undefined) {
|
|
990
|
+
this.pendingTrimKeys = trimKeysSkipped;
|
|
975
991
|
}
|
|
976
|
-
|
|
977
|
-
deallocCount++;
|
|
992
|
+
return result;
|
|
978
993
|
});
|
|
979
|
-
pendingTrimKeys.clear();
|
|
980
|
-
return deallocCount;
|
|
981
994
|
};
|
|
982
995
|
this.scheduler(this.trimTask, () => {
|
|
983
996
|
this.trimTask = null;
|
|
@@ -1716,7 +1729,7 @@ class InMemoryStore {
|
|
|
1716
1729
|
deallocCount++;
|
|
1717
1730
|
});
|
|
1718
1731
|
pendingTrims.clear();
|
|
1719
|
-
return deallocCount;
|
|
1732
|
+
return Promise.resolve({ deallocatedCount: deallocCount });
|
|
1720
1733
|
};
|
|
1721
1734
|
this.scheduler(this.trimTask, () => {
|
|
1722
1735
|
this.trimTask = null;
|
|
@@ -4049,7 +4062,7 @@ function createResourceParamsImpl(config, configMetadata) {
|
|
|
4049
4062
|
}
|
|
4050
4063
|
return resourceParams;
|
|
4051
4064
|
}
|
|
4052
|
-
// engine version: 0.154.
|
|
4065
|
+
// engine version: 0.154.16-5cc35392
|
|
4053
4066
|
|
|
4054
4067
|
/**
|
|
4055
4068
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -4177,7 +4190,7 @@ function withDefaultLuvio(callback) {
|
|
|
4177
4190
|
}
|
|
4178
4191
|
callbacks.push(callback);
|
|
4179
4192
|
}
|
|
4180
|
-
// version: 1.
|
|
4193
|
+
// version: 1.286.0-09e7e5207
|
|
4181
4194
|
|
|
4182
4195
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
4183
4196
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -15685,7 +15698,7 @@ function gql(literals, ...subs) {
|
|
|
15685
15698
|
}
|
|
15686
15699
|
return superResult;
|
|
15687
15700
|
}
|
|
15688
|
-
// version: 1.
|
|
15701
|
+
// version: 1.286.0-09e7e5207
|
|
15689
15702
|
|
|
15690
15703
|
function unwrap(data) {
|
|
15691
15704
|
// The lwc-luvio bindings import a function from lwc called "unwrap".
|
|
@@ -16610,7 +16623,7 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
|
|
|
16610
16623
|
const { apiFamily, name } = metadata;
|
|
16611
16624
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
16612
16625
|
}
|
|
16613
|
-
// version: 1.
|
|
16626
|
+
// version: 1.286.0-09e7e5207
|
|
16614
16627
|
|
|
16615
16628
|
/**
|
|
16616
16629
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -16709,7 +16722,7 @@ var TypeCheckShapes;
|
|
|
16709
16722
|
TypeCheckShapes[TypeCheckShapes["Integer"] = 3] = "Integer";
|
|
16710
16723
|
TypeCheckShapes[TypeCheckShapes["Unsupported"] = 4] = "Unsupported";
|
|
16711
16724
|
})(TypeCheckShapes || (TypeCheckShapes = {}));
|
|
16712
|
-
// engine version: 0.154.
|
|
16725
|
+
// engine version: 0.154.16-5cc35392
|
|
16713
16726
|
|
|
16714
16727
|
const { keys: ObjectKeys$3, create: ObjectCreate$3 } = Object;
|
|
16715
16728
|
|
|
@@ -39901,7 +39914,7 @@ const getSearchResultsAdapterFactory = (luvio) => function UiApi__getSearchResul
|
|
|
39901
39914
|
buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$6);
|
|
39902
39915
|
};
|
|
39903
39916
|
|
|
39904
|
-
const TTL$5 = 200;
|
|
39917
|
+
const TTL$5$1 = 200;
|
|
39905
39918
|
const VERSION$7$1 = "3102453bf10ea449d9665914d5f5febf";
|
|
39906
39919
|
const RepresentationType$8 = 'KeywordSearchResultsSummaryRepresentation';
|
|
39907
39920
|
function keyBuilder$c$1(luvio, config) {
|
|
@@ -39934,7 +39947,7 @@ function equals$7(existing, incoming) {
|
|
|
39934
39947
|
}
|
|
39935
39948
|
const ingest$3$1 = function KeywordSearchResultsSummaryRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
39936
39949
|
const key = keyBuilderFromType$5(luvio, input);
|
|
39937
|
-
const ttlToUse = TTL$5;
|
|
39950
|
+
const ttlToUse = TTL$5$1;
|
|
39938
39951
|
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "UiApi", VERSION$7$1, RepresentationType$8, equals$7);
|
|
39939
39952
|
return createLink$3(key);
|
|
39940
39953
|
};
|
|
@@ -39977,7 +39990,7 @@ function ingestError$1$1(luvio, params, error, snapshotRefresh) {
|
|
|
39977
39990
|
const key = keyBuilder$b$1(luvio, params);
|
|
39978
39991
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
39979
39992
|
const storeMetadataParams = {
|
|
39980
|
-
ttl: TTL$5,
|
|
39993
|
+
ttl: TTL$5$1,
|
|
39981
39994
|
namespace: keyPrefix$2,
|
|
39982
39995
|
version: VERSION$7$1,
|
|
39983
39996
|
representationName: RepresentationType$8
|
|
@@ -44151,7 +44164,7 @@ withDefaultLuvio((luvio) => {
|
|
|
44151
44164
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
44152
44165
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
44153
44166
|
});
|
|
44154
|
-
// version: 1.
|
|
44167
|
+
// version: 1.286.0-27bef7c46
|
|
44155
44168
|
|
|
44156
44169
|
var ldsIdempotencyWriteDisabled = {
|
|
44157
44170
|
isOpen: function (e) {
|
|
@@ -49785,10 +49798,6 @@ class DurableDraftQueue {
|
|
|
49785
49798
|
switch (result) {
|
|
49786
49799
|
case ProcessActionResult.BLOCKED_ON_ERROR:
|
|
49787
49800
|
this.state = DraftQueueState.Error;
|
|
49788
|
-
await this.notifyChangedListeners({
|
|
49789
|
-
type: DraftQueueEventType.QueueStateChanged,
|
|
49790
|
-
state: this.state,
|
|
49791
|
-
});
|
|
49792
49801
|
return Promise.reject();
|
|
49793
49802
|
default:
|
|
49794
49803
|
return Promise.resolve();
|
|
@@ -49934,6 +49943,10 @@ class DurableDraftQueue {
|
|
|
49934
49943
|
if (status === DraftActionStatus.Error) {
|
|
49935
49944
|
this.state = DraftQueueState.Error;
|
|
49936
49945
|
this.processingAction = undefined;
|
|
49946
|
+
this.notifyChangedListeners({
|
|
49947
|
+
type: DraftQueueEventType.ActionFailed,
|
|
49948
|
+
action: action,
|
|
49949
|
+
});
|
|
49937
49950
|
return ProcessActionResult.BLOCKED_ON_ERROR;
|
|
49938
49951
|
}
|
|
49939
49952
|
if (id === this.uploadingActionId) {
|
|
@@ -57000,6 +57013,21 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
|
|
|
57000
57013
|
}
|
|
57001
57014
|
return fields;
|
|
57002
57015
|
}
|
|
57016
|
+
getRedirectMappings(action) {
|
|
57017
|
+
if (action.data.method === 'post' && action.response.status === 204) {
|
|
57018
|
+
return undefined;
|
|
57019
|
+
}
|
|
57020
|
+
return super.getRedirectMappings(action);
|
|
57021
|
+
}
|
|
57022
|
+
async handleActionCompleted(completedAction, queueOperations, allHandlers) {
|
|
57023
|
+
if (completedAction.response.status === 204 && completedAction.data.method === 'post') {
|
|
57024
|
+
// if we get a 204 it means the record creation was successful but we don't have the record to ingest
|
|
57025
|
+
// remove the synthesized draft and do not try to ingest the response
|
|
57026
|
+
await this.evictKey(completedAction.tag);
|
|
57027
|
+
return;
|
|
57028
|
+
}
|
|
57029
|
+
return super.handleActionCompleted(completedAction, queueOperations, allHandlers);
|
|
57030
|
+
}
|
|
57003
57031
|
async fetchReferenceRecord(referenceFields) {
|
|
57004
57032
|
const promises = referenceFields.map(async (referenceFieldInfo) => {
|
|
57005
57033
|
const apiName = await this.identifyApiName(referenceFieldInfo.id, referenceFieldInfo.field);
|
|
@@ -60607,11 +60635,17 @@ class NimbusSqliteStore {
|
|
|
60607
60635
|
return this.getTable(segment).getAll(segment);
|
|
60608
60636
|
}
|
|
60609
60637
|
setEntries(entries, segment) {
|
|
60638
|
+
if (keys$9(entries).length === 0) {
|
|
60639
|
+
return Promise.resolve();
|
|
60640
|
+
}
|
|
60610
60641
|
const table = this.getTable(segment);
|
|
60611
60642
|
const upsertOperation = table.entriesToUpsertOperations(entries, segment);
|
|
60612
60643
|
return this.batchOperationAsPromise([upsertOperation]);
|
|
60613
60644
|
}
|
|
60614
60645
|
setMetadata(entries, segment) {
|
|
60646
|
+
if (keys$9(entries).length === 0) {
|
|
60647
|
+
return Promise.resolve();
|
|
60648
|
+
}
|
|
60615
60649
|
const table = this.getTable(segment);
|
|
60616
60650
|
let operation;
|
|
60617
60651
|
if (this.supportsBatchUpdates) {
|
|
@@ -60628,32 +60662,41 @@ class NimbusSqliteStore {
|
|
|
60628
60662
|
batchOperations(operations) {
|
|
60629
60663
|
const sqliteOperations = operations.reduce((acc, cur) => {
|
|
60630
60664
|
if (cur.type === 'setEntries') {
|
|
60631
|
-
|
|
60632
|
-
|
|
60665
|
+
if (keys$9(cur.entries).length > 0) {
|
|
60666
|
+
const table = this.getTable(cur.segment);
|
|
60667
|
+
acc.push(table.entriesToUpsertOperations(cur.entries, cur.segment));
|
|
60668
|
+
}
|
|
60633
60669
|
}
|
|
60634
60670
|
else if (cur.type === 'setMetadata') {
|
|
60635
|
-
|
|
60636
|
-
|
|
60637
|
-
|
|
60638
|
-
|
|
60639
|
-
|
|
60640
|
-
|
|
60641
|
-
|
|
60642
|
-
|
|
60643
|
-
|
|
60644
|
-
|
|
60671
|
+
if (keys$9(cur.entries).length > 0) {
|
|
60672
|
+
const table = this.getTable(cur.segment);
|
|
60673
|
+
if (this.supportsBatchUpdates) {
|
|
60674
|
+
acc.push(table.metadataToUpdateOperations(cur.entries, cur.segment));
|
|
60675
|
+
}
|
|
60676
|
+
else {
|
|
60677
|
+
const upsert = table.entriesToUpsertOperations(cur.entries, cur.segment);
|
|
60678
|
+
// manually set the context type on the upsert so notifications do not notify rebuilds without
|
|
60679
|
+
// plugin updates
|
|
60680
|
+
upsert.context.type = 'setMetadata';
|
|
60681
|
+
acc.push(upsert);
|
|
60682
|
+
}
|
|
60645
60683
|
}
|
|
60646
60684
|
}
|
|
60647
60685
|
else {
|
|
60648
|
-
|
|
60686
|
+
if (cur.ids.length > 0) {
|
|
60687
|
+
acc.push(this.idsToDeleteOperation(cur.ids, cur.segment));
|
|
60688
|
+
}
|
|
60649
60689
|
}
|
|
60650
60690
|
return acc;
|
|
60651
60691
|
}, []);
|
|
60652
|
-
return
|
|
60692
|
+
return sqliteOperations.length === 0
|
|
60693
|
+
? Promise.resolve()
|
|
60694
|
+
: this.batchOperationAsPromise(sqliteOperations);
|
|
60653
60695
|
}
|
|
60654
60696
|
evictEntries(entryIds, segment) {
|
|
60655
|
-
|
|
60656
|
-
|
|
60697
|
+
return entryIds.length === 0
|
|
60698
|
+
? Promise.resolve()
|
|
60699
|
+
: this.batchOperationAsPromise([this.idsToDeleteOperation(entryIds, segment)]);
|
|
60657
60700
|
}
|
|
60658
60701
|
registerOnChangedListener(listener) {
|
|
60659
60702
|
let unsubscribeId = undefined;
|
|
@@ -62110,6 +62153,74 @@ function primingSessionFactory(config) {
|
|
|
62110
62153
|
return instrumentPrimingSession(session);
|
|
62111
62154
|
}
|
|
62112
62155
|
|
|
62156
|
+
const DEFAULT_MAX_RECORD_COUNT = 80000;
|
|
62157
|
+
const DEFAULT_MAX_BATCH_SIZE = 200;
|
|
62158
|
+
async function aggressiveTrim(data, deallocateFn, options = {}) {
|
|
62159
|
+
const maxStoreRecords = options.maxStoreRecords !== undefined ? options.maxStoreRecords : DEFAULT_MAX_RECORD_COUNT;
|
|
62160
|
+
const batchSize = options.batchSize !== undefined ? options.batchSize : DEFAULT_MAX_BATCH_SIZE;
|
|
62161
|
+
let deallocatedCount = 0;
|
|
62162
|
+
const { pendingTrimKeys, retainedIds, storeRecords } = data;
|
|
62163
|
+
const storeKeyLength = keys$1$1(storeRecords).length;
|
|
62164
|
+
if (storeKeyLength <= maxStoreRecords) {
|
|
62165
|
+
return { deallocatedCount, trimKeysSkipped: pendingTrimKeys };
|
|
62166
|
+
}
|
|
62167
|
+
const overFlowSize = storeKeyLength - maxStoreRecords;
|
|
62168
|
+
if (overFlowSize <= 0) {
|
|
62169
|
+
return { deallocatedCount, trimKeysSkipped: pendingTrimKeys };
|
|
62170
|
+
}
|
|
62171
|
+
const trimKeys = new Set();
|
|
62172
|
+
for (const key of pendingTrimKeys) {
|
|
62173
|
+
if (storeKeyLength - trimKeys.size <= maxStoreRecords) {
|
|
62174
|
+
break;
|
|
62175
|
+
}
|
|
62176
|
+
if ((retainedIds[key] === undefined && storeRecords[key] !== undefined) ||
|
|
62177
|
+
(retainedIds[key] !== undefined && retainedIds[key] <= 1)) {
|
|
62178
|
+
trimKeys.add(key);
|
|
62179
|
+
}
|
|
62180
|
+
}
|
|
62181
|
+
const batches = batchKeys(trimKeys, batchSize).map((batch) => {
|
|
62182
|
+
return () => batchToPromise(batch, deallocateFn);
|
|
62183
|
+
});
|
|
62184
|
+
for (const batch of batches) {
|
|
62185
|
+
// execute each batch between ticks
|
|
62186
|
+
const count = await batch();
|
|
62187
|
+
deallocatedCount = deallocatedCount + count;
|
|
62188
|
+
}
|
|
62189
|
+
const trimKeysSkipped = makeSetFilteredFromDifference(pendingTrimKeys, (key) => trimKeys.has(key) === false);
|
|
62190
|
+
return {
|
|
62191
|
+
deallocatedCount,
|
|
62192
|
+
trimKeysSkipped,
|
|
62193
|
+
};
|
|
62194
|
+
}
|
|
62195
|
+
function batchToPromise(batch, deallocateFn) {
|
|
62196
|
+
return new Promise((resolve) => {
|
|
62197
|
+
let count = 0;
|
|
62198
|
+
batch.forEach((key) => {
|
|
62199
|
+
deallocateFn(key);
|
|
62200
|
+
count++;
|
|
62201
|
+
});
|
|
62202
|
+
resolve(count);
|
|
62203
|
+
});
|
|
62204
|
+
}
|
|
62205
|
+
function batchKeys(keys, batchSize) {
|
|
62206
|
+
const keyArray = Array.from(keys);
|
|
62207
|
+
const batches = [];
|
|
62208
|
+
for (let i = 0, len = keyArray.length; i < len; i += batchSize) {
|
|
62209
|
+
const batch = keyArray.slice(i, i + batchSize);
|
|
62210
|
+
batches.push(batch);
|
|
62211
|
+
}
|
|
62212
|
+
return batches;
|
|
62213
|
+
}
|
|
62214
|
+
function makeSetFilteredFromDifference(setToFilter, diff) {
|
|
62215
|
+
let filteredSet = new Set();
|
|
62216
|
+
setToFilter.forEach((t) => {
|
|
62217
|
+
if (diff(t)) {
|
|
62218
|
+
filteredSet.add(t);
|
|
62219
|
+
}
|
|
62220
|
+
});
|
|
62221
|
+
return filteredSet;
|
|
62222
|
+
}
|
|
62223
|
+
|
|
62113
62224
|
// so eslint doesn't complain about nimbus
|
|
62114
62225
|
/* global __nimbus */
|
|
62115
62226
|
function setupObserver() {
|
|
@@ -62153,7 +62264,9 @@ function getRuntime() {
|
|
|
62153
62264
|
// user id centric record ID generator
|
|
62154
62265
|
const { newRecordId, isGenerated } = recordIdGenerator(userId);
|
|
62155
62266
|
// non-draft-aware base services
|
|
62156
|
-
const store = new InMemoryStore(
|
|
62267
|
+
const store = new InMemoryStore({
|
|
62268
|
+
customTrimPolicy: aggressiveTrim,
|
|
62269
|
+
});
|
|
62157
62270
|
lazyNetworkAdapter = platformNetworkAdapter(makeNetworkAdapterChunkRecordFields(NimbusNetworkAdapter, {
|
|
62158
62271
|
reportChunkCandidateUrlLength: reportChunkCandidateUrlLength,
|
|
62159
62272
|
}));
|
|
@@ -62290,7 +62403,7 @@ register$1({
|
|
|
62290
62403
|
id: '@salesforce/lds-network-adapter',
|
|
62291
62404
|
instrument: instrument$2,
|
|
62292
62405
|
});
|
|
62293
|
-
// version: 1.
|
|
62406
|
+
// version: 1.286.0-09e7e5207
|
|
62294
62407
|
|
|
62295
62408
|
const { create: create$3, keys: keys$3 } = Object;
|
|
62296
62409
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
@@ -69307,7 +69420,7 @@ function getInContextFragmentType$Q(fragment, fragmentMap) {
|
|
|
69307
69420
|
}
|
|
69308
69421
|
|
|
69309
69422
|
const name$E = 'RecordConnection';
|
|
69310
|
-
const TTL$
|
|
69423
|
+
const TTL$5 = 300000;
|
|
69311
69424
|
const VERSION$N = '5109e37c62e492243c1e6ae3967b0655';
|
|
69312
69425
|
function keyBuilder$I(luvio, path, data) {
|
|
69313
69426
|
return path.fullPath;
|
|
@@ -69385,7 +69498,7 @@ function ingest$G(astNode, state) {
|
|
|
69385
69498
|
createLink: createLink,
|
|
69386
69499
|
mergeData: mergeData$E,
|
|
69387
69500
|
storeMetadataParams: {
|
|
69388
|
-
ttl: TTL$
|
|
69501
|
+
ttl: TTL$5,
|
|
69389
69502
|
namespace: keyPrefix$1,
|
|
69390
69503
|
representationName: "RecordConnection",
|
|
69391
69504
|
version: VERSION$N,
|
|
@@ -76286,7 +76399,7 @@ function getInContextFragmentType$m(fragment, fragmentMap) {
|
|
|
76286
76399
|
}
|
|
76287
76400
|
|
|
76288
76401
|
const name$a = 'ObjectInfo';
|
|
76289
|
-
const TTL$
|
|
76402
|
+
const TTL$4 = 900000;
|
|
76290
76403
|
const VERSION$j = 'f8f627dd56d42a39e1a6642edb039182';
|
|
76291
76404
|
function keyBuilder$e(luvio, path, data) {
|
|
76292
76405
|
return path.fullPath;
|
|
@@ -76312,7 +76425,7 @@ function ingest$c(astNode, state) {
|
|
|
76312
76425
|
createLink: createLink,
|
|
76313
76426
|
mergeData: mergeData$a,
|
|
76314
76427
|
storeMetadataParams: {
|
|
76315
|
-
ttl: TTL$
|
|
76428
|
+
ttl: TTL$4,
|
|
76316
76429
|
namespace: keyPrefix$1,
|
|
76317
76430
|
representationName: "ObjectInfo",
|
|
76318
76431
|
version: VERSION$j,
|
|
@@ -77002,7 +77115,7 @@ function getInContextFragmentType$j(fragment, fragmentMap) {
|
|
|
77002
77115
|
}
|
|
77003
77116
|
|
|
77004
77117
|
const name$7 = 'RelatedListInfo';
|
|
77005
|
-
const TTL$
|
|
77118
|
+
const TTL$3 = 900000;
|
|
77006
77119
|
const VERSION$g = 'a32cfdff7ca8dcf4b534b3491fef2019';
|
|
77007
77120
|
function keyBuilder$b(luvio, path, data) {
|
|
77008
77121
|
return path.fullPath;
|
|
@@ -77028,7 +77141,7 @@ function ingest$9(astNode, state) {
|
|
|
77028
77141
|
createLink: createLink,
|
|
77029
77142
|
mergeData: mergeData$7,
|
|
77030
77143
|
storeMetadataParams: {
|
|
77031
|
-
ttl: TTL$
|
|
77144
|
+
ttl: TTL$3,
|
|
77032
77145
|
namespace: keyPrefix$1,
|
|
77033
77146
|
representationName: "RelatedListInfo",
|
|
77034
77147
|
version: VERSION$g,
|
|
@@ -78856,6 +78969,7 @@ function getInContextFragmentType$c(fragment, fragmentMap) {
|
|
|
78856
78969
|
}
|
|
78857
78970
|
|
|
78858
78971
|
const name$1 = 'Setup__Setup';
|
|
78972
|
+
const TTL$2 = 1000;
|
|
78859
78973
|
const VERSION$9 = '57c66c8147b44793116747c96b2b0fc9';
|
|
78860
78974
|
function keyBuilder$5(luvio, path, data) {
|
|
78861
78975
|
return path.fullPath;
|
|
@@ -78881,7 +78995,7 @@ function ingest$2(astNode, state) {
|
|
|
78881
78995
|
createLink: createLink,
|
|
78882
78996
|
mergeData: mergeData$1,
|
|
78883
78997
|
storeMetadataParams: {
|
|
78884
|
-
ttl: TTL$
|
|
78998
|
+
ttl: TTL$2,
|
|
78885
78999
|
namespace: keyPrefix$1,
|
|
78886
79000
|
representationName: "Setup__Setup",
|
|
78887
79001
|
version: VERSION$9,
|
|
@@ -82338,7 +82452,7 @@ register$1({
|
|
|
82338
82452
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
82339
82453
|
instrument: instrument$1,
|
|
82340
82454
|
});
|
|
82341
|
-
// version: 1.
|
|
82455
|
+
// version: 1.286.0-27bef7c46
|
|
82342
82456
|
|
|
82343
82457
|
// On core the unstable adapters are re-exported with different names,
|
|
82344
82458
|
// we want to match them here.
|
|
@@ -84594,7 +84708,7 @@ withDefaultLuvio((luvio) => {
|
|
|
84594
84708
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
84595
84709
|
graphQLImperative = ldsAdapter;
|
|
84596
84710
|
});
|
|
84597
|
-
// version: 1.
|
|
84711
|
+
// version: 1.286.0-27bef7c46
|
|
84598
84712
|
|
|
84599
84713
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
84600
84714
|
__proto__: null,
|
|
@@ -85332,7 +85446,7 @@ const callbacks$1 = [];
|
|
|
85332
85446
|
function register(r) {
|
|
85333
85447
|
callbacks$1.forEach((callback) => callback(r));
|
|
85334
85448
|
}
|
|
85335
|
-
// version: 1.
|
|
85449
|
+
// version: 1.286.0-09e7e5207
|
|
85336
85450
|
|
|
85337
85451
|
/**
|
|
85338
85452
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -90284,4 +90398,4 @@ const { luvio } = getRuntime();
|
|
|
90284
90398
|
setDefaultLuvio({ luvio });
|
|
90285
90399
|
|
|
90286
90400
|
export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
|
|
90287
|
-
// version: 1.
|
|
90401
|
+
// version: 1.286.0-09e7e5207
|
|
@@ -527,6 +527,25 @@
|
|
|
527
527
|
}
|
|
528
528
|
}
|
|
529
529
|
|
|
530
|
+
function defaultTrimPolicy(data, deallocateFn) {
|
|
531
|
+
return new Promise((resolve) => {
|
|
532
|
+
let deallocatedCount = 0;
|
|
533
|
+
const { pendingTrimKeys, retainedIds, metadata } = data;
|
|
534
|
+
const now = Date.now();
|
|
535
|
+
pendingTrimKeys.forEach((key) => {
|
|
536
|
+
const recordExpiration = metadata[key];
|
|
537
|
+
if (retainedIds[key] !== undefined ||
|
|
538
|
+
recordExpiration === undefined ||
|
|
539
|
+
(recordExpiration !== undefined && recordExpiration.expirationTimestamp >= now)) {
|
|
540
|
+
return;
|
|
541
|
+
}
|
|
542
|
+
deallocateFn(key);
|
|
543
|
+
deallocatedCount++;
|
|
544
|
+
});
|
|
545
|
+
resolve({ deallocatedCount });
|
|
546
|
+
});
|
|
547
|
+
}
|
|
548
|
+
|
|
530
549
|
const Serialized_StringKey_Version = '1';
|
|
531
550
|
function hasOverlappingIds$1(snapshot, visitedIds) {
|
|
532
551
|
const { length: len } = visitedIds;
|
|
@@ -595,6 +614,7 @@
|
|
|
595
614
|
if (options.initialData) {
|
|
596
615
|
this.deserialize(options.initialData, options.resetInitialDataTtls);
|
|
597
616
|
}
|
|
617
|
+
this.trimPolicy = options.customTrimPolicy || defaultTrimPolicy;
|
|
598
618
|
}
|
|
599
619
|
// interface methods
|
|
600
620
|
readEntry(key) {
|
|
@@ -968,22 +988,15 @@
|
|
|
968
988
|
scheduleTrim() {
|
|
969
989
|
if (this.trimTask === null) {
|
|
970
990
|
this.trimTask = () => {
|
|
971
|
-
const { metadata, retainedIds,
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
recordExpiration === undefined ||
|
|
978
|
-
(recordExpiration !== undefined &&
|
|
979
|
-
recordExpiration.expirationTimestamp >= now)) {
|
|
980
|
-
return;
|
|
991
|
+
const { metadata, pendingTrimKeys, retainedIds, records: storeRecords, dealloc, } = this;
|
|
992
|
+
return this.trimPolicy({ metadata, pendingTrimKeys, retainedIds, storeRecords }, dealloc.bind(this)).then((result) => {
|
|
993
|
+
this.pendingTrimKeys.clear();
|
|
994
|
+
const { trimKeysSkipped } = result;
|
|
995
|
+
if (trimKeysSkipped !== undefined) {
|
|
996
|
+
this.pendingTrimKeys = trimKeysSkipped;
|
|
981
997
|
}
|
|
982
|
-
|
|
983
|
-
deallocCount++;
|
|
998
|
+
return result;
|
|
984
999
|
});
|
|
985
|
-
pendingTrimKeys.clear();
|
|
986
|
-
return deallocCount;
|
|
987
1000
|
};
|
|
988
1001
|
this.scheduler(this.trimTask, () => {
|
|
989
1002
|
this.trimTask = null;
|
|
@@ -1722,7 +1735,7 @@
|
|
|
1722
1735
|
deallocCount++;
|
|
1723
1736
|
});
|
|
1724
1737
|
pendingTrims.clear();
|
|
1725
|
-
return deallocCount;
|
|
1738
|
+
return Promise.resolve({ deallocatedCount: deallocCount });
|
|
1726
1739
|
};
|
|
1727
1740
|
this.scheduler(this.trimTask, () => {
|
|
1728
1741
|
this.trimTask = null;
|
|
@@ -4055,7 +4068,7 @@
|
|
|
4055
4068
|
}
|
|
4056
4069
|
return resourceParams;
|
|
4057
4070
|
}
|
|
4058
|
-
// engine version: 0.154.
|
|
4071
|
+
// engine version: 0.154.16-5cc35392
|
|
4059
4072
|
|
|
4060
4073
|
/**
|
|
4061
4074
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -4183,7 +4196,7 @@
|
|
|
4183
4196
|
}
|
|
4184
4197
|
callbacks.push(callback);
|
|
4185
4198
|
}
|
|
4186
|
-
// version: 1.
|
|
4199
|
+
// version: 1.286.0-09e7e5207
|
|
4187
4200
|
|
|
4188
4201
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
4189
4202
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -15691,7 +15704,7 @@
|
|
|
15691
15704
|
}
|
|
15692
15705
|
return superResult;
|
|
15693
15706
|
}
|
|
15694
|
-
// version: 1.
|
|
15707
|
+
// version: 1.286.0-09e7e5207
|
|
15695
15708
|
|
|
15696
15709
|
function unwrap(data) {
|
|
15697
15710
|
// The lwc-luvio bindings import a function from lwc called "unwrap".
|
|
@@ -16616,7 +16629,7 @@
|
|
|
16616
16629
|
const { apiFamily, name } = metadata;
|
|
16617
16630
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
16618
16631
|
}
|
|
16619
|
-
// version: 1.
|
|
16632
|
+
// version: 1.286.0-09e7e5207
|
|
16620
16633
|
|
|
16621
16634
|
/**
|
|
16622
16635
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -16715,7 +16728,7 @@
|
|
|
16715
16728
|
TypeCheckShapes[TypeCheckShapes["Integer"] = 3] = "Integer";
|
|
16716
16729
|
TypeCheckShapes[TypeCheckShapes["Unsupported"] = 4] = "Unsupported";
|
|
16717
16730
|
})(TypeCheckShapes || (TypeCheckShapes = {}));
|
|
16718
|
-
// engine version: 0.154.
|
|
16731
|
+
// engine version: 0.154.16-5cc35392
|
|
16719
16732
|
|
|
16720
16733
|
const { keys: ObjectKeys$3, create: ObjectCreate$3 } = Object;
|
|
16721
16734
|
|
|
@@ -39907,7 +39920,7 @@
|
|
|
39907
39920
|
buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$6);
|
|
39908
39921
|
};
|
|
39909
39922
|
|
|
39910
|
-
const TTL$5 = 200;
|
|
39923
|
+
const TTL$5$1 = 200;
|
|
39911
39924
|
const VERSION$7$1 = "3102453bf10ea449d9665914d5f5febf";
|
|
39912
39925
|
const RepresentationType$8 = 'KeywordSearchResultsSummaryRepresentation';
|
|
39913
39926
|
function keyBuilder$c$1(luvio, config) {
|
|
@@ -39940,7 +39953,7 @@
|
|
|
39940
39953
|
}
|
|
39941
39954
|
const ingest$3$1 = function KeywordSearchResultsSummaryRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
39942
39955
|
const key = keyBuilderFromType$5(luvio, input);
|
|
39943
|
-
const ttlToUse = TTL$5;
|
|
39956
|
+
const ttlToUse = TTL$5$1;
|
|
39944
39957
|
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "UiApi", VERSION$7$1, RepresentationType$8, equals$7);
|
|
39945
39958
|
return createLink$3(key);
|
|
39946
39959
|
};
|
|
@@ -39983,7 +39996,7 @@
|
|
|
39983
39996
|
const key = keyBuilder$b$1(luvio, params);
|
|
39984
39997
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
39985
39998
|
const storeMetadataParams = {
|
|
39986
|
-
ttl: TTL$5,
|
|
39999
|
+
ttl: TTL$5$1,
|
|
39987
40000
|
namespace: keyPrefix$2,
|
|
39988
40001
|
version: VERSION$7$1,
|
|
39989
40002
|
representationName: RepresentationType$8
|
|
@@ -44157,7 +44170,7 @@
|
|
|
44157
44170
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
44158
44171
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
44159
44172
|
});
|
|
44160
|
-
// version: 1.
|
|
44173
|
+
// version: 1.286.0-27bef7c46
|
|
44161
44174
|
|
|
44162
44175
|
var ldsIdempotencyWriteDisabled = {
|
|
44163
44176
|
isOpen: function (e) {
|
|
@@ -49791,10 +49804,6 @@
|
|
|
49791
49804
|
switch (result) {
|
|
49792
49805
|
case ProcessActionResult.BLOCKED_ON_ERROR:
|
|
49793
49806
|
this.state = DraftQueueState.Error;
|
|
49794
|
-
await this.notifyChangedListeners({
|
|
49795
|
-
type: DraftQueueEventType.QueueStateChanged,
|
|
49796
|
-
state: this.state,
|
|
49797
|
-
});
|
|
49798
49807
|
return Promise.reject();
|
|
49799
49808
|
default:
|
|
49800
49809
|
return Promise.resolve();
|
|
@@ -49940,6 +49949,10 @@
|
|
|
49940
49949
|
if (status === DraftActionStatus.Error) {
|
|
49941
49950
|
this.state = DraftQueueState.Error;
|
|
49942
49951
|
this.processingAction = undefined;
|
|
49952
|
+
this.notifyChangedListeners({
|
|
49953
|
+
type: DraftQueueEventType.ActionFailed,
|
|
49954
|
+
action: action,
|
|
49955
|
+
});
|
|
49943
49956
|
return ProcessActionResult.BLOCKED_ON_ERROR;
|
|
49944
49957
|
}
|
|
49945
49958
|
if (id === this.uploadingActionId) {
|
|
@@ -57006,6 +57019,21 @@
|
|
|
57006
57019
|
}
|
|
57007
57020
|
return fields;
|
|
57008
57021
|
}
|
|
57022
|
+
getRedirectMappings(action) {
|
|
57023
|
+
if (action.data.method === 'post' && action.response.status === 204) {
|
|
57024
|
+
return undefined;
|
|
57025
|
+
}
|
|
57026
|
+
return super.getRedirectMappings(action);
|
|
57027
|
+
}
|
|
57028
|
+
async handleActionCompleted(completedAction, queueOperations, allHandlers) {
|
|
57029
|
+
if (completedAction.response.status === 204 && completedAction.data.method === 'post') {
|
|
57030
|
+
// if we get a 204 it means the record creation was successful but we don't have the record to ingest
|
|
57031
|
+
// remove the synthesized draft and do not try to ingest the response
|
|
57032
|
+
await this.evictKey(completedAction.tag);
|
|
57033
|
+
return;
|
|
57034
|
+
}
|
|
57035
|
+
return super.handleActionCompleted(completedAction, queueOperations, allHandlers);
|
|
57036
|
+
}
|
|
57009
57037
|
async fetchReferenceRecord(referenceFields) {
|
|
57010
57038
|
const promises = referenceFields.map(async (referenceFieldInfo) => {
|
|
57011
57039
|
const apiName = await this.identifyApiName(referenceFieldInfo.id, referenceFieldInfo.field);
|
|
@@ -60613,11 +60641,17 @@
|
|
|
60613
60641
|
return this.getTable(segment).getAll(segment);
|
|
60614
60642
|
}
|
|
60615
60643
|
setEntries(entries, segment) {
|
|
60644
|
+
if (keys$9(entries).length === 0) {
|
|
60645
|
+
return Promise.resolve();
|
|
60646
|
+
}
|
|
60616
60647
|
const table = this.getTable(segment);
|
|
60617
60648
|
const upsertOperation = table.entriesToUpsertOperations(entries, segment);
|
|
60618
60649
|
return this.batchOperationAsPromise([upsertOperation]);
|
|
60619
60650
|
}
|
|
60620
60651
|
setMetadata(entries, segment) {
|
|
60652
|
+
if (keys$9(entries).length === 0) {
|
|
60653
|
+
return Promise.resolve();
|
|
60654
|
+
}
|
|
60621
60655
|
const table = this.getTable(segment);
|
|
60622
60656
|
let operation;
|
|
60623
60657
|
if (this.supportsBatchUpdates) {
|
|
@@ -60634,32 +60668,41 @@
|
|
|
60634
60668
|
batchOperations(operations) {
|
|
60635
60669
|
const sqliteOperations = operations.reduce((acc, cur) => {
|
|
60636
60670
|
if (cur.type === 'setEntries') {
|
|
60637
|
-
|
|
60638
|
-
|
|
60671
|
+
if (keys$9(cur.entries).length > 0) {
|
|
60672
|
+
const table = this.getTable(cur.segment);
|
|
60673
|
+
acc.push(table.entriesToUpsertOperations(cur.entries, cur.segment));
|
|
60674
|
+
}
|
|
60639
60675
|
}
|
|
60640
60676
|
else if (cur.type === 'setMetadata') {
|
|
60641
|
-
|
|
60642
|
-
|
|
60643
|
-
|
|
60644
|
-
|
|
60645
|
-
|
|
60646
|
-
|
|
60647
|
-
|
|
60648
|
-
|
|
60649
|
-
|
|
60650
|
-
|
|
60677
|
+
if (keys$9(cur.entries).length > 0) {
|
|
60678
|
+
const table = this.getTable(cur.segment);
|
|
60679
|
+
if (this.supportsBatchUpdates) {
|
|
60680
|
+
acc.push(table.metadataToUpdateOperations(cur.entries, cur.segment));
|
|
60681
|
+
}
|
|
60682
|
+
else {
|
|
60683
|
+
const upsert = table.entriesToUpsertOperations(cur.entries, cur.segment);
|
|
60684
|
+
// manually set the context type on the upsert so notifications do not notify rebuilds without
|
|
60685
|
+
// plugin updates
|
|
60686
|
+
upsert.context.type = 'setMetadata';
|
|
60687
|
+
acc.push(upsert);
|
|
60688
|
+
}
|
|
60651
60689
|
}
|
|
60652
60690
|
}
|
|
60653
60691
|
else {
|
|
60654
|
-
|
|
60692
|
+
if (cur.ids.length > 0) {
|
|
60693
|
+
acc.push(this.idsToDeleteOperation(cur.ids, cur.segment));
|
|
60694
|
+
}
|
|
60655
60695
|
}
|
|
60656
60696
|
return acc;
|
|
60657
60697
|
}, []);
|
|
60658
|
-
return
|
|
60698
|
+
return sqliteOperations.length === 0
|
|
60699
|
+
? Promise.resolve()
|
|
60700
|
+
: this.batchOperationAsPromise(sqliteOperations);
|
|
60659
60701
|
}
|
|
60660
60702
|
evictEntries(entryIds, segment) {
|
|
60661
|
-
|
|
60662
|
-
|
|
60703
|
+
return entryIds.length === 0
|
|
60704
|
+
? Promise.resolve()
|
|
60705
|
+
: this.batchOperationAsPromise([this.idsToDeleteOperation(entryIds, segment)]);
|
|
60663
60706
|
}
|
|
60664
60707
|
registerOnChangedListener(listener) {
|
|
60665
60708
|
let unsubscribeId = undefined;
|
|
@@ -62116,6 +62159,74 @@
|
|
|
62116
62159
|
return instrumentPrimingSession(session);
|
|
62117
62160
|
}
|
|
62118
62161
|
|
|
62162
|
+
const DEFAULT_MAX_RECORD_COUNT = 80000;
|
|
62163
|
+
const DEFAULT_MAX_BATCH_SIZE = 200;
|
|
62164
|
+
async function aggressiveTrim(data, deallocateFn, options = {}) {
|
|
62165
|
+
const maxStoreRecords = options.maxStoreRecords !== undefined ? options.maxStoreRecords : DEFAULT_MAX_RECORD_COUNT;
|
|
62166
|
+
const batchSize = options.batchSize !== undefined ? options.batchSize : DEFAULT_MAX_BATCH_SIZE;
|
|
62167
|
+
let deallocatedCount = 0;
|
|
62168
|
+
const { pendingTrimKeys, retainedIds, storeRecords } = data;
|
|
62169
|
+
const storeKeyLength = keys$1$1(storeRecords).length;
|
|
62170
|
+
if (storeKeyLength <= maxStoreRecords) {
|
|
62171
|
+
return { deallocatedCount, trimKeysSkipped: pendingTrimKeys };
|
|
62172
|
+
}
|
|
62173
|
+
const overFlowSize = storeKeyLength - maxStoreRecords;
|
|
62174
|
+
if (overFlowSize <= 0) {
|
|
62175
|
+
return { deallocatedCount, trimKeysSkipped: pendingTrimKeys };
|
|
62176
|
+
}
|
|
62177
|
+
const trimKeys = new Set();
|
|
62178
|
+
for (const key of pendingTrimKeys) {
|
|
62179
|
+
if (storeKeyLength - trimKeys.size <= maxStoreRecords) {
|
|
62180
|
+
break;
|
|
62181
|
+
}
|
|
62182
|
+
if ((retainedIds[key] === undefined && storeRecords[key] !== undefined) ||
|
|
62183
|
+
(retainedIds[key] !== undefined && retainedIds[key] <= 1)) {
|
|
62184
|
+
trimKeys.add(key);
|
|
62185
|
+
}
|
|
62186
|
+
}
|
|
62187
|
+
const batches = batchKeys(trimKeys, batchSize).map((batch) => {
|
|
62188
|
+
return () => batchToPromise(batch, deallocateFn);
|
|
62189
|
+
});
|
|
62190
|
+
for (const batch of batches) {
|
|
62191
|
+
// execute each batch between ticks
|
|
62192
|
+
const count = await batch();
|
|
62193
|
+
deallocatedCount = deallocatedCount + count;
|
|
62194
|
+
}
|
|
62195
|
+
const trimKeysSkipped = makeSetFilteredFromDifference(pendingTrimKeys, (key) => trimKeys.has(key) === false);
|
|
62196
|
+
return {
|
|
62197
|
+
deallocatedCount,
|
|
62198
|
+
trimKeysSkipped,
|
|
62199
|
+
};
|
|
62200
|
+
}
|
|
62201
|
+
function batchToPromise(batch, deallocateFn) {
|
|
62202
|
+
return new Promise((resolve) => {
|
|
62203
|
+
let count = 0;
|
|
62204
|
+
batch.forEach((key) => {
|
|
62205
|
+
deallocateFn(key);
|
|
62206
|
+
count++;
|
|
62207
|
+
});
|
|
62208
|
+
resolve(count);
|
|
62209
|
+
});
|
|
62210
|
+
}
|
|
62211
|
+
function batchKeys(keys, batchSize) {
|
|
62212
|
+
const keyArray = Array.from(keys);
|
|
62213
|
+
const batches = [];
|
|
62214
|
+
for (let i = 0, len = keyArray.length; i < len; i += batchSize) {
|
|
62215
|
+
const batch = keyArray.slice(i, i + batchSize);
|
|
62216
|
+
batches.push(batch);
|
|
62217
|
+
}
|
|
62218
|
+
return batches;
|
|
62219
|
+
}
|
|
62220
|
+
function makeSetFilteredFromDifference(setToFilter, diff) {
|
|
62221
|
+
let filteredSet = new Set();
|
|
62222
|
+
setToFilter.forEach((t) => {
|
|
62223
|
+
if (diff(t)) {
|
|
62224
|
+
filteredSet.add(t);
|
|
62225
|
+
}
|
|
62226
|
+
});
|
|
62227
|
+
return filteredSet;
|
|
62228
|
+
}
|
|
62229
|
+
|
|
62119
62230
|
// so eslint doesn't complain about nimbus
|
|
62120
62231
|
/* global __nimbus */
|
|
62121
62232
|
function setupObserver() {
|
|
@@ -62159,7 +62270,9 @@
|
|
|
62159
62270
|
// user id centric record ID generator
|
|
62160
62271
|
const { newRecordId, isGenerated } = recordIdGenerator(userId);
|
|
62161
62272
|
// non-draft-aware base services
|
|
62162
|
-
const store = new InMemoryStore(
|
|
62273
|
+
const store = new InMemoryStore({
|
|
62274
|
+
customTrimPolicy: aggressiveTrim,
|
|
62275
|
+
});
|
|
62163
62276
|
lazyNetworkAdapter = platformNetworkAdapter(makeNetworkAdapterChunkRecordFields(NimbusNetworkAdapter, {
|
|
62164
62277
|
reportChunkCandidateUrlLength: reportChunkCandidateUrlLength,
|
|
62165
62278
|
}));
|
|
@@ -62296,7 +62409,7 @@
|
|
|
62296
62409
|
id: '@salesforce/lds-network-adapter',
|
|
62297
62410
|
instrument: instrument$2,
|
|
62298
62411
|
});
|
|
62299
|
-
// version: 1.
|
|
62412
|
+
// version: 1.286.0-09e7e5207
|
|
62300
62413
|
|
|
62301
62414
|
const { create: create$3, keys: keys$3 } = Object;
|
|
62302
62415
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
@@ -69313,7 +69426,7 @@
|
|
|
69313
69426
|
}
|
|
69314
69427
|
|
|
69315
69428
|
const name$E = 'RecordConnection';
|
|
69316
|
-
const TTL$
|
|
69429
|
+
const TTL$5 = 300000;
|
|
69317
69430
|
const VERSION$N = '5109e37c62e492243c1e6ae3967b0655';
|
|
69318
69431
|
function keyBuilder$I(luvio, path, data) {
|
|
69319
69432
|
return path.fullPath;
|
|
@@ -69391,7 +69504,7 @@
|
|
|
69391
69504
|
createLink: createLink,
|
|
69392
69505
|
mergeData: mergeData$E,
|
|
69393
69506
|
storeMetadataParams: {
|
|
69394
|
-
ttl: TTL$
|
|
69507
|
+
ttl: TTL$5,
|
|
69395
69508
|
namespace: keyPrefix$1,
|
|
69396
69509
|
representationName: "RecordConnection",
|
|
69397
69510
|
version: VERSION$N,
|
|
@@ -76292,7 +76405,7 @@
|
|
|
76292
76405
|
}
|
|
76293
76406
|
|
|
76294
76407
|
const name$a = 'ObjectInfo';
|
|
76295
|
-
const TTL$
|
|
76408
|
+
const TTL$4 = 900000;
|
|
76296
76409
|
const VERSION$j = 'f8f627dd56d42a39e1a6642edb039182';
|
|
76297
76410
|
function keyBuilder$e(luvio, path, data) {
|
|
76298
76411
|
return path.fullPath;
|
|
@@ -76318,7 +76431,7 @@
|
|
|
76318
76431
|
createLink: createLink,
|
|
76319
76432
|
mergeData: mergeData$a,
|
|
76320
76433
|
storeMetadataParams: {
|
|
76321
|
-
ttl: TTL$
|
|
76434
|
+
ttl: TTL$4,
|
|
76322
76435
|
namespace: keyPrefix$1,
|
|
76323
76436
|
representationName: "ObjectInfo",
|
|
76324
76437
|
version: VERSION$j,
|
|
@@ -77008,7 +77121,7 @@
|
|
|
77008
77121
|
}
|
|
77009
77122
|
|
|
77010
77123
|
const name$7 = 'RelatedListInfo';
|
|
77011
|
-
const TTL$
|
|
77124
|
+
const TTL$3 = 900000;
|
|
77012
77125
|
const VERSION$g = 'a32cfdff7ca8dcf4b534b3491fef2019';
|
|
77013
77126
|
function keyBuilder$b(luvio, path, data) {
|
|
77014
77127
|
return path.fullPath;
|
|
@@ -77034,7 +77147,7 @@
|
|
|
77034
77147
|
createLink: createLink,
|
|
77035
77148
|
mergeData: mergeData$7,
|
|
77036
77149
|
storeMetadataParams: {
|
|
77037
|
-
ttl: TTL$
|
|
77150
|
+
ttl: TTL$3,
|
|
77038
77151
|
namespace: keyPrefix$1,
|
|
77039
77152
|
representationName: "RelatedListInfo",
|
|
77040
77153
|
version: VERSION$g,
|
|
@@ -78862,6 +78975,7 @@
|
|
|
78862
78975
|
}
|
|
78863
78976
|
|
|
78864
78977
|
const name$1 = 'Setup__Setup';
|
|
78978
|
+
const TTL$2 = 1000;
|
|
78865
78979
|
const VERSION$9 = '57c66c8147b44793116747c96b2b0fc9';
|
|
78866
78980
|
function keyBuilder$5(luvio, path, data) {
|
|
78867
78981
|
return path.fullPath;
|
|
@@ -78887,7 +79001,7 @@
|
|
|
78887
79001
|
createLink: createLink,
|
|
78888
79002
|
mergeData: mergeData$1,
|
|
78889
79003
|
storeMetadataParams: {
|
|
78890
|
-
ttl: TTL$
|
|
79004
|
+
ttl: TTL$2,
|
|
78891
79005
|
namespace: keyPrefix$1,
|
|
78892
79006
|
representationName: "Setup__Setup",
|
|
78893
79007
|
version: VERSION$9,
|
|
@@ -82344,7 +82458,7 @@
|
|
|
82344
82458
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
82345
82459
|
instrument: instrument$1,
|
|
82346
82460
|
});
|
|
82347
|
-
// version: 1.
|
|
82461
|
+
// version: 1.286.0-27bef7c46
|
|
82348
82462
|
|
|
82349
82463
|
// On core the unstable adapters are re-exported with different names,
|
|
82350
82464
|
// we want to match them here.
|
|
@@ -84600,7 +84714,7 @@
|
|
|
84600
84714
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
84601
84715
|
graphQLImperative = ldsAdapter;
|
|
84602
84716
|
});
|
|
84603
|
-
// version: 1.
|
|
84717
|
+
// version: 1.286.0-27bef7c46
|
|
84604
84718
|
|
|
84605
84719
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
84606
84720
|
__proto__: null,
|
|
@@ -85338,7 +85452,7 @@
|
|
|
85338
85452
|
function register(r) {
|
|
85339
85453
|
callbacks$1.forEach((callback) => callback(r));
|
|
85340
85454
|
}
|
|
85341
|
-
// version: 1.
|
|
85455
|
+
// version: 1.286.0-09e7e5207
|
|
85342
85456
|
|
|
85343
85457
|
/**
|
|
85344
85458
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -90309,4 +90423,4 @@
|
|
|
90309
90423
|
exports.subscribeToAdapter = subscribeToAdapter;
|
|
90310
90424
|
|
|
90311
90425
|
}));
|
|
90312
|
-
// version: 1.
|
|
90426
|
+
// version: 1.286.0-09e7e5207
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-worker-api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.286.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "dist/standalone/es/lds-worker-api.js",
|
|
@@ -35,19 +35,19 @@
|
|
|
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.286.0",
|
|
39
|
+
"@salesforce/lds-adapters-uiapi": "^1.286.0",
|
|
40
|
+
"@salesforce/lds-default-luvio": "^1.286.0",
|
|
41
|
+
"@salesforce/lds-drafts": "^1.286.0",
|
|
42
|
+
"@salesforce/lds-graphql-parser": "^1.286.0",
|
|
43
|
+
"@salesforce/lds-luvio-engine": "^1.286.0",
|
|
44
|
+
"@salesforce/lds-priming": "^1.286.0",
|
|
45
|
+
"@salesforce/lds-runtime-mobile": "^1.286.0",
|
|
46
|
+
"@salesforce/nimbus-plugin-lds": "^1.286.0",
|
|
47
47
|
"ajv": "^8.11.0",
|
|
48
48
|
"glob": "^7.1.5",
|
|
49
49
|
"nimbus-types": "^2.0.0-alpha1",
|
|
50
|
-
"o11y": "
|
|
50
|
+
"o11y": "250.7.0",
|
|
51
51
|
"o11y_schema": "248.40.0",
|
|
52
52
|
"wait-for-expect": "^3.0.2"
|
|
53
53
|
},
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
{
|
|
56
56
|
"path": "./dist/sfdc/es/ldsWorkerApi.js",
|
|
57
57
|
"maxSize": {
|
|
58
|
-
"none": "
|
|
58
|
+
"none": "45 kB",
|
|
59
59
|
"min": "17.8 kB",
|
|
60
|
-
"compressed": "
|
|
60
|
+
"compressed": "8 kB"
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
],
|