@salesforce/lds-worker-api 1.347.1 → 1.348.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.
|
@@ -1128,4 +1128,4 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
1128
1128
|
}
|
|
1129
1129
|
|
|
1130
1130
|
export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
|
|
1131
|
-
// version: 1.
|
|
1131
|
+
// version: 1.348.0-09ae8e3e37
|
|
@@ -4266,7 +4266,7 @@ function withDefaultLuvio(callback) {
|
|
|
4266
4266
|
}
|
|
4267
4267
|
callbacks.push(callback);
|
|
4268
4268
|
}
|
|
4269
|
-
// version: 1.
|
|
4269
|
+
// version: 1.348.0-09ae8e3e37
|
|
4270
4270
|
|
|
4271
4271
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
4272
4272
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -5214,7 +5214,7 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
|
|
|
5214
5214
|
const { apiFamily, name } = metadata;
|
|
5215
5215
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
5216
5216
|
}
|
|
5217
|
-
// version: 1.
|
|
5217
|
+
// version: 1.348.0-09ae8e3e37
|
|
5218
5218
|
|
|
5219
5219
|
/**
|
|
5220
5220
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -30363,7 +30363,7 @@ function ingestAndBroadcast(luvio, key, config, body) {
|
|
|
30363
30363
|
return buildCachedSnapshot$5$1(luvio, config);
|
|
30364
30364
|
});
|
|
30365
30365
|
}
|
|
30366
|
-
function clone$
|
|
30366
|
+
function clone$2(userLayoutState) {
|
|
30367
30367
|
return parse$7(stringify$6(userLayoutState));
|
|
30368
30368
|
}
|
|
30369
30369
|
// Applies optimisticUpdate to layoutUserState
|
|
@@ -30386,7 +30386,7 @@ function optimisticUpdate(cachedLayoutUserState, layoutUserStateInput) {
|
|
|
30386
30386
|
if (clonedLayoutUserState === undefined) {
|
|
30387
30387
|
// We have to clone cachedLayoutUserState because this object is coming from
|
|
30388
30388
|
// a snapshot, where it is frozen
|
|
30389
|
-
clonedLayoutUserState = clone$
|
|
30389
|
+
clonedLayoutUserState = clone$2(cachedLayoutUserState);
|
|
30390
30390
|
// hold onto sectionUserStates from clonedLayoutUserState
|
|
30391
30391
|
clonedLayoutUserStateSections = clonedLayoutUserState.sectionUserStates;
|
|
30392
30392
|
}
|
|
@@ -33971,7 +33971,7 @@ withDefaultLuvio((luvio) => {
|
|
|
33971
33971
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
33972
33972
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
33973
33973
|
});
|
|
33974
|
-
// version: 1.
|
|
33974
|
+
// version: 1.348.0-4aa8c0c0cb
|
|
33975
33975
|
|
|
33976
33976
|
/**
|
|
33977
33977
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -48064,7 +48064,7 @@ class DurableDraftQueue {
|
|
|
48064
48064
|
}
|
|
48065
48065
|
}
|
|
48066
48066
|
|
|
48067
|
-
function clone(obj) {
|
|
48067
|
+
function clone$1(obj) {
|
|
48068
48068
|
return parse$3(stringify$3(obj));
|
|
48069
48069
|
}
|
|
48070
48070
|
|
|
@@ -48111,7 +48111,7 @@ class DurableDraftStore {
|
|
|
48111
48111
|
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
48112
48112
|
const key = keys$1[i];
|
|
48113
48113
|
// clone draft so we don't expose the internal draft store
|
|
48114
|
-
actionArray.push(clone(draftStore[key]));
|
|
48114
|
+
actionArray.push(clone$1(draftStore[key]));
|
|
48115
48115
|
}
|
|
48116
48116
|
return actionArray;
|
|
48117
48117
|
});
|
|
@@ -79472,9 +79472,15 @@ class AbstractResourceRequestActionHandler {
|
|
|
79472
79472
|
await this.recordService.reapplyRecordSideEffects(impactedKeys);
|
|
79473
79473
|
}
|
|
79474
79474
|
async handleActionReplaced(target, source) {
|
|
79475
|
+
// remove both the siden effects from the actions being merged before we
|
|
79476
|
+
// recalculate the new side effect value needed
|
|
79475
79477
|
const impactedKeysFromRemove = await this.recordService.removeSideEffectsForAction(source);
|
|
79478
|
+
const removedSideEffectFromSet = await this.recordService.removeSideEffectsForAction(target);
|
|
79479
|
+
// revert the values in the DEFAULT store back to what it was before the removed side effects
|
|
79480
|
+
await this.recordService.reapplyRecordSideEffects(new Set([...impactedKeysFromRemove, ...removedSideEffectFromSet]));
|
|
79481
|
+
// set the new side effect values for the merged action
|
|
79476
79482
|
const impactedKeysFromSet = await this.recordService.setSideEffectsForActions([target]);
|
|
79477
|
-
await this.recordService.reapplyRecordSideEffects(new Set([...
|
|
79483
|
+
await this.recordService.reapplyRecordSideEffects(new Set([...impactedKeysFromSet]));
|
|
79478
79484
|
}
|
|
79479
79485
|
async handleActionCompleted(action, queueOperations) {
|
|
79480
79486
|
const { data: request, tag } = action;
|
|
@@ -92267,6 +92273,10 @@ class SideEffectService {
|
|
|
92267
92273
|
}
|
|
92268
92274
|
}
|
|
92269
92275
|
|
|
92276
|
+
function clone(obj) {
|
|
92277
|
+
return parse$2(stringify$2(obj));
|
|
92278
|
+
}
|
|
92279
|
+
|
|
92270
92280
|
/* global __nimbus */
|
|
92271
92281
|
class CreateRecordEffectHandler {
|
|
92272
92282
|
apply(entry, effect) {
|
|
@@ -92274,7 +92284,9 @@ class CreateRecordEffectHandler {
|
|
|
92274
92284
|
// log that we can't apply a draft-create to an existing record
|
|
92275
92285
|
throw Error('cannot apply a record-create side effect to an existing record');
|
|
92276
92286
|
}
|
|
92277
|
-
return
|
|
92287
|
+
// return a copy of the record to not modify
|
|
92288
|
+
// what is saved in the side effect store
|
|
92289
|
+
return { ...clone(effect.record) };
|
|
92278
92290
|
}
|
|
92279
92291
|
}
|
|
92280
92292
|
class UpdateRecordEffectHandler {
|
|
@@ -92760,7 +92772,7 @@ register$1({
|
|
|
92760
92772
|
id: '@salesforce/lds-network-adapter',
|
|
92761
92773
|
instrument: instrument$2,
|
|
92762
92774
|
});
|
|
92763
|
-
// version: 1.
|
|
92775
|
+
// version: 1.348.0-09ae8e3e37
|
|
92764
92776
|
|
|
92765
92777
|
const { create: create$2, keys: keys$2 } = Object;
|
|
92766
92778
|
const { stringify, parse } = JSON;
|
|
@@ -116655,7 +116667,7 @@ register$1({
|
|
|
116655
116667
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
116656
116668
|
instrument: instrument$1,
|
|
116657
116669
|
});
|
|
116658
|
-
// version: 1.
|
|
116670
|
+
// version: 1.348.0-4aa8c0c0cb
|
|
116659
116671
|
|
|
116660
116672
|
// On core the unstable adapters are re-exported with different names,
|
|
116661
116673
|
// we want to match them here.
|
|
@@ -116807,7 +116819,7 @@ withDefaultLuvio((luvio) => {
|
|
|
116807
116819
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
116808
116820
|
graphQLImperative = ldsAdapter;
|
|
116809
116821
|
});
|
|
116810
|
-
// version: 1.
|
|
116822
|
+
// version: 1.348.0-4aa8c0c0cb
|
|
116811
116823
|
|
|
116812
116824
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
116813
116825
|
__proto__: null,
|
|
@@ -117599,7 +117611,7 @@ const callbacks$1 = [];
|
|
|
117599
117611
|
function register(r) {
|
|
117600
117612
|
callbacks$1.forEach((callback) => callback(r));
|
|
117601
117613
|
}
|
|
117602
|
-
// version: 1.
|
|
117614
|
+
// version: 1.348.0-09ae8e3e37
|
|
117603
117615
|
|
|
117604
117616
|
/**
|
|
117605
117617
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -118679,4 +118691,4 @@ const { luvio } = getRuntime();
|
|
|
118679
118691
|
setDefaultLuvio({ luvio });
|
|
118680
118692
|
|
|
118681
118693
|
export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
|
|
118682
|
-
// version: 1.
|
|
118694
|
+
// version: 1.348.0-09ae8e3e37
|
|
@@ -4272,7 +4272,7 @@
|
|
|
4272
4272
|
}
|
|
4273
4273
|
callbacks.push(callback);
|
|
4274
4274
|
}
|
|
4275
|
-
// version: 1.
|
|
4275
|
+
// version: 1.348.0-09ae8e3e37
|
|
4276
4276
|
|
|
4277
4277
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
4278
4278
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -5220,7 +5220,7 @@
|
|
|
5220
5220
|
const { apiFamily, name } = metadata;
|
|
5221
5221
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
5222
5222
|
}
|
|
5223
|
-
// version: 1.
|
|
5223
|
+
// version: 1.348.0-09ae8e3e37
|
|
5224
5224
|
|
|
5225
5225
|
/**
|
|
5226
5226
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -30369,7 +30369,7 @@
|
|
|
30369
30369
|
return buildCachedSnapshot$5$1(luvio, config);
|
|
30370
30370
|
});
|
|
30371
30371
|
}
|
|
30372
|
-
function clone$
|
|
30372
|
+
function clone$2(userLayoutState) {
|
|
30373
30373
|
return parse$7(stringify$6(userLayoutState));
|
|
30374
30374
|
}
|
|
30375
30375
|
// Applies optimisticUpdate to layoutUserState
|
|
@@ -30392,7 +30392,7 @@
|
|
|
30392
30392
|
if (clonedLayoutUserState === undefined) {
|
|
30393
30393
|
// We have to clone cachedLayoutUserState because this object is coming from
|
|
30394
30394
|
// a snapshot, where it is frozen
|
|
30395
|
-
clonedLayoutUserState = clone$
|
|
30395
|
+
clonedLayoutUserState = clone$2(cachedLayoutUserState);
|
|
30396
30396
|
// hold onto sectionUserStates from clonedLayoutUserState
|
|
30397
30397
|
clonedLayoutUserStateSections = clonedLayoutUserState.sectionUserStates;
|
|
30398
30398
|
}
|
|
@@ -33977,7 +33977,7 @@
|
|
|
33977
33977
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
33978
33978
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
33979
33979
|
});
|
|
33980
|
-
// version: 1.
|
|
33980
|
+
// version: 1.348.0-4aa8c0c0cb
|
|
33981
33981
|
|
|
33982
33982
|
/**
|
|
33983
33983
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -48070,7 +48070,7 @@
|
|
|
48070
48070
|
}
|
|
48071
48071
|
}
|
|
48072
48072
|
|
|
48073
|
-
function clone(obj) {
|
|
48073
|
+
function clone$1(obj) {
|
|
48074
48074
|
return parse$3(stringify$3(obj));
|
|
48075
48075
|
}
|
|
48076
48076
|
|
|
@@ -48117,7 +48117,7 @@
|
|
|
48117
48117
|
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
48118
48118
|
const key = keys$1[i];
|
|
48119
48119
|
// clone draft so we don't expose the internal draft store
|
|
48120
|
-
actionArray.push(clone(draftStore[key]));
|
|
48120
|
+
actionArray.push(clone$1(draftStore[key]));
|
|
48121
48121
|
}
|
|
48122
48122
|
return actionArray;
|
|
48123
48123
|
});
|
|
@@ -79478,9 +79478,15 @@
|
|
|
79478
79478
|
await this.recordService.reapplyRecordSideEffects(impactedKeys);
|
|
79479
79479
|
}
|
|
79480
79480
|
async handleActionReplaced(target, source) {
|
|
79481
|
+
// remove both the siden effects from the actions being merged before we
|
|
79482
|
+
// recalculate the new side effect value needed
|
|
79481
79483
|
const impactedKeysFromRemove = await this.recordService.removeSideEffectsForAction(source);
|
|
79484
|
+
const removedSideEffectFromSet = await this.recordService.removeSideEffectsForAction(target);
|
|
79485
|
+
// revert the values in the DEFAULT store back to what it was before the removed side effects
|
|
79486
|
+
await this.recordService.reapplyRecordSideEffects(new Set([...impactedKeysFromRemove, ...removedSideEffectFromSet]));
|
|
79487
|
+
// set the new side effect values for the merged action
|
|
79482
79488
|
const impactedKeysFromSet = await this.recordService.setSideEffectsForActions([target]);
|
|
79483
|
-
await this.recordService.reapplyRecordSideEffects(new Set([...
|
|
79489
|
+
await this.recordService.reapplyRecordSideEffects(new Set([...impactedKeysFromSet]));
|
|
79484
79490
|
}
|
|
79485
79491
|
async handleActionCompleted(action, queueOperations) {
|
|
79486
79492
|
const { data: request, tag } = action;
|
|
@@ -92273,6 +92279,10 @@
|
|
|
92273
92279
|
}
|
|
92274
92280
|
}
|
|
92275
92281
|
|
|
92282
|
+
function clone(obj) {
|
|
92283
|
+
return parse$2(stringify$2(obj));
|
|
92284
|
+
}
|
|
92285
|
+
|
|
92276
92286
|
/* global __nimbus */
|
|
92277
92287
|
class CreateRecordEffectHandler {
|
|
92278
92288
|
apply(entry, effect) {
|
|
@@ -92280,7 +92290,9 @@
|
|
|
92280
92290
|
// log that we can't apply a draft-create to an existing record
|
|
92281
92291
|
throw Error('cannot apply a record-create side effect to an existing record');
|
|
92282
92292
|
}
|
|
92283
|
-
return
|
|
92293
|
+
// return a copy of the record to not modify
|
|
92294
|
+
// what is saved in the side effect store
|
|
92295
|
+
return { ...clone(effect.record) };
|
|
92284
92296
|
}
|
|
92285
92297
|
}
|
|
92286
92298
|
class UpdateRecordEffectHandler {
|
|
@@ -92766,7 +92778,7 @@
|
|
|
92766
92778
|
id: '@salesforce/lds-network-adapter',
|
|
92767
92779
|
instrument: instrument$2,
|
|
92768
92780
|
});
|
|
92769
|
-
// version: 1.
|
|
92781
|
+
// version: 1.348.0-09ae8e3e37
|
|
92770
92782
|
|
|
92771
92783
|
const { create: create$2, keys: keys$2 } = Object;
|
|
92772
92784
|
const { stringify, parse } = JSON;
|
|
@@ -116661,7 +116673,7 @@
|
|
|
116661
116673
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
116662
116674
|
instrument: instrument$1,
|
|
116663
116675
|
});
|
|
116664
|
-
// version: 1.
|
|
116676
|
+
// version: 1.348.0-4aa8c0c0cb
|
|
116665
116677
|
|
|
116666
116678
|
// On core the unstable adapters are re-exported with different names,
|
|
116667
116679
|
// we want to match them here.
|
|
@@ -116813,7 +116825,7 @@
|
|
|
116813
116825
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
116814
116826
|
graphQLImperative = ldsAdapter;
|
|
116815
116827
|
});
|
|
116816
|
-
// version: 1.
|
|
116828
|
+
// version: 1.348.0-4aa8c0c0cb
|
|
116817
116829
|
|
|
116818
116830
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
116819
116831
|
__proto__: null,
|
|
@@ -117605,7 +117617,7 @@
|
|
|
117605
117617
|
function register(r) {
|
|
117606
117618
|
callbacks$1.forEach((callback) => callback(r));
|
|
117607
117619
|
}
|
|
117608
|
-
// version: 1.
|
|
117620
|
+
// version: 1.348.0-09ae8e3e37
|
|
117609
117621
|
|
|
117610
117622
|
/**
|
|
117611
117623
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -118704,4 +118716,4 @@
|
|
|
118704
118716
|
exports.subscribeToAdapter = subscribeToAdapter;
|
|
118705
118717
|
|
|
118706
118718
|
}));
|
|
118707
|
-
// version: 1.
|
|
118719
|
+
// version: 1.348.0-09ae8e3e37
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-worker-api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.348.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "dist/standalone/es/lds-worker-api.js",
|
|
@@ -35,14 +35,14 @@
|
|
|
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-runtime-mobile": "^1.
|
|
45
|
-
"@salesforce/nimbus-plugin-lds": "^1.
|
|
38
|
+
"@salesforce/lds-adapters-graphql": "^1.348.0",
|
|
39
|
+
"@salesforce/lds-adapters-uiapi": "^1.348.0",
|
|
40
|
+
"@salesforce/lds-default-luvio": "^1.348.0",
|
|
41
|
+
"@salesforce/lds-drafts": "^1.348.0",
|
|
42
|
+
"@salesforce/lds-graphql-parser": "^1.348.0",
|
|
43
|
+
"@salesforce/lds-luvio-engine": "^1.348.0",
|
|
44
|
+
"@salesforce/lds-runtime-mobile": "^1.348.0",
|
|
45
|
+
"@salesforce/nimbus-plugin-lds": "^1.348.0",
|
|
46
46
|
"ajv": "^8.11.0",
|
|
47
47
|
"glob": "^7.1.5",
|
|
48
48
|
"nimbus-types": "^2.0.0-alpha1",
|