@salesforce/lds-worker-api 1.284.0 → 1.285.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.285.0-67d4d6869
|
|
@@ -4177,7 +4177,7 @@ function withDefaultLuvio(callback) {
|
|
|
4177
4177
|
}
|
|
4178
4178
|
callbacks.push(callback);
|
|
4179
4179
|
}
|
|
4180
|
-
// version: 1.
|
|
4180
|
+
// version: 1.285.0-67d4d6869
|
|
4181
4181
|
|
|
4182
4182
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
4183
4183
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -15685,7 +15685,7 @@ function gql(literals, ...subs) {
|
|
|
15685
15685
|
}
|
|
15686
15686
|
return superResult;
|
|
15687
15687
|
}
|
|
15688
|
-
// version: 1.
|
|
15688
|
+
// version: 1.285.0-67d4d6869
|
|
15689
15689
|
|
|
15690
15690
|
function unwrap(data) {
|
|
15691
15691
|
// The lwc-luvio bindings import a function from lwc called "unwrap".
|
|
@@ -16610,7 +16610,7 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
|
|
|
16610
16610
|
const { apiFamily, name } = metadata;
|
|
16611
16611
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
16612
16612
|
}
|
|
16613
|
-
// version: 1.
|
|
16613
|
+
// version: 1.285.0-67d4d6869
|
|
16614
16614
|
|
|
16615
16615
|
/**
|
|
16616
16616
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -39901,7 +39901,7 @@ const getSearchResultsAdapterFactory = (luvio) => function UiApi__getSearchResul
|
|
|
39901
39901
|
buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$6);
|
|
39902
39902
|
};
|
|
39903
39903
|
|
|
39904
|
-
const TTL$5 = 200;
|
|
39904
|
+
const TTL$5$1 = 200;
|
|
39905
39905
|
const VERSION$7$1 = "3102453bf10ea449d9665914d5f5febf";
|
|
39906
39906
|
const RepresentationType$8 = 'KeywordSearchResultsSummaryRepresentation';
|
|
39907
39907
|
function keyBuilder$c$1(luvio, config) {
|
|
@@ -39934,7 +39934,7 @@ function equals$7(existing, incoming) {
|
|
|
39934
39934
|
}
|
|
39935
39935
|
const ingest$3$1 = function KeywordSearchResultsSummaryRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
39936
39936
|
const key = keyBuilderFromType$5(luvio, input);
|
|
39937
|
-
const ttlToUse = TTL$5;
|
|
39937
|
+
const ttlToUse = TTL$5$1;
|
|
39938
39938
|
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "UiApi", VERSION$7$1, RepresentationType$8, equals$7);
|
|
39939
39939
|
return createLink$3(key);
|
|
39940
39940
|
};
|
|
@@ -39977,7 +39977,7 @@ function ingestError$1$1(luvio, params, error, snapshotRefresh) {
|
|
|
39977
39977
|
const key = keyBuilder$b$1(luvio, params);
|
|
39978
39978
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
39979
39979
|
const storeMetadataParams = {
|
|
39980
|
-
ttl: TTL$5,
|
|
39980
|
+
ttl: TTL$5$1,
|
|
39981
39981
|
namespace: keyPrefix$2,
|
|
39982
39982
|
version: VERSION$7$1,
|
|
39983
39983
|
representationName: RepresentationType$8
|
|
@@ -44151,7 +44151,7 @@ withDefaultLuvio((luvio) => {
|
|
|
44151
44151
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
44152
44152
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
44153
44153
|
});
|
|
44154
|
-
// version: 1.
|
|
44154
|
+
// version: 1.285.0-c97dec82e
|
|
44155
44155
|
|
|
44156
44156
|
var ldsIdempotencyWriteDisabled = {
|
|
44157
44157
|
isOpen: function (e) {
|
|
@@ -49785,10 +49785,6 @@ class DurableDraftQueue {
|
|
|
49785
49785
|
switch (result) {
|
|
49786
49786
|
case ProcessActionResult.BLOCKED_ON_ERROR:
|
|
49787
49787
|
this.state = DraftQueueState.Error;
|
|
49788
|
-
await this.notifyChangedListeners({
|
|
49789
|
-
type: DraftQueueEventType.QueueStateChanged,
|
|
49790
|
-
state: this.state,
|
|
49791
|
-
});
|
|
49792
49788
|
return Promise.reject();
|
|
49793
49789
|
default:
|
|
49794
49790
|
return Promise.resolve();
|
|
@@ -49934,6 +49930,10 @@ class DurableDraftQueue {
|
|
|
49934
49930
|
if (status === DraftActionStatus.Error) {
|
|
49935
49931
|
this.state = DraftQueueState.Error;
|
|
49936
49932
|
this.processingAction = undefined;
|
|
49933
|
+
this.notifyChangedListeners({
|
|
49934
|
+
type: DraftQueueEventType.ActionFailed,
|
|
49935
|
+
action: action,
|
|
49936
|
+
});
|
|
49937
49937
|
return ProcessActionResult.BLOCKED_ON_ERROR;
|
|
49938
49938
|
}
|
|
49939
49939
|
if (id === this.uploadingActionId) {
|
|
@@ -57000,6 +57000,21 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
|
|
|
57000
57000
|
}
|
|
57001
57001
|
return fields;
|
|
57002
57002
|
}
|
|
57003
|
+
getRedirectMappings(action) {
|
|
57004
|
+
if (action.data.method === 'post' && action.response.status === 204) {
|
|
57005
|
+
return undefined;
|
|
57006
|
+
}
|
|
57007
|
+
return super.getRedirectMappings(action);
|
|
57008
|
+
}
|
|
57009
|
+
async handleActionCompleted(completedAction, queueOperations, allHandlers) {
|
|
57010
|
+
if (completedAction.response.status === 204 && completedAction.data.method === 'post') {
|
|
57011
|
+
// if we get a 204 it means the record creation was successful but we don't have the record to ingest
|
|
57012
|
+
// remove the synthesized draft and do not try to ingest the response
|
|
57013
|
+
await this.evictKey(completedAction.tag);
|
|
57014
|
+
return;
|
|
57015
|
+
}
|
|
57016
|
+
return super.handleActionCompleted(completedAction, queueOperations, allHandlers);
|
|
57017
|
+
}
|
|
57003
57018
|
async fetchReferenceRecord(referenceFields) {
|
|
57004
57019
|
const promises = referenceFields.map(async (referenceFieldInfo) => {
|
|
57005
57020
|
const apiName = await this.identifyApiName(referenceFieldInfo.id, referenceFieldInfo.field);
|
|
@@ -60607,11 +60622,17 @@ class NimbusSqliteStore {
|
|
|
60607
60622
|
return this.getTable(segment).getAll(segment);
|
|
60608
60623
|
}
|
|
60609
60624
|
setEntries(entries, segment) {
|
|
60625
|
+
if (keys$9(entries).length === 0) {
|
|
60626
|
+
return Promise.resolve();
|
|
60627
|
+
}
|
|
60610
60628
|
const table = this.getTable(segment);
|
|
60611
60629
|
const upsertOperation = table.entriesToUpsertOperations(entries, segment);
|
|
60612
60630
|
return this.batchOperationAsPromise([upsertOperation]);
|
|
60613
60631
|
}
|
|
60614
60632
|
setMetadata(entries, segment) {
|
|
60633
|
+
if (keys$9(entries).length === 0) {
|
|
60634
|
+
return Promise.resolve();
|
|
60635
|
+
}
|
|
60615
60636
|
const table = this.getTable(segment);
|
|
60616
60637
|
let operation;
|
|
60617
60638
|
if (this.supportsBatchUpdates) {
|
|
@@ -60628,32 +60649,41 @@ class NimbusSqliteStore {
|
|
|
60628
60649
|
batchOperations(operations) {
|
|
60629
60650
|
const sqliteOperations = operations.reduce((acc, cur) => {
|
|
60630
60651
|
if (cur.type === 'setEntries') {
|
|
60631
|
-
|
|
60632
|
-
|
|
60652
|
+
if (keys$9(cur.entries).length > 0) {
|
|
60653
|
+
const table = this.getTable(cur.segment);
|
|
60654
|
+
acc.push(table.entriesToUpsertOperations(cur.entries, cur.segment));
|
|
60655
|
+
}
|
|
60633
60656
|
}
|
|
60634
60657
|
else if (cur.type === 'setMetadata') {
|
|
60635
|
-
|
|
60636
|
-
|
|
60637
|
-
|
|
60638
|
-
|
|
60639
|
-
|
|
60640
|
-
|
|
60641
|
-
|
|
60642
|
-
|
|
60643
|
-
|
|
60644
|
-
|
|
60658
|
+
if (keys$9(cur.entries).length > 0) {
|
|
60659
|
+
const table = this.getTable(cur.segment);
|
|
60660
|
+
if (this.supportsBatchUpdates) {
|
|
60661
|
+
acc.push(table.metadataToUpdateOperations(cur.entries, cur.segment));
|
|
60662
|
+
}
|
|
60663
|
+
else {
|
|
60664
|
+
const upsert = table.entriesToUpsertOperations(cur.entries, cur.segment);
|
|
60665
|
+
// manually set the context type on the upsert so notifications do not notify rebuilds without
|
|
60666
|
+
// plugin updates
|
|
60667
|
+
upsert.context.type = 'setMetadata';
|
|
60668
|
+
acc.push(upsert);
|
|
60669
|
+
}
|
|
60645
60670
|
}
|
|
60646
60671
|
}
|
|
60647
60672
|
else {
|
|
60648
|
-
|
|
60673
|
+
if (cur.ids.length > 0) {
|
|
60674
|
+
acc.push(this.idsToDeleteOperation(cur.ids, cur.segment));
|
|
60675
|
+
}
|
|
60649
60676
|
}
|
|
60650
60677
|
return acc;
|
|
60651
60678
|
}, []);
|
|
60652
|
-
return
|
|
60679
|
+
return sqliteOperations.length === 0
|
|
60680
|
+
? Promise.resolve()
|
|
60681
|
+
: this.batchOperationAsPromise(sqliteOperations);
|
|
60653
60682
|
}
|
|
60654
60683
|
evictEntries(entryIds, segment) {
|
|
60655
|
-
|
|
60656
|
-
|
|
60684
|
+
return entryIds.length === 0
|
|
60685
|
+
? Promise.resolve()
|
|
60686
|
+
: this.batchOperationAsPromise([this.idsToDeleteOperation(entryIds, segment)]);
|
|
60657
60687
|
}
|
|
60658
60688
|
registerOnChangedListener(listener) {
|
|
60659
60689
|
let unsubscribeId = undefined;
|
|
@@ -62290,7 +62320,7 @@ register$1({
|
|
|
62290
62320
|
id: '@salesforce/lds-network-adapter',
|
|
62291
62321
|
instrument: instrument$2,
|
|
62292
62322
|
});
|
|
62293
|
-
// version: 1.
|
|
62323
|
+
// version: 1.285.0-67d4d6869
|
|
62294
62324
|
|
|
62295
62325
|
const { create: create$3, keys: keys$3 } = Object;
|
|
62296
62326
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
@@ -69307,7 +69337,7 @@ function getInContextFragmentType$Q(fragment, fragmentMap) {
|
|
|
69307
69337
|
}
|
|
69308
69338
|
|
|
69309
69339
|
const name$E = 'RecordConnection';
|
|
69310
|
-
const TTL$
|
|
69340
|
+
const TTL$5 = 300000;
|
|
69311
69341
|
const VERSION$N = '5109e37c62e492243c1e6ae3967b0655';
|
|
69312
69342
|
function keyBuilder$I(luvio, path, data) {
|
|
69313
69343
|
return path.fullPath;
|
|
@@ -69385,7 +69415,7 @@ function ingest$G(astNode, state) {
|
|
|
69385
69415
|
createLink: createLink,
|
|
69386
69416
|
mergeData: mergeData$E,
|
|
69387
69417
|
storeMetadataParams: {
|
|
69388
|
-
ttl: TTL$
|
|
69418
|
+
ttl: TTL$5,
|
|
69389
69419
|
namespace: keyPrefix$1,
|
|
69390
69420
|
representationName: "RecordConnection",
|
|
69391
69421
|
version: VERSION$N,
|
|
@@ -76286,7 +76316,7 @@ function getInContextFragmentType$m(fragment, fragmentMap) {
|
|
|
76286
76316
|
}
|
|
76287
76317
|
|
|
76288
76318
|
const name$a = 'ObjectInfo';
|
|
76289
|
-
const TTL$
|
|
76319
|
+
const TTL$4 = 900000;
|
|
76290
76320
|
const VERSION$j = 'f8f627dd56d42a39e1a6642edb039182';
|
|
76291
76321
|
function keyBuilder$e(luvio, path, data) {
|
|
76292
76322
|
return path.fullPath;
|
|
@@ -76312,7 +76342,7 @@ function ingest$c(astNode, state) {
|
|
|
76312
76342
|
createLink: createLink,
|
|
76313
76343
|
mergeData: mergeData$a,
|
|
76314
76344
|
storeMetadataParams: {
|
|
76315
|
-
ttl: TTL$
|
|
76345
|
+
ttl: TTL$4,
|
|
76316
76346
|
namespace: keyPrefix$1,
|
|
76317
76347
|
representationName: "ObjectInfo",
|
|
76318
76348
|
version: VERSION$j,
|
|
@@ -77002,7 +77032,7 @@ function getInContextFragmentType$j(fragment, fragmentMap) {
|
|
|
77002
77032
|
}
|
|
77003
77033
|
|
|
77004
77034
|
const name$7 = 'RelatedListInfo';
|
|
77005
|
-
const TTL$
|
|
77035
|
+
const TTL$3 = 900000;
|
|
77006
77036
|
const VERSION$g = 'a32cfdff7ca8dcf4b534b3491fef2019';
|
|
77007
77037
|
function keyBuilder$b(luvio, path, data) {
|
|
77008
77038
|
return path.fullPath;
|
|
@@ -77028,7 +77058,7 @@ function ingest$9(astNode, state) {
|
|
|
77028
77058
|
createLink: createLink,
|
|
77029
77059
|
mergeData: mergeData$7,
|
|
77030
77060
|
storeMetadataParams: {
|
|
77031
|
-
ttl: TTL$
|
|
77061
|
+
ttl: TTL$3,
|
|
77032
77062
|
namespace: keyPrefix$1,
|
|
77033
77063
|
representationName: "RelatedListInfo",
|
|
77034
77064
|
version: VERSION$g,
|
|
@@ -78856,6 +78886,7 @@ function getInContextFragmentType$c(fragment, fragmentMap) {
|
|
|
78856
78886
|
}
|
|
78857
78887
|
|
|
78858
78888
|
const name$1 = 'Setup__Setup';
|
|
78889
|
+
const TTL$2 = 1000;
|
|
78859
78890
|
const VERSION$9 = '57c66c8147b44793116747c96b2b0fc9';
|
|
78860
78891
|
function keyBuilder$5(luvio, path, data) {
|
|
78861
78892
|
return path.fullPath;
|
|
@@ -78881,7 +78912,7 @@ function ingest$2(astNode, state) {
|
|
|
78881
78912
|
createLink: createLink,
|
|
78882
78913
|
mergeData: mergeData$1,
|
|
78883
78914
|
storeMetadataParams: {
|
|
78884
|
-
ttl: TTL$
|
|
78915
|
+
ttl: TTL$2,
|
|
78885
78916
|
namespace: keyPrefix$1,
|
|
78886
78917
|
representationName: "Setup__Setup",
|
|
78887
78918
|
version: VERSION$9,
|
|
@@ -82338,7 +82369,7 @@ register$1({
|
|
|
82338
82369
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
82339
82370
|
instrument: instrument$1,
|
|
82340
82371
|
});
|
|
82341
|
-
// version: 1.
|
|
82372
|
+
// version: 1.285.0-c97dec82e
|
|
82342
82373
|
|
|
82343
82374
|
// On core the unstable adapters are re-exported with different names,
|
|
82344
82375
|
// we want to match them here.
|
|
@@ -84594,7 +84625,7 @@ withDefaultLuvio((luvio) => {
|
|
|
84594
84625
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
84595
84626
|
graphQLImperative = ldsAdapter;
|
|
84596
84627
|
});
|
|
84597
|
-
// version: 1.
|
|
84628
|
+
// version: 1.285.0-c97dec82e
|
|
84598
84629
|
|
|
84599
84630
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
84600
84631
|
__proto__: null,
|
|
@@ -85332,7 +85363,7 @@ const callbacks$1 = [];
|
|
|
85332
85363
|
function register(r) {
|
|
85333
85364
|
callbacks$1.forEach((callback) => callback(r));
|
|
85334
85365
|
}
|
|
85335
|
-
// version: 1.
|
|
85366
|
+
// version: 1.285.0-67d4d6869
|
|
85336
85367
|
|
|
85337
85368
|
/**
|
|
85338
85369
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -90284,4 +90315,4 @@ const { luvio } = getRuntime();
|
|
|
90284
90315
|
setDefaultLuvio({ luvio });
|
|
90285
90316
|
|
|
90286
90317
|
export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
|
|
90287
|
-
// version: 1.
|
|
90318
|
+
// version: 1.285.0-67d4d6869
|
|
@@ -4183,7 +4183,7 @@
|
|
|
4183
4183
|
}
|
|
4184
4184
|
callbacks.push(callback);
|
|
4185
4185
|
}
|
|
4186
|
-
// version: 1.
|
|
4186
|
+
// version: 1.285.0-67d4d6869
|
|
4187
4187
|
|
|
4188
4188
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
4189
4189
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -15691,7 +15691,7 @@
|
|
|
15691
15691
|
}
|
|
15692
15692
|
return superResult;
|
|
15693
15693
|
}
|
|
15694
|
-
// version: 1.
|
|
15694
|
+
// version: 1.285.0-67d4d6869
|
|
15695
15695
|
|
|
15696
15696
|
function unwrap(data) {
|
|
15697
15697
|
// The lwc-luvio bindings import a function from lwc called "unwrap".
|
|
@@ -16616,7 +16616,7 @@
|
|
|
16616
16616
|
const { apiFamily, name } = metadata;
|
|
16617
16617
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
16618
16618
|
}
|
|
16619
|
-
// version: 1.
|
|
16619
|
+
// version: 1.285.0-67d4d6869
|
|
16620
16620
|
|
|
16621
16621
|
/**
|
|
16622
16622
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -39907,7 +39907,7 @@
|
|
|
39907
39907
|
buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$6);
|
|
39908
39908
|
};
|
|
39909
39909
|
|
|
39910
|
-
const TTL$5 = 200;
|
|
39910
|
+
const TTL$5$1 = 200;
|
|
39911
39911
|
const VERSION$7$1 = "3102453bf10ea449d9665914d5f5febf";
|
|
39912
39912
|
const RepresentationType$8 = 'KeywordSearchResultsSummaryRepresentation';
|
|
39913
39913
|
function keyBuilder$c$1(luvio, config) {
|
|
@@ -39940,7 +39940,7 @@
|
|
|
39940
39940
|
}
|
|
39941
39941
|
const ingest$3$1 = function KeywordSearchResultsSummaryRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
39942
39942
|
const key = keyBuilderFromType$5(luvio, input);
|
|
39943
|
-
const ttlToUse = TTL$5;
|
|
39943
|
+
const ttlToUse = TTL$5$1;
|
|
39944
39944
|
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "UiApi", VERSION$7$1, RepresentationType$8, equals$7);
|
|
39945
39945
|
return createLink$3(key);
|
|
39946
39946
|
};
|
|
@@ -39983,7 +39983,7 @@
|
|
|
39983
39983
|
const key = keyBuilder$b$1(luvio, params);
|
|
39984
39984
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
39985
39985
|
const storeMetadataParams = {
|
|
39986
|
-
ttl: TTL$5,
|
|
39986
|
+
ttl: TTL$5$1,
|
|
39987
39987
|
namespace: keyPrefix$2,
|
|
39988
39988
|
version: VERSION$7$1,
|
|
39989
39989
|
representationName: RepresentationType$8
|
|
@@ -44157,7 +44157,7 @@
|
|
|
44157
44157
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
44158
44158
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
44159
44159
|
});
|
|
44160
|
-
// version: 1.
|
|
44160
|
+
// version: 1.285.0-c97dec82e
|
|
44161
44161
|
|
|
44162
44162
|
var ldsIdempotencyWriteDisabled = {
|
|
44163
44163
|
isOpen: function (e) {
|
|
@@ -49791,10 +49791,6 @@
|
|
|
49791
49791
|
switch (result) {
|
|
49792
49792
|
case ProcessActionResult.BLOCKED_ON_ERROR:
|
|
49793
49793
|
this.state = DraftQueueState.Error;
|
|
49794
|
-
await this.notifyChangedListeners({
|
|
49795
|
-
type: DraftQueueEventType.QueueStateChanged,
|
|
49796
|
-
state: this.state,
|
|
49797
|
-
});
|
|
49798
49794
|
return Promise.reject();
|
|
49799
49795
|
default:
|
|
49800
49796
|
return Promise.resolve();
|
|
@@ -49940,6 +49936,10 @@
|
|
|
49940
49936
|
if (status === DraftActionStatus.Error) {
|
|
49941
49937
|
this.state = DraftQueueState.Error;
|
|
49942
49938
|
this.processingAction = undefined;
|
|
49939
|
+
this.notifyChangedListeners({
|
|
49940
|
+
type: DraftQueueEventType.ActionFailed,
|
|
49941
|
+
action: action,
|
|
49942
|
+
});
|
|
49943
49943
|
return ProcessActionResult.BLOCKED_ON_ERROR;
|
|
49944
49944
|
}
|
|
49945
49945
|
if (id === this.uploadingActionId) {
|
|
@@ -57006,6 +57006,21 @@
|
|
|
57006
57006
|
}
|
|
57007
57007
|
return fields;
|
|
57008
57008
|
}
|
|
57009
|
+
getRedirectMappings(action) {
|
|
57010
|
+
if (action.data.method === 'post' && action.response.status === 204) {
|
|
57011
|
+
return undefined;
|
|
57012
|
+
}
|
|
57013
|
+
return super.getRedirectMappings(action);
|
|
57014
|
+
}
|
|
57015
|
+
async handleActionCompleted(completedAction, queueOperations, allHandlers) {
|
|
57016
|
+
if (completedAction.response.status === 204 && completedAction.data.method === 'post') {
|
|
57017
|
+
// if we get a 204 it means the record creation was successful but we don't have the record to ingest
|
|
57018
|
+
// remove the synthesized draft and do not try to ingest the response
|
|
57019
|
+
await this.evictKey(completedAction.tag);
|
|
57020
|
+
return;
|
|
57021
|
+
}
|
|
57022
|
+
return super.handleActionCompleted(completedAction, queueOperations, allHandlers);
|
|
57023
|
+
}
|
|
57009
57024
|
async fetchReferenceRecord(referenceFields) {
|
|
57010
57025
|
const promises = referenceFields.map(async (referenceFieldInfo) => {
|
|
57011
57026
|
const apiName = await this.identifyApiName(referenceFieldInfo.id, referenceFieldInfo.field);
|
|
@@ -60613,11 +60628,17 @@
|
|
|
60613
60628
|
return this.getTable(segment).getAll(segment);
|
|
60614
60629
|
}
|
|
60615
60630
|
setEntries(entries, segment) {
|
|
60631
|
+
if (keys$9(entries).length === 0) {
|
|
60632
|
+
return Promise.resolve();
|
|
60633
|
+
}
|
|
60616
60634
|
const table = this.getTable(segment);
|
|
60617
60635
|
const upsertOperation = table.entriesToUpsertOperations(entries, segment);
|
|
60618
60636
|
return this.batchOperationAsPromise([upsertOperation]);
|
|
60619
60637
|
}
|
|
60620
60638
|
setMetadata(entries, segment) {
|
|
60639
|
+
if (keys$9(entries).length === 0) {
|
|
60640
|
+
return Promise.resolve();
|
|
60641
|
+
}
|
|
60621
60642
|
const table = this.getTable(segment);
|
|
60622
60643
|
let operation;
|
|
60623
60644
|
if (this.supportsBatchUpdates) {
|
|
@@ -60634,32 +60655,41 @@
|
|
|
60634
60655
|
batchOperations(operations) {
|
|
60635
60656
|
const sqliteOperations = operations.reduce((acc, cur) => {
|
|
60636
60657
|
if (cur.type === 'setEntries') {
|
|
60637
|
-
|
|
60638
|
-
|
|
60658
|
+
if (keys$9(cur.entries).length > 0) {
|
|
60659
|
+
const table = this.getTable(cur.segment);
|
|
60660
|
+
acc.push(table.entriesToUpsertOperations(cur.entries, cur.segment));
|
|
60661
|
+
}
|
|
60639
60662
|
}
|
|
60640
60663
|
else if (cur.type === 'setMetadata') {
|
|
60641
|
-
|
|
60642
|
-
|
|
60643
|
-
|
|
60644
|
-
|
|
60645
|
-
|
|
60646
|
-
|
|
60647
|
-
|
|
60648
|
-
|
|
60649
|
-
|
|
60650
|
-
|
|
60664
|
+
if (keys$9(cur.entries).length > 0) {
|
|
60665
|
+
const table = this.getTable(cur.segment);
|
|
60666
|
+
if (this.supportsBatchUpdates) {
|
|
60667
|
+
acc.push(table.metadataToUpdateOperations(cur.entries, cur.segment));
|
|
60668
|
+
}
|
|
60669
|
+
else {
|
|
60670
|
+
const upsert = table.entriesToUpsertOperations(cur.entries, cur.segment);
|
|
60671
|
+
// manually set the context type on the upsert so notifications do not notify rebuilds without
|
|
60672
|
+
// plugin updates
|
|
60673
|
+
upsert.context.type = 'setMetadata';
|
|
60674
|
+
acc.push(upsert);
|
|
60675
|
+
}
|
|
60651
60676
|
}
|
|
60652
60677
|
}
|
|
60653
60678
|
else {
|
|
60654
|
-
|
|
60679
|
+
if (cur.ids.length > 0) {
|
|
60680
|
+
acc.push(this.idsToDeleteOperation(cur.ids, cur.segment));
|
|
60681
|
+
}
|
|
60655
60682
|
}
|
|
60656
60683
|
return acc;
|
|
60657
60684
|
}, []);
|
|
60658
|
-
return
|
|
60685
|
+
return sqliteOperations.length === 0
|
|
60686
|
+
? Promise.resolve()
|
|
60687
|
+
: this.batchOperationAsPromise(sqliteOperations);
|
|
60659
60688
|
}
|
|
60660
60689
|
evictEntries(entryIds, segment) {
|
|
60661
|
-
|
|
60662
|
-
|
|
60690
|
+
return entryIds.length === 0
|
|
60691
|
+
? Promise.resolve()
|
|
60692
|
+
: this.batchOperationAsPromise([this.idsToDeleteOperation(entryIds, segment)]);
|
|
60663
60693
|
}
|
|
60664
60694
|
registerOnChangedListener(listener) {
|
|
60665
60695
|
let unsubscribeId = undefined;
|
|
@@ -62296,7 +62326,7 @@
|
|
|
62296
62326
|
id: '@salesforce/lds-network-adapter',
|
|
62297
62327
|
instrument: instrument$2,
|
|
62298
62328
|
});
|
|
62299
|
-
// version: 1.
|
|
62329
|
+
// version: 1.285.0-67d4d6869
|
|
62300
62330
|
|
|
62301
62331
|
const { create: create$3, keys: keys$3 } = Object;
|
|
62302
62332
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
@@ -69313,7 +69343,7 @@
|
|
|
69313
69343
|
}
|
|
69314
69344
|
|
|
69315
69345
|
const name$E = 'RecordConnection';
|
|
69316
|
-
const TTL$
|
|
69346
|
+
const TTL$5 = 300000;
|
|
69317
69347
|
const VERSION$N = '5109e37c62e492243c1e6ae3967b0655';
|
|
69318
69348
|
function keyBuilder$I(luvio, path, data) {
|
|
69319
69349
|
return path.fullPath;
|
|
@@ -69391,7 +69421,7 @@
|
|
|
69391
69421
|
createLink: createLink,
|
|
69392
69422
|
mergeData: mergeData$E,
|
|
69393
69423
|
storeMetadataParams: {
|
|
69394
|
-
ttl: TTL$
|
|
69424
|
+
ttl: TTL$5,
|
|
69395
69425
|
namespace: keyPrefix$1,
|
|
69396
69426
|
representationName: "RecordConnection",
|
|
69397
69427
|
version: VERSION$N,
|
|
@@ -76292,7 +76322,7 @@
|
|
|
76292
76322
|
}
|
|
76293
76323
|
|
|
76294
76324
|
const name$a = 'ObjectInfo';
|
|
76295
|
-
const TTL$
|
|
76325
|
+
const TTL$4 = 900000;
|
|
76296
76326
|
const VERSION$j = 'f8f627dd56d42a39e1a6642edb039182';
|
|
76297
76327
|
function keyBuilder$e(luvio, path, data) {
|
|
76298
76328
|
return path.fullPath;
|
|
@@ -76318,7 +76348,7 @@
|
|
|
76318
76348
|
createLink: createLink,
|
|
76319
76349
|
mergeData: mergeData$a,
|
|
76320
76350
|
storeMetadataParams: {
|
|
76321
|
-
ttl: TTL$
|
|
76351
|
+
ttl: TTL$4,
|
|
76322
76352
|
namespace: keyPrefix$1,
|
|
76323
76353
|
representationName: "ObjectInfo",
|
|
76324
76354
|
version: VERSION$j,
|
|
@@ -77008,7 +77038,7 @@
|
|
|
77008
77038
|
}
|
|
77009
77039
|
|
|
77010
77040
|
const name$7 = 'RelatedListInfo';
|
|
77011
|
-
const TTL$
|
|
77041
|
+
const TTL$3 = 900000;
|
|
77012
77042
|
const VERSION$g = 'a32cfdff7ca8dcf4b534b3491fef2019';
|
|
77013
77043
|
function keyBuilder$b(luvio, path, data) {
|
|
77014
77044
|
return path.fullPath;
|
|
@@ -77034,7 +77064,7 @@
|
|
|
77034
77064
|
createLink: createLink,
|
|
77035
77065
|
mergeData: mergeData$7,
|
|
77036
77066
|
storeMetadataParams: {
|
|
77037
|
-
ttl: TTL$
|
|
77067
|
+
ttl: TTL$3,
|
|
77038
77068
|
namespace: keyPrefix$1,
|
|
77039
77069
|
representationName: "RelatedListInfo",
|
|
77040
77070
|
version: VERSION$g,
|
|
@@ -78862,6 +78892,7 @@
|
|
|
78862
78892
|
}
|
|
78863
78893
|
|
|
78864
78894
|
const name$1 = 'Setup__Setup';
|
|
78895
|
+
const TTL$2 = 1000;
|
|
78865
78896
|
const VERSION$9 = '57c66c8147b44793116747c96b2b0fc9';
|
|
78866
78897
|
function keyBuilder$5(luvio, path, data) {
|
|
78867
78898
|
return path.fullPath;
|
|
@@ -78887,7 +78918,7 @@
|
|
|
78887
78918
|
createLink: createLink,
|
|
78888
78919
|
mergeData: mergeData$1,
|
|
78889
78920
|
storeMetadataParams: {
|
|
78890
|
-
ttl: TTL$
|
|
78921
|
+
ttl: TTL$2,
|
|
78891
78922
|
namespace: keyPrefix$1,
|
|
78892
78923
|
representationName: "Setup__Setup",
|
|
78893
78924
|
version: VERSION$9,
|
|
@@ -82344,7 +82375,7 @@
|
|
|
82344
82375
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
82345
82376
|
instrument: instrument$1,
|
|
82346
82377
|
});
|
|
82347
|
-
// version: 1.
|
|
82378
|
+
// version: 1.285.0-c97dec82e
|
|
82348
82379
|
|
|
82349
82380
|
// On core the unstable adapters are re-exported with different names,
|
|
82350
82381
|
// we want to match them here.
|
|
@@ -84600,7 +84631,7 @@
|
|
|
84600
84631
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
84601
84632
|
graphQLImperative = ldsAdapter;
|
|
84602
84633
|
});
|
|
84603
|
-
// version: 1.
|
|
84634
|
+
// version: 1.285.0-c97dec82e
|
|
84604
84635
|
|
|
84605
84636
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
84606
84637
|
__proto__: null,
|
|
@@ -85338,7 +85369,7 @@
|
|
|
85338
85369
|
function register(r) {
|
|
85339
85370
|
callbacks$1.forEach((callback) => callback(r));
|
|
85340
85371
|
}
|
|
85341
|
-
// version: 1.
|
|
85372
|
+
// version: 1.285.0-67d4d6869
|
|
85342
85373
|
|
|
85343
85374
|
/**
|
|
85344
85375
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -90309,4 +90340,4 @@
|
|
|
90309
90340
|
exports.subscribeToAdapter = subscribeToAdapter;
|
|
90310
90341
|
|
|
90311
90342
|
}));
|
|
90312
|
-
// version: 1.
|
|
90343
|
+
// version: 1.285.0-67d4d6869
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-worker-api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.285.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.285.0",
|
|
39
|
+
"@salesforce/lds-adapters-uiapi": "^1.285.0",
|
|
40
|
+
"@salesforce/lds-default-luvio": "^1.285.0",
|
|
41
|
+
"@salesforce/lds-drafts": "^1.285.0",
|
|
42
|
+
"@salesforce/lds-graphql-parser": "^1.285.0",
|
|
43
|
+
"@salesforce/lds-luvio-engine": "^1.285.0",
|
|
44
|
+
"@salesforce/lds-priming": "^1.285.0",
|
|
45
|
+
"@salesforce/lds-runtime-mobile": "^1.285.0",
|
|
46
|
+
"@salesforce/nimbus-plugin-lds": "^1.285.0",
|
|
47
47
|
"ajv": "^8.11.0",
|
|
48
48
|
"glob": "^7.1.5",
|
|
49
49
|
"nimbus-types": "^2.0.0-alpha1",
|
|
@@ -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
|
],
|