@salesforce/lds-worker-api 1.368.0 → 1.370.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sfdc/es/ldsWorkerApi.js +1 -1
- package/dist/standalone/es/lds-worker-api.js +1224 -667
- package/dist/standalone/umd/lds-worker-api.js +1224 -667
- package/package.json +9 -9
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
const { hasOwnProperty: hasOwnProperty$4 } = Object.prototype;
|
|
31
31
|
const { isArray: isArray$9 } = Array;
|
|
32
32
|
const { push: push$5, indexOf, slice: slice$2 } = Array.prototype;
|
|
33
|
-
const { parse: parse$
|
|
33
|
+
const { parse: parse$b, stringify: stringify$b } = JSON;
|
|
34
34
|
const WeakSetCtor = WeakSet;
|
|
35
35
|
|
|
36
36
|
const deeplyFrozen = new WeakSetCtor();
|
|
@@ -308,7 +308,7 @@
|
|
|
308
308
|
return isFinite(node) ? '' + node : 'null';
|
|
309
309
|
}
|
|
310
310
|
if (typeof node !== 'object') {
|
|
311
|
-
return stringify$
|
|
311
|
+
return stringify$b(node);
|
|
312
312
|
}
|
|
313
313
|
let i;
|
|
314
314
|
let out;
|
|
@@ -336,7 +336,7 @@
|
|
|
336
336
|
if (out) {
|
|
337
337
|
out += ',';
|
|
338
338
|
}
|
|
339
|
-
out += stringify$
|
|
339
|
+
out += stringify$b(key) + ':' + value;
|
|
340
340
|
}
|
|
341
341
|
return '{' + out + '}';
|
|
342
342
|
}
|
|
@@ -2320,7 +2320,7 @@
|
|
|
2320
2320
|
if (hasOwnProperty$4.call(argValues, _argName)) {
|
|
2321
2321
|
var value = argValues[_argName];
|
|
2322
2322
|
if (value !== null || value !== undefined) {
|
|
2323
|
-
values.push(_argName + ':' + stringify$
|
|
2323
|
+
values.push(_argName + ':' + stringify$b(value));
|
|
2324
2324
|
}
|
|
2325
2325
|
}
|
|
2326
2326
|
}
|
|
@@ -2635,7 +2635,7 @@
|
|
|
2635
2635
|
}
|
|
2636
2636
|
// Only works for non-complex values.. No Date or Functions.
|
|
2637
2637
|
opaqueCopy(value) {
|
|
2638
|
-
return parse$
|
|
2638
|
+
return parse$b(stringify$b(value));
|
|
2639
2639
|
}
|
|
2640
2640
|
deepCopy(record, data, key, visitedKeys) {
|
|
2641
2641
|
const value = record[key];
|
|
@@ -2781,7 +2781,7 @@
|
|
|
2781
2781
|
this.readScalar(propertyName, source, sink);
|
|
2782
2782
|
return;
|
|
2783
2783
|
}
|
|
2784
|
-
throw new Error(`Invalid Link State. Link on "${this.currentPath.fullPath}" is null but selection is not nullable: \n${stringify$
|
|
2784
|
+
throw new Error(`Invalid Link State. Link on "${this.currentPath.fullPath}" is null but selection is not nullable: \n${stringify$b(selection, null, 2)}`);
|
|
2785
2785
|
case StoreLinkStateValues$2.Pending:
|
|
2786
2786
|
this.markPending();
|
|
2787
2787
|
return;
|
|
@@ -2903,7 +2903,7 @@
|
|
|
2903
2903
|
}
|
|
2904
2904
|
if ((options === null || options === void 0 ? void 0 : options.useDeepEquals) === true) {
|
|
2905
2905
|
this.snapshotChanged =
|
|
2906
|
-
stringify$
|
|
2906
|
+
stringify$b(this.currentPath.baseSnapshotValue) !== stringify$b(value);
|
|
2907
2907
|
}
|
|
2908
2908
|
else {
|
|
2909
2909
|
this.snapshotChanged = this.currentPath.baseSnapshotValue !== value;
|
|
@@ -3304,7 +3304,7 @@
|
|
|
3304
3304
|
return error;
|
|
3305
3305
|
}
|
|
3306
3306
|
// anything else should get turned into an Error with the errorType set
|
|
3307
|
-
const normalizedError = new Error(`NetworkAdapter rejected with non-Error object: ${typeof error === 'undefined' ? 'undefined' : stringify$
|
|
3307
|
+
const normalizedError = new Error(`NetworkAdapter rejected with non-Error object: ${typeof error === 'undefined' ? 'undefined' : stringify$b(error)}`);
|
|
3308
3308
|
normalizedError.errorType = 'networkAdapterError';
|
|
3309
3309
|
return normalizedError;
|
|
3310
3310
|
}
|
|
@@ -4152,7 +4152,7 @@
|
|
|
4152
4152
|
}
|
|
4153
4153
|
return resourceParams;
|
|
4154
4154
|
}
|
|
4155
|
-
// engine version: 0.158.
|
|
4155
|
+
// engine version: 0.158.7-bafe2646
|
|
4156
4156
|
|
|
4157
4157
|
/**
|
|
4158
4158
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -4280,7 +4280,7 @@
|
|
|
4280
4280
|
}
|
|
4281
4281
|
callbacks.push(callback);
|
|
4282
4282
|
}
|
|
4283
|
-
// version: 1.
|
|
4283
|
+
// version: 1.370.0-3ec6ffba72
|
|
4284
4284
|
|
|
4285
4285
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
4286
4286
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -4396,7 +4396,7 @@
|
|
|
4396
4396
|
}
|
|
4397
4397
|
|
|
4398
4398
|
const { isArray: isArray$8 } = Array;
|
|
4399
|
-
const { stringify: stringify$
|
|
4399
|
+
const { stringify: stringify$a } = JSON;
|
|
4400
4400
|
|
|
4401
4401
|
/**
|
|
4402
4402
|
* (Re)throws an error after adding a prefix to the message.
|
|
@@ -4409,7 +4409,7 @@
|
|
|
4409
4409
|
error.message = `${messagePrefix}\n[${error.message}]`;
|
|
4410
4410
|
throw error;
|
|
4411
4411
|
}
|
|
4412
|
-
throw new Error(`${messagePrefix}\n[${stringify$
|
|
4412
|
+
throw new Error(`${messagePrefix}\n[${stringify$a(error)}]`);
|
|
4413
4413
|
}
|
|
4414
4414
|
|
|
4415
4415
|
class Sanitizer {
|
|
@@ -4425,7 +4425,7 @@
|
|
|
4425
4425
|
}
|
|
4426
4426
|
sanitize() {
|
|
4427
4427
|
const sanitizer = this;
|
|
4428
|
-
stringify$
|
|
4428
|
+
stringify$a(this.obj, function (key, value) {
|
|
4429
4429
|
if (key === '') {
|
|
4430
4430
|
return value;
|
|
4431
4431
|
}
|
|
@@ -4651,6 +4651,53 @@
|
|
|
4651
4651
|
return constructor;
|
|
4652
4652
|
}
|
|
4653
4653
|
|
|
4654
|
+
/**
|
|
4655
|
+
* Simple deep equality comparison for configuration objects.
|
|
4656
|
+
* Handles primitives, arrays, and plain objects.
|
|
4657
|
+
*/
|
|
4658
|
+
function deepEquals$1(a, b) {
|
|
4659
|
+
if (a === b) {
|
|
4660
|
+
return true;
|
|
4661
|
+
}
|
|
4662
|
+
if (a === null || a === undefined || b === null || b === undefined) {
|
|
4663
|
+
return a === b;
|
|
4664
|
+
}
|
|
4665
|
+
if (typeof a !== typeof b) {
|
|
4666
|
+
return false;
|
|
4667
|
+
}
|
|
4668
|
+
if (typeof a !== 'object') {
|
|
4669
|
+
return false;
|
|
4670
|
+
}
|
|
4671
|
+
if (Array.isArray(a) !== Array.isArray(b)) {
|
|
4672
|
+
return false;
|
|
4673
|
+
}
|
|
4674
|
+
if (Array.isArray(a) && Array.isArray(b)) {
|
|
4675
|
+
if (a.length !== b.length) {
|
|
4676
|
+
return false;
|
|
4677
|
+
}
|
|
4678
|
+
for (let i = 0; i < a.length; i++) {
|
|
4679
|
+
if (!deepEquals$1(a[i], b[i])) {
|
|
4680
|
+
return false;
|
|
4681
|
+
}
|
|
4682
|
+
}
|
|
4683
|
+
return true;
|
|
4684
|
+
}
|
|
4685
|
+
// Handle plain objects
|
|
4686
|
+
const aKeys = Object.keys(a);
|
|
4687
|
+
const bKeys = Object.keys(b);
|
|
4688
|
+
if (aKeys.length !== bKeys.length) {
|
|
4689
|
+
return false;
|
|
4690
|
+
}
|
|
4691
|
+
for (const key of aKeys) {
|
|
4692
|
+
if (!bKeys.includes(key)) {
|
|
4693
|
+
return false;
|
|
4694
|
+
}
|
|
4695
|
+
if (!deepEquals$1(a[key], b[key])) {
|
|
4696
|
+
return false;
|
|
4697
|
+
}
|
|
4698
|
+
}
|
|
4699
|
+
return true;
|
|
4700
|
+
}
|
|
4654
4701
|
class LWCInfinteScrollingLuvioWireAdapter extends LWCLuvioWireAdapter {
|
|
4655
4702
|
constructor(adapter, name, luvio, callback, sourceContext, paginationConfigParamNames) {
|
|
4656
4703
|
super(adapter, name, luvio, callback, sourceContext);
|
|
@@ -4686,7 +4733,7 @@
|
|
|
4686
4733
|
var _a;
|
|
4687
4734
|
// If this is not a pagination param and its value has changed
|
|
4688
4735
|
return (!((_a = this.paginationConfigParamNames) === null || _a === void 0 ? void 0 : _a.includes(paramName)) &&
|
|
4689
|
-
config[paramName]
|
|
4736
|
+
!deepEquals$1(config[paramName], currentConfig === null || currentConfig === void 0 ? void 0 : currentConfig[paramName]));
|
|
4690
4737
|
});
|
|
4691
4738
|
if (hasNonPaginationParamChanged) {
|
|
4692
4739
|
this.connectTimestamp = Date.now();
|
|
@@ -5137,12 +5184,16 @@
|
|
|
5137
5184
|
callback(snapshotToTuple(snapshotOrPromise));
|
|
5138
5185
|
return;
|
|
5139
5186
|
}
|
|
5140
|
-
snapshotOrPromise
|
|
5187
|
+
snapshotOrPromise
|
|
5188
|
+
.then((snapshot) => {
|
|
5141
5189
|
if (snapshot === null) {
|
|
5142
5190
|
callback(createInvalidConfigError());
|
|
5143
5191
|
return;
|
|
5144
5192
|
}
|
|
5145
5193
|
callback(snapshotToTuple(snapshot));
|
|
5194
|
+
})
|
|
5195
|
+
.finally(() => {
|
|
5196
|
+
luvio.storeCleanup();
|
|
5146
5197
|
});
|
|
5147
5198
|
};
|
|
5148
5199
|
defineProperty(imperativeAdapterInvoke, 'name', {
|
|
@@ -5245,7 +5296,7 @@
|
|
|
5245
5296
|
const { apiFamily, name } = metadata;
|
|
5246
5297
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
5247
5298
|
}
|
|
5248
|
-
// version: 1.
|
|
5299
|
+
// version: 1.370.0-3ec6ffba72
|
|
5249
5300
|
|
|
5250
5301
|
/**
|
|
5251
5302
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -5344,7 +5395,7 @@
|
|
|
5344
5395
|
TypeCheckShapes[TypeCheckShapes["Integer"] = 3] = "Integer";
|
|
5345
5396
|
TypeCheckShapes[TypeCheckShapes["Unsupported"] = 4] = "Unsupported";
|
|
5346
5397
|
})(TypeCheckShapes || (TypeCheckShapes = {}));
|
|
5347
|
-
// engine version: 0.158.
|
|
5398
|
+
// engine version: 0.158.7-bafe2646
|
|
5348
5399
|
|
|
5349
5400
|
const { keys: ObjectKeys$4, create: ObjectCreate$4 } = Object;
|
|
5350
5401
|
|
|
@@ -5407,6 +5458,14 @@
|
|
|
5407
5458
|
* One store enabled Get Object Infos adapter
|
|
5408
5459
|
*/
|
|
5409
5460
|
let oneStoreGetObjectInfosAdapter$3 = undefined;
|
|
5461
|
+
/**
|
|
5462
|
+
* One store enabled GraphQL adapter
|
|
5463
|
+
*/
|
|
5464
|
+
let oneStoreGraphQLWireAdapter$3 = undefined;
|
|
5465
|
+
/**
|
|
5466
|
+
* One store enabled GraphQL imperative query adapter
|
|
5467
|
+
*/
|
|
5468
|
+
let oneStoreGraphQLImperativeQueryAdapter$3 = undefined;
|
|
5410
5469
|
/**
|
|
5411
5470
|
* Determines when to include PDL strategies for Related Lists
|
|
5412
5471
|
*/
|
|
@@ -5433,6 +5492,18 @@
|
|
|
5433
5492
|
getGetObjectInfosAdapter: function () {
|
|
5434
5493
|
return oneStoreGetObjectInfosAdapter$3;
|
|
5435
5494
|
},
|
|
5495
|
+
setGraphQLWireAdapter: function (adapter) {
|
|
5496
|
+
oneStoreGraphQLWireAdapter$3 = adapter;
|
|
5497
|
+
},
|
|
5498
|
+
getGraphQLWireAdapter: function () {
|
|
5499
|
+
return oneStoreGraphQLWireAdapter$3;
|
|
5500
|
+
},
|
|
5501
|
+
setGraphQLImperativeQueryAdapter: function (adapter) {
|
|
5502
|
+
oneStoreGraphQLImperativeQueryAdapter$3 = adapter;
|
|
5503
|
+
},
|
|
5504
|
+
getGraphQLImperativeQueryAdapter: function () {
|
|
5505
|
+
return oneStoreGraphQLImperativeQueryAdapter$3;
|
|
5506
|
+
},
|
|
5436
5507
|
};
|
|
5437
5508
|
const getKeywordSearchResultsFactory$3 = new Configurable$3();
|
|
5438
5509
|
const getListRecordsByNameFactory$3 = new Configurable$3();
|
|
@@ -5672,6 +5743,14 @@
|
|
|
5672
5743
|
* One store enabled Get Object Infos adapter
|
|
5673
5744
|
*/
|
|
5674
5745
|
let oneStoreGetObjectInfosAdapter$2 = undefined;
|
|
5746
|
+
/**
|
|
5747
|
+
* One store enabled GraphQL adapter
|
|
5748
|
+
*/
|
|
5749
|
+
let oneStoreGraphQLWireAdapter$2 = undefined;
|
|
5750
|
+
/**
|
|
5751
|
+
* One store enabled GraphQL imperative query adapter
|
|
5752
|
+
*/
|
|
5753
|
+
let oneStoreGraphQLImperativeQueryAdapter$2 = undefined;
|
|
5675
5754
|
/**
|
|
5676
5755
|
* Determines when to include PDL strategies for Related Lists
|
|
5677
5756
|
*/
|
|
@@ -5698,6 +5777,18 @@
|
|
|
5698
5777
|
getGetObjectInfosAdapter: function () {
|
|
5699
5778
|
return oneStoreGetObjectInfosAdapter$2;
|
|
5700
5779
|
},
|
|
5780
|
+
setGraphQLWireAdapter: function (adapter) {
|
|
5781
|
+
oneStoreGraphQLWireAdapter$2 = adapter;
|
|
5782
|
+
},
|
|
5783
|
+
getGraphQLWireAdapter: function () {
|
|
5784
|
+
return oneStoreGraphQLWireAdapter$2;
|
|
5785
|
+
},
|
|
5786
|
+
setGraphQLImperativeQueryAdapter: function (adapter) {
|
|
5787
|
+
oneStoreGraphQLImperativeQueryAdapter$2 = adapter;
|
|
5788
|
+
},
|
|
5789
|
+
getGraphQLImperativeQueryAdapter: function () {
|
|
5790
|
+
return oneStoreGraphQLImperativeQueryAdapter$2;
|
|
5791
|
+
},
|
|
5701
5792
|
};
|
|
5702
5793
|
/**
|
|
5703
5794
|
* Helper function to return the one store adapter if it's defined, otherwise return the luvio adapter.
|
|
@@ -5705,7 +5796,7 @@
|
|
|
5705
5796
|
* @param oneStoreAdapter - The one store bound adapter.
|
|
5706
5797
|
* @returns Luvio or one store wire adapter constructor.
|
|
5707
5798
|
*/
|
|
5708
|
-
function getLuvioOrOneStoreAdapter(luvioAdapter, oneStoreAdapter) {
|
|
5799
|
+
function getLuvioOrOneStoreAdapter$1(luvioAdapter, oneStoreAdapter) {
|
|
5709
5800
|
return oneStoreAdapter ?? luvioAdapter;
|
|
5710
5801
|
}
|
|
5711
5802
|
const getKeywordSearchResultsFactory$2 = new Configurable$2();
|
|
@@ -6070,7 +6161,7 @@
|
|
|
6070
6161
|
const { split: split$1, endsWith: endsWith$1 } = String.prototype;
|
|
6071
6162
|
const { isArray: isArray$7 } = Array;
|
|
6072
6163
|
const { concat: concat$3, filter: filter$3, includes: includes$3, push: push$4, reduce: reduce$3 } = Array.prototype;
|
|
6073
|
-
const { parse: parse$
|
|
6164
|
+
const { parse: parse$a, stringify: stringify$9 } = JSON;
|
|
6074
6165
|
|
|
6075
6166
|
function isString$3(value) {
|
|
6076
6167
|
return typeof value === 'string';
|
|
@@ -14769,7 +14860,7 @@
|
|
|
14769
14860
|
// we have to run ingest code and look at the resulting snapshot's seenRecords.
|
|
14770
14861
|
function getCacheKeys$1(keySet, luvio, config, key, originalResponseBody) {
|
|
14771
14862
|
const { recordIds, layoutTypes, modes } = config;
|
|
14772
|
-
const responseBody = parse$
|
|
14863
|
+
const responseBody = parse$a(stringify$9(originalResponseBody));
|
|
14773
14864
|
eachLayout$1(responseBody, (apiName, recordTypeId, layout) => {
|
|
14774
14865
|
if (layout.id === null) {
|
|
14775
14866
|
return;
|
|
@@ -27948,7 +28039,7 @@
|
|
|
27948
28039
|
}
|
|
27949
28040
|
|
|
27950
28041
|
const TTL$a$1 = 30000;
|
|
27951
|
-
const VERSION$c$2 = "
|
|
28042
|
+
const VERSION$c$2 = "ecedd058ac9cfc9b51de0f2c00276ce8";
|
|
27952
28043
|
const RepresentationType$d$1 = 'RelatedListRecordCollectionRepresentation';
|
|
27953
28044
|
function keyBuilder$t$2(luvio, config) {
|
|
27954
28045
|
return keyPrefix$3 + '::' + RepresentationType$d$1 + ':' + '[' + config.sortBy.join(',') + ']' + ':' + (config.parentRecordId === null ? '' : config.parentRecordId) + ':' + config.relatedListId + ':' + (config.where === null ? '' : config.where);
|
|
@@ -28064,6 +28155,14 @@
|
|
|
28064
28155
|
reader.enterPath('count');
|
|
28065
28156
|
reader.readScalar('count', metadataProperties, sink);
|
|
28066
28157
|
reader.exitPath();
|
|
28158
|
+
reader.enterPath('columnLabels');
|
|
28159
|
+
reader.readObject('columnLabels', {
|
|
28160
|
+
name: 'columnLabels',
|
|
28161
|
+
kind: 'Object',
|
|
28162
|
+
// Any
|
|
28163
|
+
required: false
|
|
28164
|
+
}, source, sink);
|
|
28165
|
+
reader.exitPath();
|
|
28067
28166
|
reader.enterPath('fields');
|
|
28068
28167
|
reader.readScalarPlural('fields', source, sink, true);
|
|
28069
28168
|
reader.exitPath();
|
|
@@ -28106,6 +28205,19 @@
|
|
|
28106
28205
|
if (!(existing_currentPageToken === incoming_currentPageToken)) {
|
|
28107
28206
|
return false;
|
|
28108
28207
|
}
|
|
28208
|
+
const existing_columnLabels = existing.columnLabels;
|
|
28209
|
+
const incoming_columnLabels = incoming.columnLabels;
|
|
28210
|
+
// if at least one of these optionals is defined
|
|
28211
|
+
if (existing_columnLabels !== undefined || incoming_columnLabels !== undefined) {
|
|
28212
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
28213
|
+
// not equal
|
|
28214
|
+
if (existing_columnLabels === undefined || incoming_columnLabels === undefined) {
|
|
28215
|
+
return false;
|
|
28216
|
+
}
|
|
28217
|
+
if (JSONStringify$3(incoming_columnLabels) !== JSONStringify$3(existing_columnLabels)) {
|
|
28218
|
+
return false;
|
|
28219
|
+
}
|
|
28220
|
+
}
|
|
28109
28221
|
const existing_currentPageUrl = existing.currentPageUrl;
|
|
28110
28222
|
const incoming_currentPageUrl = incoming.currentPageUrl;
|
|
28111
28223
|
if (!(existing_currentPageUrl === incoming_currentPageUrl)) {
|
|
@@ -28331,10 +28443,11 @@
|
|
|
28331
28443
|
}
|
|
28332
28444
|
function keyBuilder$s$2(luvio, params) {
|
|
28333
28445
|
return keyBuilder$t$2(luvio, {
|
|
28446
|
+
includeColumnLabels: params.body.includeColumnLabels || null,
|
|
28447
|
+
relatedListId: params.urlParams.relatedListId,
|
|
28334
28448
|
sortBy: params.body.sortBy || [],
|
|
28335
|
-
where: params.body.where || null,
|
|
28336
28449
|
parentRecordId: params.urlParams.parentRecordId,
|
|
28337
|
-
|
|
28450
|
+
where: params.body.where || null
|
|
28338
28451
|
});
|
|
28339
28452
|
}
|
|
28340
28453
|
function getResponseCacheKeys$h(storeKeyMap, luvio, resourceParams, response) {
|
|
@@ -28743,6 +28856,7 @@
|
|
|
28743
28856
|
generateParamConfigMetadata$3('parentRecordId', true, 0 /* UrlParameter */, 0 /* String */, false, getRecordId18$1),
|
|
28744
28857
|
generateParamConfigMetadata$3('relatedListId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
28745
28858
|
generateParamConfigMetadata$3('fields', false, 2 /* Body */, 0 /* String */, true),
|
|
28859
|
+
generateParamConfigMetadata$3('includeColumnLabels', false, 2 /* Body */, 1 /* Boolean */),
|
|
28746
28860
|
generateParamConfigMetadata$3('optionalFields', false, 2 /* Body */, 0 /* String */, true),
|
|
28747
28861
|
generateParamConfigMetadata$3('pageSize', false, 2 /* Body */, 3 /* Integer */),
|
|
28748
28862
|
generateParamConfigMetadata$3('pageToken', false, 2 /* Body */, 0 /* String */),
|
|
@@ -30451,7 +30565,7 @@
|
|
|
30451
30565
|
});
|
|
30452
30566
|
}
|
|
30453
30567
|
function clone$2(userLayoutState) {
|
|
30454
|
-
return parse$
|
|
30568
|
+
return parse$a(stringify$9(userLayoutState));
|
|
30455
30569
|
}
|
|
30456
30570
|
// Applies optimisticUpdate to layoutUserState
|
|
30457
30571
|
// If the optimistic update can be applied, returns RecordLayoutUserStateRepresentation
|
|
@@ -30486,7 +30600,7 @@
|
|
|
30486
30600
|
const config = validateAdapterConfig$L(untrusted, getLayoutUserState_ConfigPropertyNames);
|
|
30487
30601
|
if (config === null) {
|
|
30488
30602
|
// eslint-disable-next-line @salesforce/lds/no-error-in-production
|
|
30489
|
-
throw new Error(`@wire(updateLayoutUserState) invalid configuration ${stringify$
|
|
30603
|
+
throw new Error(`@wire(updateLayoutUserState) invalid configuration ${stringify$9(untrusted)}`);
|
|
30490
30604
|
}
|
|
30491
30605
|
// This will throw if layoutUserStateInput is not a valid input
|
|
30492
30606
|
validate$8(layoutUserStateInput, 'layoutUserStateInput');
|
|
@@ -33828,8 +33942,8 @@
|
|
|
33828
33942
|
updateRecord: unwrapSnapshotData(factory$2$1),
|
|
33829
33943
|
updateRecordAvatar: unwrapSnapshotData(factory$8$1),
|
|
33830
33944
|
// One Store Enabled Adapters
|
|
33831
|
-
getObjectInfo: getLuvioOrOneStoreAdapter(createWireAdapterConstructor(luvio, getObjectInfo_ldsAdapter, getObjectInfoMetadata), configurationForOneStoreEnabledAdapters$2.getGetObjectInfoAdapter()),
|
|
33832
|
-
getObjectInfos: getLuvioOrOneStoreAdapter(createWireAdapterConstructor(luvio, getObjectInfos_ldsAdapter, getObjectInfosMetadata), configurationForOneStoreEnabledAdapters$2.getGetObjectInfosAdapter()),
|
|
33945
|
+
getObjectInfo: getLuvioOrOneStoreAdapter$1(createWireAdapterConstructor(luvio, getObjectInfo_ldsAdapter, getObjectInfoMetadata), configurationForOneStoreEnabledAdapters$2.getGetObjectInfoAdapter()),
|
|
33946
|
+
getObjectInfos: getLuvioOrOneStoreAdapter$1(createWireAdapterConstructor(luvio, getObjectInfos_ldsAdapter, getObjectInfosMetadata), configurationForOneStoreEnabledAdapters$2.getGetObjectInfosAdapter()),
|
|
33833
33947
|
// Imperative Adapters
|
|
33834
33948
|
unstable_getActionOverrides_imperative: createImperativeAdapter(luvio, getActionOverrides_ldsAdapter, getActionOverridesMetadata),
|
|
33835
33949
|
getAllApps_imperative: createImperativeAdapter(luvio, getAllApps_ldsAdapter, getAllAppsMetadata),
|
|
@@ -34058,7 +34172,7 @@
|
|
|
34058
34172
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
34059
34173
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
34060
34174
|
});
|
|
34061
|
-
// version: 1.
|
|
34175
|
+
// version: 1.370.0-7c1df2520b
|
|
34062
34176
|
|
|
34063
34177
|
function requestIdleDetectedCallback(_callback) { }
|
|
34064
34178
|
function declareNotifierTaskSingle(_name) {
|
|
@@ -35724,7 +35838,7 @@
|
|
|
35724
35838
|
* Given a GraphQL source, parses it into a Document.
|
|
35725
35839
|
* Throws GraphQLError if a syntax error is encountered.
|
|
35726
35840
|
*/
|
|
35727
|
-
function parse$
|
|
35841
|
+
function parse$9(source, options) {
|
|
35728
35842
|
var parser = new Parser(source, options);
|
|
35729
35843
|
return parser.parseDocument();
|
|
35730
35844
|
}
|
|
@@ -44733,7 +44847,7 @@
|
|
|
44733
44847
|
*/
|
|
44734
44848
|
|
|
44735
44849
|
function buildSchema(source, options) {
|
|
44736
|
-
var document = parse$
|
|
44850
|
+
var document = parse$9(source, {
|
|
44737
44851
|
noLocation: options === null || options === void 0 ? void 0 : options.noLocation,
|
|
44738
44852
|
allowLegacySDLEmptyFields: options === null || options === void 0 ? void 0 : options.allowLegacySDLEmptyFields,
|
|
44739
44853
|
allowLegacySDLImplementsInterfaces: options === null || options === void 0 ? void 0 : options.allowLegacySDLImplementsInterfaces,
|
|
@@ -45284,7 +45398,7 @@
|
|
|
45284
45398
|
return cachedDoc;
|
|
45285
45399
|
}
|
|
45286
45400
|
// parse throws an GraphQLError in case of invalid query, should this be in try/catch?
|
|
45287
|
-
const parsedDoc = parse$
|
|
45401
|
+
const parsedDoc = parse$9(inputString, { noLocation: true });
|
|
45288
45402
|
if (!parsedDoc || parsedDoc.kind !== 'Document') {
|
|
45289
45403
|
return null;
|
|
45290
45404
|
}
|
|
@@ -45542,7 +45656,7 @@
|
|
|
45542
45656
|
* @deprecated In favor of gql tagged template literal
|
|
45543
45657
|
*/
|
|
45544
45658
|
function parseAndVisit(source) {
|
|
45545
|
-
const ast = parse$
|
|
45659
|
+
const ast = parse$9(source, { noLocation: true });
|
|
45546
45660
|
const luvioDocumentNode = transform(ast);
|
|
45547
45661
|
// In-place substitution of metaschema annotations
|
|
45548
45662
|
metaschemaMapper(ast);
|
|
@@ -45641,6 +45755,15 @@
|
|
|
45641
45755
|
},
|
|
45642
45756
|
};
|
|
45643
45757
|
|
|
45758
|
+
var aggressiveTrimCountKillSwitchGate = {
|
|
45759
|
+
isOpen: function (e) {
|
|
45760
|
+
return e.fallback;
|
|
45761
|
+
},
|
|
45762
|
+
hasError: function () {
|
|
45763
|
+
return !0;
|
|
45764
|
+
},
|
|
45765
|
+
};
|
|
45766
|
+
|
|
45644
45767
|
var graphqlL2AdapterGate = {
|
|
45645
45768
|
isOpen: function (e) {
|
|
45646
45769
|
return e.fallback;
|
|
@@ -45739,7 +45862,7 @@
|
|
|
45739
45862
|
*/
|
|
45740
45863
|
|
|
45741
45864
|
|
|
45742
|
-
const { parse: parse$
|
|
45865
|
+
const { parse: parse$7, stringify: stringify$7 } = JSON;
|
|
45743
45866
|
const { join: join$1, push: push$2, unshift } = Array.prototype;
|
|
45744
45867
|
const { isArray: isArray$5 } = Array;
|
|
45745
45868
|
const { entries: entries$4, keys: keys$6 } = Object;
|
|
@@ -46037,10 +46160,10 @@
|
|
|
46037
46160
|
const { resourceRequest } = req;
|
|
46038
46161
|
const { baseUri, basePath, queryParams, headers } = resourceRequest;
|
|
46039
46162
|
const path = `${baseUri}${basePath}`;
|
|
46040
|
-
const queryParamsString = queryParams ? stringify$
|
|
46041
|
-
const headersString = stringify$
|
|
46163
|
+
const queryParamsString = queryParams ? stringify$7(queryParams) : EMPTY_STRING;
|
|
46164
|
+
const headersString = stringify$7(headers);
|
|
46042
46165
|
const bodyString = resourceRequest.body && isResourceRequestDedupable(req)
|
|
46043
|
-
? stringify$
|
|
46166
|
+
? stringify$7(resourceRequest.body)
|
|
46044
46167
|
: EMPTY_STRING;
|
|
46045
46168
|
return `${path}${TRANSACTION_KEY_SEP}${headersString}${TRANSACTION_KEY_SEP}${queryParamsString}${bodyString}`;
|
|
46046
46169
|
}
|
|
@@ -46106,7 +46229,7 @@
|
|
|
46106
46229
|
// extra clone (particularly when there's only 1 handler).
|
|
46107
46230
|
for (let i = 1, len = handlers.length; i < len; i++) {
|
|
46108
46231
|
const handler = handlers[i];
|
|
46109
|
-
handler.resolve(parse$
|
|
46232
|
+
handler.resolve(parse$7(stringify$7(response)));
|
|
46110
46233
|
}
|
|
46111
46234
|
handlers[0].resolve(response);
|
|
46112
46235
|
}, (error) => {
|
|
@@ -47518,7 +47641,7 @@
|
|
|
47518
47641
|
})(QueueOperationType || (QueueOperationType = {}));
|
|
47519
47642
|
|
|
47520
47643
|
const { keys: keys$4, create: create$4, assign: assign$3, values: values$2 } = Object;
|
|
47521
|
-
const { stringify: stringify$
|
|
47644
|
+
const { stringify: stringify$6, parse: parse$6 } = JSON;
|
|
47522
47645
|
const { isArray: isArray$4 } = Array;
|
|
47523
47646
|
|
|
47524
47647
|
class DraftSynthesisError extends Error {
|
|
@@ -48220,7 +48343,7 @@
|
|
|
48220
48343
|
}
|
|
48221
48344
|
|
|
48222
48345
|
function clone$1(obj) {
|
|
48223
|
-
return parse$
|
|
48346
|
+
return parse$6(stringify$6(obj));
|
|
48224
48347
|
}
|
|
48225
48348
|
|
|
48226
48349
|
const DRAFT_ACTION_KEY_JUNCTION = '__DraftAction__';
|
|
@@ -48679,7 +48802,7 @@
|
|
|
48679
48802
|
// We should always return an array, if the body is just a dictionary,
|
|
48680
48803
|
// stick it in an array
|
|
48681
48804
|
const body = isArray$4(action.error.body) ? action.error.body : [action.error.body];
|
|
48682
|
-
const bodyString = stringify$
|
|
48805
|
+
const bodyString = stringify$6(body);
|
|
48683
48806
|
item.error = {
|
|
48684
48807
|
status: action.error.status || 0,
|
|
48685
48808
|
ok: action.error.ok || false,
|
|
@@ -48900,7 +49023,7 @@
|
|
|
48900
49023
|
const { split, endsWith } = String.prototype;
|
|
48901
49024
|
const { from: from$1, isArray: isArray$3$1 } = Array;
|
|
48902
49025
|
const { concat: concat$2, filter: filter$2, includes: includes$2, push: push$1$1, reduce: reduce$2, shift, slice: slice$1 } = Array.prototype;
|
|
48903
|
-
const { parse: parse$
|
|
49026
|
+
const { parse: parse$5, stringify: stringify$5 } = JSON;
|
|
48904
49027
|
|
|
48905
49028
|
function isString$2(value) {
|
|
48906
49029
|
return typeof value === 'string';
|
|
@@ -55276,7 +55399,7 @@
|
|
|
55276
55399
|
// we have to run ingest code and look at the resulting snapshot's seenRecords.
|
|
55277
55400
|
function getCacheKeys(keySet, luvio, config, key, originalResponseBody) {
|
|
55278
55401
|
const { recordIds, layoutTypes, modes } = config;
|
|
55279
|
-
const responseBody = parse$
|
|
55402
|
+
const responseBody = parse$5(stringify$5(originalResponseBody));
|
|
55280
55403
|
eachLayout(responseBody, (apiName, recordTypeId, layout) => {
|
|
55281
55404
|
if (layout.id === null) {
|
|
55282
55405
|
return;
|
|
@@ -79692,7 +79815,7 @@
|
|
|
79692
79815
|
let updatedActionTargetId = undefined;
|
|
79693
79816
|
const { tag: queueActionTag, data: queueActionRequest, id: queueActionId, } = queueAction;
|
|
79694
79817
|
let { basePath, body } = queueActionRequest;
|
|
79695
|
-
let stringifiedBody = stringify$
|
|
79818
|
+
let stringifiedBody = stringify$5(body);
|
|
79696
79819
|
// for each redirected ID/key we loop over the operation to see if it needs
|
|
79697
79820
|
// to be updated
|
|
79698
79821
|
for (const { draftId, draftKey, canonicalId, canonicalKey } of redirects) {
|
|
@@ -79717,7 +79840,7 @@
|
|
|
79717
79840
|
data: {
|
|
79718
79841
|
...queueActionRequest,
|
|
79719
79842
|
basePath: basePath,
|
|
79720
|
-
body: parse$
|
|
79843
|
+
body: parse$5(stringifiedBody),
|
|
79721
79844
|
},
|
|
79722
79845
|
};
|
|
79723
79846
|
// item needs to be replaced with a new item at the new record key
|
|
@@ -79736,7 +79859,7 @@
|
|
|
79736
79859
|
data: {
|
|
79737
79860
|
...queueActionRequest,
|
|
79738
79861
|
basePath: basePath,
|
|
79739
|
-
body: parse$
|
|
79862
|
+
body: parse$5(stringifiedBody),
|
|
79740
79863
|
},
|
|
79741
79864
|
};
|
|
79742
79865
|
// item needs to be updated
|
|
@@ -80452,7 +80575,7 @@
|
|
|
80452
80575
|
else if (typeof err === 'string') {
|
|
80453
80576
|
return new Error(err);
|
|
80454
80577
|
}
|
|
80455
|
-
return new Error(stringify$
|
|
80578
|
+
return new Error(stringify$5(err));
|
|
80456
80579
|
}
|
|
80457
80580
|
// metrics
|
|
80458
80581
|
/** GraphQL */
|
|
@@ -80488,6 +80611,10 @@
|
|
|
80488
80611
|
const GRAPHQL_SQL_EVAL_PRECONDITION_ERROR = 'gql-sql-pre-eval-error';
|
|
80489
80612
|
const GRAPHQL_CREATE_SNAPSHOT_ERROR = 'gql-create-snapshot-error';
|
|
80490
80613
|
const DRAFT_AWARE_CREATE_CONTENT_DOCUMENT_AND_VERSION_ERROR = 'draft-aware-create-content-document-and-version-error';
|
|
80614
|
+
/** Garbage Collection */
|
|
80615
|
+
const GARBAGE_COLLECTION_AGGRESSIVE_TRIM_COUNT = 'garbage-collection-aggressive-trim-count';
|
|
80616
|
+
const GARBAGE_COLLECTION_AGGRESSIVE_TRIM_RECORDS_TRIMMED = 'garbage-collection-aggressive-trim-records-trimmed';
|
|
80617
|
+
const GARBAGE_COLLECTION_AGGRESSIVE_TRIM_TOTAL_RECORDS_BEFORE_TRIM = 'garbage-collection-aggressive-trim-total-records-before-trim';
|
|
80491
80618
|
const ldsMobileInstrumentation$2 = getInstrumentation();
|
|
80492
80619
|
const nimbusLogger = typeof __nimbus !== 'undefined' &&
|
|
80493
80620
|
__nimbus.plugins !== undefined &&
|
|
@@ -80628,6 +80755,12 @@
|
|
|
80628
80755
|
const buckets = [8000, 10000, 12000, 14000, 16000];
|
|
80629
80756
|
ldsMobileInstrumentation$2.bucketValue('chunk-candidate-url-length-histogram', urlLength, buckets);
|
|
80630
80757
|
}
|
|
80758
|
+
/** Garbage Collection */
|
|
80759
|
+
function reportAggressiveTrimTriggered(trimCount, beforeTrimRecordCount, totalRecordsTrimmed) {
|
|
80760
|
+
ldsMobileInstrumentation$2.trackValue(GARBAGE_COLLECTION_AGGRESSIVE_TRIM_COUNT, trimCount);
|
|
80761
|
+
ldsMobileInstrumentation$2.trackValue(GARBAGE_COLLECTION_AGGRESSIVE_TRIM_TOTAL_RECORDS_BEFORE_TRIM, beforeTrimRecordCount);
|
|
80762
|
+
ldsMobileInstrumentation$2.trackValue(GARBAGE_COLLECTION_AGGRESSIVE_TRIM_RECORDS_TRIMMED, totalRecordsTrimmed);
|
|
80763
|
+
}
|
|
80631
80764
|
|
|
80632
80765
|
const QUICK_ACTION_HANDLER = 'QUICK_ACTION_HANDLER';
|
|
80633
80766
|
class QuickActionExecutionRepresentationHandler extends AbstractQuickActionHandler {
|
|
@@ -81555,7 +81688,7 @@
|
|
|
81555
81688
|
rows.forEach((row) => {
|
|
81556
81689
|
if (!row[0])
|
|
81557
81690
|
return null;
|
|
81558
|
-
const record = parse$
|
|
81691
|
+
const record = parse$5(row[0]);
|
|
81559
81692
|
if (record.id === id) {
|
|
81560
81693
|
foundRow = record;
|
|
81561
81694
|
}
|
|
@@ -81914,7 +82047,7 @@
|
|
|
81914
82047
|
return dateTimeRange(range, operator, field, alias);
|
|
81915
82048
|
}
|
|
81916
82049
|
// eslint-disable-next-line @salesforce/lds/no-error-in-production
|
|
81917
|
-
throw new Error(`Where filter ${stringify$
|
|
82050
|
+
throw new Error(`Where filter ${stringify$5(input)} is not supported`);
|
|
81918
82051
|
}
|
|
81919
82052
|
function dateTimeRange(input, op, field, alias) {
|
|
81920
82053
|
const dateFunction = field.dataType === 'DateTime' ? 'datetime' : 'date';
|
|
@@ -84558,14 +84691,14 @@
|
|
|
84558
84691
|
typeof maybeCursor.i === 'number');
|
|
84559
84692
|
}
|
|
84560
84693
|
function encodeV1Cursor(cursor) {
|
|
84561
|
-
return base64encode(stringify$
|
|
84694
|
+
return base64encode(stringify$5(cursor));
|
|
84562
84695
|
}
|
|
84563
84696
|
const CURSOR_PARSE_ERROR = 'Unable to parse cursor';
|
|
84564
84697
|
function decodeV1Cursor(base64cursor) {
|
|
84565
84698
|
let maybeCursor;
|
|
84566
84699
|
try {
|
|
84567
84700
|
const cursorString = base64decode(base64cursor);
|
|
84568
|
-
maybeCursor = parse$
|
|
84701
|
+
maybeCursor = parse$5(cursorString);
|
|
84569
84702
|
}
|
|
84570
84703
|
catch (error) {
|
|
84571
84704
|
let message = CURSOR_PARSE_ERROR;
|
|
@@ -84769,7 +84902,7 @@
|
|
|
84769
84902
|
const results = await query(sql, keys.map((k) => k + '__pagination'));
|
|
84770
84903
|
for (let row of results.rows) {
|
|
84771
84904
|
let key = row[0].replace(/__pagination$/, '');
|
|
84772
|
-
let metadata = parse$
|
|
84905
|
+
let metadata = parse$5(row[1]);
|
|
84773
84906
|
metadataMap.set(key, metadata);
|
|
84774
84907
|
}
|
|
84775
84908
|
return metadataMap;
|
|
@@ -84875,8 +85008,8 @@
|
|
|
84875
85008
|
//map each sql result with the ingestion timestamp to pass it down a level
|
|
84876
85009
|
let records = results.rows.map((row, index) => {
|
|
84877
85010
|
const recordMetadataResult = {
|
|
84878
|
-
recordRepresentation: parse$
|
|
84879
|
-
metadata: parse$
|
|
85011
|
+
recordRepresentation: parse$5(row[0]),
|
|
85012
|
+
metadata: parse$5(row[1]),
|
|
84880
85013
|
};
|
|
84881
85014
|
const { recordRepresentation, metadata } = recordMetadataResult;
|
|
84882
85015
|
context.seenRecordIds.add(recordRepresentation.id);
|
|
@@ -85327,7 +85460,7 @@
|
|
|
85327
85460
|
return cache;
|
|
85328
85461
|
}
|
|
85329
85462
|
// parse extensions into DocumentNode to extend the schema
|
|
85330
|
-
const extensions = parse$
|
|
85463
|
+
const extensions = parse$9(typeDefs);
|
|
85331
85464
|
const polymorphicFieldTypeNames = [
|
|
85332
85465
|
...polyFieldTypeNameArr,
|
|
85333
85466
|
...cache.getPolymorphicFieldTypeNames(),
|
|
@@ -87870,7 +88003,7 @@
|
|
|
87870
88003
|
const getCanonicalId = getCanonicalIdFunction(luvio);
|
|
87871
88004
|
return async function draftAwareGraphQLAdapter(config, requestContext = {}) {
|
|
87872
88005
|
//create a copy to not accidentally modify the AST in the astResolver map of luvio
|
|
87873
|
-
const copy = parse$
|
|
88006
|
+
const copy = parse$5(stringify$5(config.query));
|
|
87874
88007
|
// the injected ast has extra fields needed for eval in it
|
|
87875
88008
|
let injectedAST;
|
|
87876
88009
|
// the cursor mapped ast is passed upstream so it won't reject on our local cursors
|
|
@@ -87963,7 +88096,7 @@
|
|
|
87963
88096
|
} = await evaluate({
|
|
87964
88097
|
...config,
|
|
87965
88098
|
//need to create another copy of the ast for future writes
|
|
87966
|
-
query: parse$
|
|
88099
|
+
query: parse$5(stringify$5(injectedAST)),
|
|
87967
88100
|
}, observers, { userId }, objectInfoNeeded, store, nonEvaluatedSnapshot, graphqlSchemaCache, draftFunctions, mappedCursors));
|
|
87968
88101
|
}
|
|
87969
88102
|
catch (throwable) {
|
|
@@ -88089,7 +88222,7 @@
|
|
|
88089
88222
|
|
|
88090
88223
|
function environmentAwareGraphQLBatchAdapterFactory(objectInfoService, luvio, isDraftId, buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy) {
|
|
88091
88224
|
return async function environmentAwareGraphQLBatchAdapter(config, requestContext = {}) {
|
|
88092
|
-
const batchQueryCopy = config.batchQuery.map((query) => parse$
|
|
88225
|
+
const batchQueryCopy = config.batchQuery.map((query) => parse$5(stringify$5(query)));
|
|
88093
88226
|
let injectedBatchQuery = [];
|
|
88094
88227
|
const getCanonicalId = getCanonicalIdFunction(luvio);
|
|
88095
88228
|
const draftFunctions = {
|
|
@@ -88314,7 +88447,7 @@
|
|
|
88314
88447
|
|
|
88315
88448
|
|
|
88316
88449
|
const { keys: keys$2$1, create: create$2$1, assign: assign$1$1, entries: entries$2 } = Object;
|
|
88317
|
-
const { stringify: stringify$
|
|
88450
|
+
const { stringify: stringify$4, parse: parse$4 } = JSON;
|
|
88318
88451
|
const { push: push$3, join, slice } = Array.prototype;
|
|
88319
88452
|
const { isArray: isArray$2$1, from } = Array;
|
|
88320
88453
|
|
|
@@ -88338,7 +88471,7 @@
|
|
|
88338
88471
|
returnParams[key] = `${value}`;
|
|
88339
88472
|
}
|
|
88340
88473
|
if (isObject(value) === true && keys$2$1(value).length > 0) {
|
|
88341
|
-
returnParams[key] = stringify$
|
|
88474
|
+
returnParams[key] = stringify$4(value);
|
|
88342
88475
|
}
|
|
88343
88476
|
}
|
|
88344
88477
|
return returnParams;
|
|
@@ -88400,13 +88533,13 @@
|
|
|
88400
88533
|
if (typeof value === 'string') {
|
|
88401
88534
|
return value;
|
|
88402
88535
|
}
|
|
88403
|
-
return stringify$
|
|
88536
|
+
return stringify$4(value);
|
|
88404
88537
|
}
|
|
88405
88538
|
function parseIfPresent(value) {
|
|
88406
88539
|
if (value === undefined || value === null || value === '') {
|
|
88407
88540
|
return null;
|
|
88408
88541
|
}
|
|
88409
|
-
return parse$
|
|
88542
|
+
return parse$4(value);
|
|
88410
88543
|
}
|
|
88411
88544
|
function buildNimbusNetworkPluginRequest(resourceRequest, resourceRequestContext) {
|
|
88412
88545
|
const { basePath, baseUri, method, headers, queryParams, body } = resourceRequest;
|
|
@@ -88905,8 +89038,8 @@
|
|
|
88905
89038
|
// Too much work to get exact length of the final url, so use stringified json to get the rough length.
|
|
88906
89039
|
const roughUrlLengthWithoutFieldsAndOptionFields = request.basePath.length +
|
|
88907
89040
|
request.baseUri.length +
|
|
88908
|
-
(request.urlParams ? stringify$
|
|
88909
|
-
stringify$
|
|
89041
|
+
(request.urlParams ? stringify$4(request.urlParams).length : 0) +
|
|
89042
|
+
stringify$4({ ...request.queryParams, fields: {}, optionalFields: {} }).length;
|
|
88910
89043
|
return MAX_URL_LENGTH - roughUrlLengthWithoutFieldsAndOptionFields;
|
|
88911
89044
|
}
|
|
88912
89045
|
// we don't have access to the host so we cannot calculate the exact length of the url
|
|
@@ -89012,10 +89145,10 @@
|
|
|
89012
89145
|
if (callProxyMethod === undefined) {
|
|
89013
89146
|
return Promise.reject(new Error('callProxyMethod not defined on the nimbus plugin'));
|
|
89014
89147
|
}
|
|
89015
|
-
const serializedAction = stringify$
|
|
89148
|
+
const serializedAction = stringify$5([handlerId, data]);
|
|
89016
89149
|
return new Promise((resolve, reject) => {
|
|
89017
89150
|
callProxyMethod('enqueue', serializedAction, (serializedActionResponse) => {
|
|
89018
|
-
const response = parse$
|
|
89151
|
+
const response = parse$5(serializedActionResponse);
|
|
89019
89152
|
resolve(response);
|
|
89020
89153
|
}, (errorMessage) => {
|
|
89021
89154
|
reject(new Error(errorMessage));
|
|
@@ -89036,8 +89169,8 @@
|
|
|
89036
89169
|
return Promise.reject(new Error('callProxyMethod not defined on the nimbus plugin'));
|
|
89037
89170
|
}
|
|
89038
89171
|
return new Promise((resolve, reject) => {
|
|
89039
|
-
callProxyMethod('getQueueActions', stringify$
|
|
89040
|
-
resolve(parse$
|
|
89172
|
+
callProxyMethod('getQueueActions', stringify$5([]), (serializedQueue) => {
|
|
89173
|
+
resolve(parse$5(serializedQueue));
|
|
89041
89174
|
}, (errorMessage) => {
|
|
89042
89175
|
reject(new Error(errorMessage));
|
|
89043
89176
|
});
|
|
@@ -89048,17 +89181,17 @@
|
|
|
89048
89181
|
if (callProxyMethod === undefined) {
|
|
89049
89182
|
return Promise.reject('callProxyMethod not defined on the nimbus plugin');
|
|
89050
89183
|
}
|
|
89051
|
-
const stringifiedArgs = stringify$
|
|
89184
|
+
const stringifiedArgs = stringify$5([action]);
|
|
89052
89185
|
return new Promise((resolve, reject) => {
|
|
89053
89186
|
callProxyMethod('getDataForAction', stringifiedArgs, (data) => {
|
|
89054
89187
|
if (data === undefined) {
|
|
89055
89188
|
resolve(undefined);
|
|
89056
89189
|
}
|
|
89057
89190
|
else {
|
|
89058
|
-
resolve(parse$
|
|
89191
|
+
resolve(parse$5(data));
|
|
89059
89192
|
}
|
|
89060
89193
|
}, (serializedError) => {
|
|
89061
|
-
reject(parse$
|
|
89194
|
+
reject(parse$5(serializedError));
|
|
89062
89195
|
});
|
|
89063
89196
|
});
|
|
89064
89197
|
}
|
|
@@ -89540,7 +89673,7 @@
|
|
|
89540
89673
|
}
|
|
89541
89674
|
|
|
89542
89675
|
const { keys: keys$1$1, create: create$1$1, assign: assign$5, entries: entries$1, values } = Object;
|
|
89543
|
-
const { stringify: stringify$
|
|
89676
|
+
const { stringify: stringify$3, parse: parse$3 } = JSON;
|
|
89544
89677
|
|
|
89545
89678
|
function selectColumnsFromTableWhereKeyIn(columnNames, table, keyColumnName, whereIn) {
|
|
89546
89679
|
const paramList = whereIn.map(() => '?').join(',');
|
|
@@ -89553,13 +89686,13 @@
|
|
|
89553
89686
|
|
|
89554
89687
|
// These const values must be in sync with the latest
|
|
89555
89688
|
// @salesforce/nimbus-plugin-lds/sql schema file
|
|
89556
|
-
const TABLE_NAME$1 = 'lds_data';
|
|
89689
|
+
const TABLE_NAME$1$1 = 'lds_data';
|
|
89557
89690
|
const COLUMN_NAME_KEY$2 = 'key';
|
|
89558
89691
|
const COLUMN_NAME_DATA$2 = 'data';
|
|
89559
89692
|
const COLUMN_NAME_METADATA$1 = 'metadata';
|
|
89560
89693
|
class LdsDataTable {
|
|
89561
89694
|
constructor(plugin) {
|
|
89562
|
-
this.tableName = TABLE_NAME$1;
|
|
89695
|
+
this.tableName = TABLE_NAME$1$1;
|
|
89563
89696
|
this.columnNames = [COLUMN_NAME_KEY$2, COLUMN_NAME_DATA$2, COLUMN_NAME_METADATA$1];
|
|
89564
89697
|
this.conflictColumnNames = [COLUMN_NAME_KEY$2];
|
|
89565
89698
|
this.getAllQuery = `SELECT ${this.columnNames.join(',')} FROM ${this.tableName}`;
|
|
@@ -89581,7 +89714,7 @@
|
|
|
89581
89714
|
const [key, stringifiedMetadata] = row;
|
|
89582
89715
|
if (stringifiedMetadata !== undefined) {
|
|
89583
89716
|
entries[key] = {
|
|
89584
|
-
metadata: parse$
|
|
89717
|
+
metadata: parse$3(stringifiedMetadata),
|
|
89585
89718
|
};
|
|
89586
89719
|
}
|
|
89587
89720
|
return entries;
|
|
@@ -89609,7 +89742,7 @@
|
|
|
89609
89742
|
rows: keys$1$1(entries).reduce((rows, key) => {
|
|
89610
89743
|
const entry = entries[key];
|
|
89611
89744
|
const { data, metadata } = entry;
|
|
89612
|
-
const row = [key, stringify$
|
|
89745
|
+
const row = [key, stringify$3(data), metadata ? stringify$3(metadata) : null];
|
|
89613
89746
|
rows.push(row);
|
|
89614
89747
|
return rows;
|
|
89615
89748
|
}, []),
|
|
@@ -89627,7 +89760,7 @@
|
|
|
89627
89760
|
columns: [COLUMN_NAME_METADATA$1],
|
|
89628
89761
|
values: keys$1$1(entries).reduce((values, key) => {
|
|
89629
89762
|
const { metadata } = entries[key];
|
|
89630
|
-
const row = [metadata ? stringify$
|
|
89763
|
+
const row = [metadata ? stringify$3(metadata) : null];
|
|
89631
89764
|
values[key] = row;
|
|
89632
89765
|
return values;
|
|
89633
89766
|
}, {}),
|
|
@@ -89637,10 +89770,10 @@
|
|
|
89637
89770
|
return sqliteResult.rows.reduce((entries, row) => {
|
|
89638
89771
|
const [key, stringifiedData, stringifiedMetadata] = row;
|
|
89639
89772
|
const durableStoreEntry = {
|
|
89640
|
-
data: parse$
|
|
89773
|
+
data: parse$3(stringifiedData),
|
|
89641
89774
|
};
|
|
89642
89775
|
if (stringifiedMetadata !== null) {
|
|
89643
|
-
durableStoreEntry.metadata = parse$
|
|
89776
|
+
durableStoreEntry.metadata = parse$3(stringifiedMetadata);
|
|
89644
89777
|
}
|
|
89645
89778
|
entries[key] = durableStoreEntry;
|
|
89646
89779
|
return entries;
|
|
@@ -89690,7 +89823,7 @@
|
|
|
89690
89823
|
const [key, stringifiedMetadata] = row;
|
|
89691
89824
|
if (stringifiedMetadata !== undefined) {
|
|
89692
89825
|
entries[key] = {
|
|
89693
|
-
metadata: parse$
|
|
89826
|
+
metadata: parse$3(stringifiedMetadata),
|
|
89694
89827
|
};
|
|
89695
89828
|
}
|
|
89696
89829
|
return entries;
|
|
@@ -89718,9 +89851,9 @@
|
|
|
89718
89851
|
rows: keys$1$1(entries).reduce((rows, key) => {
|
|
89719
89852
|
const entry = entries[key];
|
|
89720
89853
|
const { data, metadata } = entry;
|
|
89721
|
-
const row = [key, stringify$
|
|
89854
|
+
const row = [key, stringify$3(data)];
|
|
89722
89855
|
if (metadata) {
|
|
89723
|
-
row.push(stringify$
|
|
89856
|
+
row.push(stringify$3(metadata));
|
|
89724
89857
|
}
|
|
89725
89858
|
else {
|
|
89726
89859
|
row.push(null);
|
|
@@ -89743,7 +89876,7 @@
|
|
|
89743
89876
|
columns: [COLUMN_NAME_METADATA],
|
|
89744
89877
|
values: keys$1$1(entries).reduce((values, key) => {
|
|
89745
89878
|
const { metadata } = entries[key];
|
|
89746
|
-
const row = [metadata ? stringify$
|
|
89879
|
+
const row = [metadata ? stringify$3(metadata) : null];
|
|
89747
89880
|
values[key] = row;
|
|
89748
89881
|
return values;
|
|
89749
89882
|
}, {}),
|
|
@@ -89755,7 +89888,7 @@
|
|
|
89755
89888
|
if (metadata !== undefined) {
|
|
89756
89889
|
accu.push({
|
|
89757
89890
|
sql: `UPDATE ${this.tableName} SET ${COLUMN_NAME_METADATA} = ? WHERE (${COLUMN_NAME_KEY$1} IS ? AND ${COLUMN_NAME_NAMESPACE} IS ?)`,
|
|
89758
|
-
params: [stringify$
|
|
89891
|
+
params: [stringify$3(metadata), key, segment],
|
|
89759
89892
|
change: {
|
|
89760
89893
|
ids: [key],
|
|
89761
89894
|
segment,
|
|
@@ -89771,10 +89904,10 @@
|
|
|
89771
89904
|
return sqliteResult.rows.reduce((entries, row) => {
|
|
89772
89905
|
const [key, stringifiedData, stringifiedMetadata] = row;
|
|
89773
89906
|
const durableStoreEntry = {
|
|
89774
|
-
data: parse$
|
|
89907
|
+
data: parse$3(stringifiedData),
|
|
89775
89908
|
};
|
|
89776
89909
|
if (stringifiedMetadata !== null) {
|
|
89777
|
-
durableStoreEntry.metadata = parse$
|
|
89910
|
+
durableStoreEntry.metadata = parse$3(stringifiedMetadata);
|
|
89778
89911
|
}
|
|
89779
89912
|
entries[key] = durableStoreEntry;
|
|
89780
89913
|
return entries;
|
|
@@ -89996,7 +90129,7 @@
|
|
|
89996
90129
|
columns: this.columnNames,
|
|
89997
90130
|
rows: keys$1$1(entries).reduce((rows, key) => {
|
|
89998
90131
|
const entry = entries[key];
|
|
89999
|
-
rows.push([key, stringify$
|
|
90132
|
+
rows.push([key, stringify$3(entry.data)]);
|
|
90000
90133
|
return rows;
|
|
90001
90134
|
}, []),
|
|
90002
90135
|
};
|
|
@@ -90009,7 +90142,7 @@
|
|
|
90009
90142
|
return sqliteResult.rows.reduce((entries, row) => {
|
|
90010
90143
|
const [key, stringifiedData] = row;
|
|
90011
90144
|
const durableStoreEntry = {
|
|
90012
|
-
data: parse$
|
|
90145
|
+
data: parse$3(stringifiedData),
|
|
90013
90146
|
};
|
|
90014
90147
|
entries[key] = durableStoreEntry;
|
|
90015
90148
|
return entries;
|
|
@@ -90019,10 +90152,10 @@
|
|
|
90019
90152
|
|
|
90020
90153
|
// These const values must be in sync with the latest
|
|
90021
90154
|
// @salesforce/nimbus-plugin-lds/sql schema file
|
|
90022
|
-
const TABLE_NAME = 'lds_env_drafts';
|
|
90155
|
+
const TABLE_NAME$1 = 'lds_env_drafts';
|
|
90023
90156
|
class LdsDraftsDataTable extends AbstractKeyValueDataTable {
|
|
90024
90157
|
constructor(plugin) {
|
|
90025
|
-
super(plugin, TABLE_NAME);
|
|
90158
|
+
super(plugin, TABLE_NAME$1);
|
|
90026
90159
|
}
|
|
90027
90160
|
}
|
|
90028
90161
|
|
|
@@ -91800,8 +91933,14 @@
|
|
|
91800
91933
|
return instrumentPrimingSession(session);
|
|
91801
91934
|
}
|
|
91802
91935
|
|
|
91803
|
-
|
|
91804
|
-
|
|
91936
|
+
// count will get reset to 0 when the module is instantated again when bootstrapped
|
|
91937
|
+
let aggressiveTrimCount = 0;
|
|
91938
|
+
const DEFAULT_MAX_RECORD_COUNT = aggressiveTrimCountKillSwitchGate.isOpen({ fallback: false })
|
|
91939
|
+
? 10000
|
|
91940
|
+
: 80000;
|
|
91941
|
+
const DEFAULT_MAX_BATCH_SIZE = aggressiveTrimCountKillSwitchGate.isOpen({ fallback: false })
|
|
91942
|
+
? 1000
|
|
91943
|
+
: 200;
|
|
91805
91944
|
async function aggressiveTrim(data, deallocateFn, options = {}) {
|
|
91806
91945
|
const maxStoreRecords = options.maxStoreRecords !== undefined ? options.maxStoreRecords : DEFAULT_MAX_RECORD_COUNT;
|
|
91807
91946
|
const batchSize = options.batchSize !== undefined ? options.batchSize : DEFAULT_MAX_BATCH_SIZE;
|
|
@@ -91833,6 +91972,9 @@
|
|
|
91833
91972
|
const count = await batch();
|
|
91834
91973
|
deallocatedCount = deallocatedCount + count;
|
|
91835
91974
|
}
|
|
91975
|
+
//increment trim count and report metrics
|
|
91976
|
+
aggressiveTrimCount++;
|
|
91977
|
+
reportAggressiveTrimTriggered(aggressiveTrimCount, storeKeyLength, deallocatedCount);
|
|
91836
91978
|
const trimKeysSkipped = makeSetFilteredFromDifference(pendingTrimKeys, (key) => trimKeys.has(key) === false);
|
|
91837
91979
|
return {
|
|
91838
91980
|
deallocatedCount,
|
|
@@ -91875,7 +92017,7 @@
|
|
|
91875
92017
|
registerReportObserver((report) => {
|
|
91876
92018
|
__nimbus.plugins.LdsObserverPlugin.logAdapterExecution({
|
|
91877
92019
|
name: report.adapterName,
|
|
91878
|
-
serializedConfig: stringify$
|
|
92020
|
+
serializedConfig: stringify$5(report.config),
|
|
91879
92021
|
status: report.result,
|
|
91880
92022
|
duration: report.executionTime,
|
|
91881
92023
|
});
|
|
@@ -91991,7 +92133,7 @@
|
|
|
91991
92133
|
// Make a copy of the config before running transform to avoid mutating the original config
|
|
91992
92134
|
const adapterConfigCopy = {
|
|
91993
92135
|
...config,
|
|
91994
|
-
query: parse$
|
|
92136
|
+
query: parse$9(print(config.query))
|
|
91995
92137
|
};
|
|
91996
92138
|
return {
|
|
91997
92139
|
...adapterConfigCopy,
|
|
@@ -92353,7 +92495,7 @@
|
|
|
92353
92495
|
const batchQueryTransformed = config.batchQuery.map((singleConfig) => {
|
|
92354
92496
|
return {
|
|
92355
92497
|
...singleConfig,
|
|
92356
|
-
query: applyMinimumFieldsToQuery(parse$
|
|
92498
|
+
query: applyMinimumFieldsToQuery(parse$9(print(singleConfig.query))), // Stringifies and parses again to avoid mutating original. Should we just JSON.stringify to avoid the dependency on the parser?
|
|
92357
92499
|
};
|
|
92358
92500
|
});
|
|
92359
92501
|
return {
|
|
@@ -92818,7 +92960,7 @@
|
|
|
92818
92960
|
}
|
|
92819
92961
|
|
|
92820
92962
|
function clone(obj) {
|
|
92821
|
-
return parse$
|
|
92963
|
+
return parse$5(stringify$5(obj));
|
|
92822
92964
|
}
|
|
92823
92965
|
|
|
92824
92966
|
/* global __nimbus */
|
|
@@ -93316,7 +93458,7 @@
|
|
|
93316
93458
|
*/
|
|
93317
93459
|
const { create: create$6, freeze: freeze$3, keys: keys$7, entries } = Object;
|
|
93318
93460
|
const { isArray: isArray$1$1 } = Array;
|
|
93319
|
-
const { stringify: stringify$
|
|
93461
|
+
const { stringify: stringify$2, parse: parse$2 } = JSON;
|
|
93320
93462
|
const LogLevelMap = {
|
|
93321
93463
|
TRACE: 4,
|
|
93322
93464
|
DEBUG: 3,
|
|
@@ -93353,7 +93495,7 @@
|
|
|
93353
93495
|
this.printer(this.formatter(level, message));
|
|
93354
93496
|
}
|
|
93355
93497
|
}
|
|
93356
|
-
let Ok$
|
|
93498
|
+
let Ok$1 = class Ok {
|
|
93357
93499
|
constructor(value) {
|
|
93358
93500
|
this.value = value;
|
|
93359
93501
|
}
|
|
@@ -93375,7 +93517,7 @@
|
|
|
93375
93517
|
return !this.isOk();
|
|
93376
93518
|
}
|
|
93377
93519
|
};
|
|
93378
|
-
const ok$
|
|
93520
|
+
const ok$1 = (value) => new Ok$1(value);
|
|
93379
93521
|
const err$1 = (err2) => new Err$1(err2);
|
|
93380
93522
|
function isSubscribableResult(x) {
|
|
93381
93523
|
if (typeof x !== "object" || x === null) {
|
|
@@ -93438,7 +93580,7 @@
|
|
|
93438
93580
|
return isFinite(node) ? "" + node : "null";
|
|
93439
93581
|
}
|
|
93440
93582
|
if (typeof node !== "object") {
|
|
93441
|
-
return stringify$
|
|
93583
|
+
return stringify$2(node);
|
|
93442
93584
|
}
|
|
93443
93585
|
let i;
|
|
93444
93586
|
let out;
|
|
@@ -93466,7 +93608,7 @@
|
|
|
93466
93608
|
if (out) {
|
|
93467
93609
|
out += ",";
|
|
93468
93610
|
}
|
|
93469
|
-
out += stringify$
|
|
93611
|
+
out += stringify$2(key) + ":" + value;
|
|
93470
93612
|
}
|
|
93471
93613
|
return "{" + out + "}";
|
|
93472
93614
|
}
|
|
@@ -93510,7 +93652,7 @@
|
|
|
93510
93652
|
return err$1(networkResult.error);
|
|
93511
93653
|
} else {
|
|
93512
93654
|
const data = networkResult.value;
|
|
93513
|
-
return ok$
|
|
93655
|
+
return ok$1({
|
|
93514
93656
|
data,
|
|
93515
93657
|
subscribe: (cb) => {
|
|
93516
93658
|
this.subscriptions.push(cb);
|
|
@@ -93529,10 +93671,10 @@
|
|
|
93529
93671
|
if (isSubscribableResult(newResult)) {
|
|
93530
93672
|
const value = newResult.value;
|
|
93531
93673
|
this.subscriptions.forEach((cb) => {
|
|
93532
|
-
cb(ok$
|
|
93674
|
+
cb(ok$1(value.data));
|
|
93533
93675
|
});
|
|
93534
93676
|
}
|
|
93535
|
-
return ok$
|
|
93677
|
+
return ok$1(void 0);
|
|
93536
93678
|
}
|
|
93537
93679
|
return err$1(newResult.error);
|
|
93538
93680
|
});
|
|
@@ -93540,7 +93682,7 @@
|
|
|
93540
93682
|
async afterRequestHooks(_options) {
|
|
93541
93683
|
}
|
|
93542
93684
|
};
|
|
93543
|
-
function buildServiceDescriptor$
|
|
93685
|
+
function buildServiceDescriptor$c() {
|
|
93544
93686
|
return {
|
|
93545
93687
|
type: "networkCommandBaseClass",
|
|
93546
93688
|
version: "1.0",
|
|
@@ -93583,7 +93725,7 @@
|
|
|
93583
93725
|
this.afterRequestHooks({ statusCode: 200 });
|
|
93584
93726
|
} catch (e) {
|
|
93585
93727
|
}
|
|
93586
|
-
return ok$
|
|
93728
|
+
return ok$1(auraReturnValue);
|
|
93587
93729
|
}).catch((error) => {
|
|
93588
93730
|
if (!error || !error.getError) {
|
|
93589
93731
|
return err$1(toError("Failed to get error from response"));
|
|
@@ -93602,7 +93744,7 @@
|
|
|
93602
93744
|
(response2) => {
|
|
93603
93745
|
if (response2.ok) {
|
|
93604
93746
|
return response2.json().then(
|
|
93605
|
-
(json) => ok$
|
|
93747
|
+
(json) => ok$1(json),
|
|
93606
93748
|
(reason) => err$1(toError(reason))
|
|
93607
93749
|
).finally(() => {
|
|
93608
93750
|
try {
|
|
@@ -93642,7 +93784,7 @@
|
|
|
93642
93784
|
return resolvedPromiseLike$3(err$1(toError("Aura/Fetch network services not found")));
|
|
93643
93785
|
}
|
|
93644
93786
|
}
|
|
93645
|
-
function buildServiceDescriptor$
|
|
93787
|
+
function buildServiceDescriptor$b() {
|
|
93646
93788
|
return {
|
|
93647
93789
|
type: "auraNetworkCommandBaseClass",
|
|
93648
93790
|
version: "1.0",
|
|
@@ -93661,7 +93803,7 @@
|
|
|
93661
93803
|
* For full license text, see the LICENSE.txt file
|
|
93662
93804
|
*/
|
|
93663
93805
|
const { isArray: isArray$6 } = Array;
|
|
93664
|
-
|
|
93806
|
+
class Ok {
|
|
93665
93807
|
constructor(value) {
|
|
93666
93808
|
this.value = value;
|
|
93667
93809
|
}
|
|
@@ -93671,7 +93813,7 @@
|
|
|
93671
93813
|
isErr() {
|
|
93672
93814
|
return !this.isOk();
|
|
93673
93815
|
}
|
|
93674
|
-
}
|
|
93816
|
+
}
|
|
93675
93817
|
class Err {
|
|
93676
93818
|
constructor(error) {
|
|
93677
93819
|
this.error = error;
|
|
@@ -93683,7 +93825,7 @@
|
|
|
93683
93825
|
return !this.isOk();
|
|
93684
93826
|
}
|
|
93685
93827
|
}
|
|
93686
|
-
const ok
|
|
93828
|
+
const ok = (value) => new Ok(value);
|
|
93687
93829
|
const err = (err2) => new Err(err2);
|
|
93688
93830
|
function resolvedPromiseLike$2(result) {
|
|
93689
93831
|
if (isPromiseLike$2(result)) {
|
|
@@ -93774,6 +93916,38 @@
|
|
|
93774
93916
|
}
|
|
93775
93917
|
return false;
|
|
93776
93918
|
}
|
|
93919
|
+
class CacheControlRequestRunner {
|
|
93920
|
+
constructor(readFromCache, requestFromNetwork, writeToCache) {
|
|
93921
|
+
this.readFromCacheInternal = readFromCache;
|
|
93922
|
+
this.requestFromNetworkInternal = requestFromNetwork;
|
|
93923
|
+
this.writeToCacheInternal = writeToCache;
|
|
93924
|
+
}
|
|
93925
|
+
readFromCache(cache) {
|
|
93926
|
+
const resultPromise = this.readFromCacheInternal(cache);
|
|
93927
|
+
return resultPromise.then((result) => {
|
|
93928
|
+
if (result.isErr()) {
|
|
93929
|
+
return err(result.error);
|
|
93930
|
+
}
|
|
93931
|
+
this.returnData = result;
|
|
93932
|
+
return ok(void 0);
|
|
93933
|
+
});
|
|
93934
|
+
}
|
|
93935
|
+
requestFromNetwork() {
|
|
93936
|
+
const that = this;
|
|
93937
|
+
return async function* () {
|
|
93938
|
+
const result = await that.requestFromNetworkInternal();
|
|
93939
|
+
if (result.isErr()) {
|
|
93940
|
+
that.networkError = result;
|
|
93941
|
+
} else {
|
|
93942
|
+
that.networkData = result;
|
|
93943
|
+
}
|
|
93944
|
+
yield result;
|
|
93945
|
+
}();
|
|
93946
|
+
}
|
|
93947
|
+
writeToCache(cache, networkResult) {
|
|
93948
|
+
return this.writeToCacheInternal(cache, networkResult);
|
|
93949
|
+
}
|
|
93950
|
+
}
|
|
93777
93951
|
class CacheControlCommand extends BaseCommand {
|
|
93778
93952
|
constructor(services) {
|
|
93779
93953
|
super();
|
|
@@ -93793,57 +93967,48 @@
|
|
|
93793
93967
|
this.cacheControlStrategyConfig,
|
|
93794
93968
|
overrides
|
|
93795
93969
|
);
|
|
93796
|
-
|
|
93797
|
-
let returnError;
|
|
93798
|
-
const requestRunner = {
|
|
93799
|
-
readFromCache: (cache) => {
|
|
93800
|
-
const resultPromise2 = this.buildResultWithSubscribe(cache);
|
|
93801
|
-
return resultPromise2.then((result) => {
|
|
93802
|
-
if (result.isErr()) {
|
|
93803
|
-
return err(result.error);
|
|
93804
|
-
}
|
|
93805
|
-
returnData = result;
|
|
93806
|
-
return ok$1(void 0);
|
|
93807
|
-
});
|
|
93808
|
-
},
|
|
93809
|
-
requestFromNetwork: () => {
|
|
93810
|
-
const that = this;
|
|
93811
|
-
return async function* () {
|
|
93812
|
-
const result = await that.requestFromNetwork();
|
|
93813
|
-
if (result.isErr()) {
|
|
93814
|
-
returnError = result;
|
|
93815
|
-
}
|
|
93816
|
-
yield result;
|
|
93817
|
-
}();
|
|
93818
|
-
},
|
|
93819
|
-
writeToCache: (cache, networkResult) => {
|
|
93820
|
-
return this.writeToCacheAndRecordKeys(cache, networkResult);
|
|
93821
|
-
}
|
|
93822
|
-
};
|
|
93970
|
+
const requestRunner = this.buildRequestRunner();
|
|
93823
93971
|
const resultPromise = this.services.cacheController.execute(mergedCacheControlConfig, requestRunner, {
|
|
93824
93972
|
instrumentationAttributes: this.instrumentationAttributes
|
|
93825
93973
|
});
|
|
93826
93974
|
return resultPromise.then((result) => {
|
|
93827
|
-
return this.
|
|
93828
|
-
|
|
93829
|
-
|
|
93830
|
-
|
|
93831
|
-
|
|
93832
|
-
|
|
93833
|
-
|
|
93834
|
-
|
|
93835
|
-
|
|
93836
|
-
|
|
93837
|
-
if (
|
|
93838
|
-
return
|
|
93975
|
+
return this.handleCacheControllerResult(result, requestRunner);
|
|
93976
|
+
});
|
|
93977
|
+
}
|
|
93978
|
+
handleCacheControllerResult(result, requestRunner) {
|
|
93979
|
+
const { networkError, networkData, returnData } = requestRunner;
|
|
93980
|
+
return this.publishUpdatedKeys().then(() => {
|
|
93981
|
+
if (networkError) {
|
|
93982
|
+
return networkError;
|
|
93983
|
+
}
|
|
93984
|
+
if (result.isErr()) {
|
|
93985
|
+
if (networkData) {
|
|
93986
|
+
return this.constructSubscribableResult(networkData.value);
|
|
93839
93987
|
}
|
|
93840
|
-
|
|
93841
|
-
|
|
93988
|
+
return err(result.error);
|
|
93989
|
+
}
|
|
93990
|
+
if (this.subscriptions.length > 0) {
|
|
93991
|
+
this.subscribeToKeysUsed();
|
|
93992
|
+
}
|
|
93993
|
+
if (returnData === void 0) {
|
|
93994
|
+
if (networkData) {
|
|
93995
|
+
return this.constructSubscribableResult(networkData.value);
|
|
93842
93996
|
}
|
|
93843
|
-
return
|
|
93844
|
-
}
|
|
93997
|
+
return err(new Error("Cache miss after fetching from network"));
|
|
93998
|
+
}
|
|
93999
|
+
if (returnData.isOk() && this.lastEmittedData === void 0) {
|
|
94000
|
+
this.lastEmittedData = returnData.value.data;
|
|
94001
|
+
}
|
|
94002
|
+
return returnData;
|
|
93845
94003
|
});
|
|
93846
94004
|
}
|
|
94005
|
+
buildRequestRunner() {
|
|
94006
|
+
return new CacheControlRequestRunner(
|
|
94007
|
+
(cache) => this.buildResultWithSubscribe(cache),
|
|
94008
|
+
() => this.requestFromNetwork(),
|
|
94009
|
+
(cache, networkResult) => this.writeToCacheAndRecordKeys(cache, networkResult)
|
|
94010
|
+
);
|
|
94011
|
+
}
|
|
93847
94012
|
publishUpdatedKeys() {
|
|
93848
94013
|
if (this.services.pubSub) {
|
|
93849
94014
|
if (this.keysUpdated !== void 0 && this.keysUpdated.size > 0) {
|
|
@@ -93894,7 +94059,7 @@
|
|
|
93894
94059
|
if (result.isErr()) {
|
|
93895
94060
|
return err(result.error);
|
|
93896
94061
|
}
|
|
93897
|
-
return ok
|
|
94062
|
+
return ok(void 0);
|
|
93898
94063
|
});
|
|
93899
94064
|
}
|
|
93900
94065
|
writeToCacheAndRecordKeys(cache, networkResult) {
|
|
@@ -93902,7 +94067,7 @@
|
|
|
93902
94067
|
return this.writeToCache(recordableCache, networkResult).then((result) => {
|
|
93903
94068
|
this.instantiationTime = Date.now() / 1e3;
|
|
93904
94069
|
this.keysUpdated = recordableCache.keysUpdated;
|
|
93905
|
-
return ok
|
|
94070
|
+
return ok(result);
|
|
93906
94071
|
});
|
|
93907
94072
|
}
|
|
93908
94073
|
buildResultWithSubscribe(cache) {
|
|
@@ -93914,14 +94079,18 @@
|
|
|
93914
94079
|
} else {
|
|
93915
94080
|
const data = readResult.value;
|
|
93916
94081
|
this.keysUsed = recordableCache.keysRead;
|
|
93917
|
-
return
|
|
93918
|
-
data,
|
|
93919
|
-
subscribe: this.buildSubscribe(),
|
|
93920
|
-
refresh: () => this.refresh()
|
|
93921
|
-
});
|
|
94082
|
+
return this.constructSubscribableResult(data);
|
|
93922
94083
|
}
|
|
93923
94084
|
});
|
|
93924
94085
|
}
|
|
94086
|
+
constructSubscribableResult(data) {
|
|
94087
|
+
return ok({
|
|
94088
|
+
data,
|
|
94089
|
+
// this cast is in case we need to return Network data as a fallback for caching errors
|
|
94090
|
+
subscribe: this.buildSubscribe(),
|
|
94091
|
+
refresh: () => this.refresh()
|
|
94092
|
+
});
|
|
94093
|
+
}
|
|
93925
94094
|
/**
|
|
93926
94095
|
* Builds a function that subscribes to cache changes via the pubsub service. Whenever
|
|
93927
94096
|
* relevant cache updates occur, it re-reads the data and compares it against
|
|
@@ -93953,7 +94122,7 @@
|
|
|
93953
94122
|
}
|
|
93954
94123
|
if (!this.equals(this.lastEmittedData, result.value.data)) {
|
|
93955
94124
|
this.lastEmittedData = result.value.data;
|
|
93956
|
-
this.invokeConsumerCallbacks(ok
|
|
94125
|
+
this.invokeConsumerCallbacks(ok(result.value.data));
|
|
93957
94126
|
}
|
|
93958
94127
|
return result;
|
|
93959
94128
|
});
|
|
@@ -94041,7 +94210,7 @@
|
|
|
94041
94210
|
this.afterRequestHooks({ statusCode: 200 });
|
|
94042
94211
|
} catch (e) {
|
|
94043
94212
|
}
|
|
94044
|
-
return ok$
|
|
94213
|
+
return ok$1(auraReturnValue);
|
|
94045
94214
|
}).catch((error) => {
|
|
94046
94215
|
if (!error || !error.getError) {
|
|
94047
94216
|
return err$1(toError("Failed to get error from response"));
|
|
@@ -94060,7 +94229,7 @@
|
|
|
94060
94229
|
(response2) => {
|
|
94061
94230
|
if (response2.ok) {
|
|
94062
94231
|
return response2.json().then(
|
|
94063
|
-
(json) => ok$
|
|
94232
|
+
(json) => ok$1(json),
|
|
94064
94233
|
(reason) => err$1(toError(reason))
|
|
94065
94234
|
).finally(() => {
|
|
94066
94235
|
try {
|
|
@@ -94092,10 +94261,10 @@
|
|
|
94092
94261
|
const data = this.buildResultType().query(cache, this.buildQuery());
|
|
94093
94262
|
if (data.isErr()) {
|
|
94094
94263
|
return resolvedPromiseLike$3(
|
|
94095
|
-
err$1(new Error(`Failed to build data from type: ${stringify$
|
|
94264
|
+
err$1(new Error(`Failed to build data from type: ${stringify$2(data.error)}`))
|
|
94096
94265
|
);
|
|
94097
94266
|
}
|
|
94098
|
-
return resolvedPromiseLike$3(ok$
|
|
94267
|
+
return resolvedPromiseLike$3(ok$1(data.value));
|
|
94099
94268
|
}
|
|
94100
94269
|
writeToCache(cache, networkResult) {
|
|
94101
94270
|
if (networkResult.isOk()) {
|
|
@@ -94107,7 +94276,7 @@
|
|
|
94107
94276
|
return resolvedPromiseLike$3(void 0);
|
|
94108
94277
|
}
|
|
94109
94278
|
}
|
|
94110
|
-
function buildServiceDescriptor$
|
|
94279
|
+
function buildServiceDescriptor$a() {
|
|
94111
94280
|
return {
|
|
94112
94281
|
type: "auraNormalizedCacheControlCommand",
|
|
94113
94282
|
version: "1.0",
|
|
@@ -94172,7 +94341,7 @@
|
|
|
94172
94341
|
this.afterRequestHooks({ statusCode: 200 });
|
|
94173
94342
|
} catch (e) {
|
|
94174
94343
|
}
|
|
94175
|
-
return ok$
|
|
94344
|
+
return ok$1(auraReturnValue);
|
|
94176
94345
|
}).catch((error) => {
|
|
94177
94346
|
if (!error || !error.getError) {
|
|
94178
94347
|
return err$1(toError("Failed to get error from response"));
|
|
@@ -94191,7 +94360,7 @@
|
|
|
94191
94360
|
(response2) => {
|
|
94192
94361
|
if (response2.ok) {
|
|
94193
94362
|
return response2.json().then(
|
|
94194
|
-
(json) => ok$
|
|
94363
|
+
(json) => ok$1(json),
|
|
94195
94364
|
(reason) => err$1(toError(reason))
|
|
94196
94365
|
).finally(() => {
|
|
94197
94366
|
try {
|
|
@@ -94228,7 +94397,7 @@
|
|
|
94228
94397
|
if (data === void 0) {
|
|
94229
94398
|
return resolvedPromiseLike$3(err$1(new Error("Failed to find data in cache")));
|
|
94230
94399
|
}
|
|
94231
|
-
return resolvedPromiseLike$3(ok$
|
|
94400
|
+
return resolvedPromiseLike$3(ok$1(data));
|
|
94232
94401
|
}
|
|
94233
94402
|
writeToCache(cache, networkResult) {
|
|
94234
94403
|
if (networkResult.isOk()) {
|
|
@@ -94245,7 +94414,7 @@
|
|
|
94245
94414
|
return `{"endpoint":${this.endpoint},"params":${stableJSONStringify$2(this.auraParams)}}`;
|
|
94246
94415
|
}
|
|
94247
94416
|
}
|
|
94248
|
-
function buildServiceDescriptor$
|
|
94417
|
+
function buildServiceDescriptor$9() {
|
|
94249
94418
|
return {
|
|
94250
94419
|
type: "auraResourceCacheControlCommand",
|
|
94251
94420
|
version: "1.0",
|
|
@@ -94283,7 +94452,7 @@
|
|
|
94283
94452
|
return err$1(networkResult.error);
|
|
94284
94453
|
} else {
|
|
94285
94454
|
const data = networkResult.value;
|
|
94286
|
-
return ok$
|
|
94455
|
+
return ok$1({
|
|
94287
94456
|
data,
|
|
94288
94457
|
subscribe: (cb) => {
|
|
94289
94458
|
this.subscriptions.push(cb);
|
|
@@ -94302,10 +94471,10 @@
|
|
|
94302
94471
|
if (isSubscribableResult(newResult)) {
|
|
94303
94472
|
const value = newResult.value;
|
|
94304
94473
|
this.subscriptions.forEach((cb) => {
|
|
94305
|
-
cb(ok$
|
|
94474
|
+
cb(ok$1(value.data));
|
|
94306
94475
|
});
|
|
94307
94476
|
}
|
|
94308
|
-
return ok$
|
|
94477
|
+
return ok$1(void 0);
|
|
94309
94478
|
}
|
|
94310
94479
|
return err$1(newResult.error);
|
|
94311
94480
|
});
|
|
@@ -94329,7 +94498,7 @@
|
|
|
94329
94498
|
(response2) => {
|
|
94330
94499
|
if (response2.ok) {
|
|
94331
94500
|
return response2.json().then(
|
|
94332
|
-
(json) => ok$
|
|
94501
|
+
(json) => ok$1(json),
|
|
94333
94502
|
(reason) => err$1(toError(reason))
|
|
94334
94503
|
).finally(() => {
|
|
94335
94504
|
try {
|
|
@@ -94352,7 +94521,7 @@
|
|
|
94352
94521
|
);
|
|
94353
94522
|
}
|
|
94354
94523
|
}
|
|
94355
|
-
function buildServiceDescriptor$
|
|
94524
|
+
function buildServiceDescriptor$8() {
|
|
94356
94525
|
return {
|
|
94357
94526
|
type: "fetchNetworkCommandBaseClass",
|
|
94358
94527
|
version: "1.0",
|
|
@@ -94389,7 +94558,7 @@
|
|
|
94389
94558
|
(response2) => {
|
|
94390
94559
|
if (response2.ok) {
|
|
94391
94560
|
return response2.json().then(
|
|
94392
|
-
(json) => ok$
|
|
94561
|
+
(json) => ok$1(json),
|
|
94393
94562
|
(reason) => err$1(toError(reason))
|
|
94394
94563
|
).finally(() => {
|
|
94395
94564
|
try {
|
|
@@ -94421,10 +94590,10 @@
|
|
|
94421
94590
|
const data = this.buildResultType().query(cache, this.buildQuery());
|
|
94422
94591
|
if (data.isErr()) {
|
|
94423
94592
|
return resolvedPromiseLike$3(
|
|
94424
|
-
err$1(new Error(`Failed to build data from type: ${stringify$
|
|
94593
|
+
err$1(new Error(`Failed to build data from type: ${stringify$2(data.error)}`))
|
|
94425
94594
|
);
|
|
94426
94595
|
}
|
|
94427
|
-
return resolvedPromiseLike$3(ok$
|
|
94596
|
+
return resolvedPromiseLike$3(ok$1(data.value));
|
|
94428
94597
|
}
|
|
94429
94598
|
writeToCache(cache, networkResult) {
|
|
94430
94599
|
if (networkResult.isOk()) {
|
|
@@ -94436,7 +94605,7 @@
|
|
|
94436
94605
|
return resolvedPromiseLike$3(void 0);
|
|
94437
94606
|
}
|
|
94438
94607
|
}
|
|
94439
|
-
function buildServiceDescriptor$
|
|
94608
|
+
function buildServiceDescriptor$7() {
|
|
94440
94609
|
return {
|
|
94441
94610
|
type: "httpNormalizedCacheControlCommand",
|
|
94442
94611
|
version: "1.0",
|
|
@@ -94454,12 +94623,12 @@
|
|
|
94454
94623
|
* All rights reserved.
|
|
94455
94624
|
* For full license text, see the LICENSE.txt file
|
|
94456
94625
|
*/
|
|
94457
|
-
const { stringify: stringify$
|
|
94458
|
-
function deepCopy(x) {
|
|
94459
|
-
const stringified = stringify$
|
|
94460
|
-
return stringified ? parse$
|
|
94626
|
+
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
94627
|
+
function deepCopy$1(x) {
|
|
94628
|
+
const stringified = stringify$1(x);
|
|
94629
|
+
return stringified ? parse$1(stringified) : void 0;
|
|
94461
94630
|
}
|
|
94462
|
-
class DefaultRecordableCache {
|
|
94631
|
+
let DefaultRecordableCache$1 = class DefaultRecordableCache {
|
|
94463
94632
|
constructor(baseCache) {
|
|
94464
94633
|
this.baseCache = baseCache;
|
|
94465
94634
|
this.keysRead = /* @__PURE__ */ new Set();
|
|
@@ -94478,7 +94647,7 @@
|
|
|
94478
94647
|
this.missingKeysRead.add(key);
|
|
94479
94648
|
}
|
|
94480
94649
|
if (options == null ? void 0 : options.copy) {
|
|
94481
|
-
return deepCopy(value);
|
|
94650
|
+
return deepCopy$1(value);
|
|
94482
94651
|
}
|
|
94483
94652
|
return value;
|
|
94484
94653
|
}
|
|
@@ -94504,13 +94673,13 @@
|
|
|
94504
94673
|
return new DefaultRecordableCache(this);
|
|
94505
94674
|
}
|
|
94506
94675
|
filter(predicate) {
|
|
94507
|
-
return new DefaultFilteredCache(this, predicate);
|
|
94676
|
+
return new DefaultFilteredCache$1(this, predicate);
|
|
94508
94677
|
}
|
|
94509
94678
|
buildFixedTimeWritableCache(generatedTime) {
|
|
94510
|
-
return new FixedTimeWritableCache(this, generatedTime);
|
|
94679
|
+
return new FixedTimeWritableCache$1(this, generatedTime);
|
|
94511
94680
|
}
|
|
94512
|
-
}
|
|
94513
|
-
class DefaultFilteredCache {
|
|
94681
|
+
};
|
|
94682
|
+
let DefaultFilteredCache$1 = class DefaultFilteredCache {
|
|
94514
94683
|
constructor(baseCache, predicate) {
|
|
94515
94684
|
this.baseCache = baseCache;
|
|
94516
94685
|
this.predicate = predicate;
|
|
@@ -94522,7 +94691,7 @@
|
|
|
94522
94691
|
const result = this.baseCache.get(key);
|
|
94523
94692
|
if (result && this.predicate(key, result)) {
|
|
94524
94693
|
if (options == null ? void 0 : options.copy) {
|
|
94525
|
-
return deepCopy(result);
|
|
94694
|
+
return deepCopy$1(result);
|
|
94526
94695
|
}
|
|
94527
94696
|
return result;
|
|
94528
94697
|
}
|
|
@@ -94544,7 +94713,7 @@
|
|
|
94544
94713
|
return this.getFilteredEntries();
|
|
94545
94714
|
}
|
|
94546
94715
|
record() {
|
|
94547
|
-
return new DefaultRecordableCache(this);
|
|
94716
|
+
return new DefaultRecordableCache$1(this);
|
|
94548
94717
|
}
|
|
94549
94718
|
filter(predicate) {
|
|
94550
94719
|
return new DefaultFilteredCache(this, predicate);
|
|
@@ -94564,10 +94733,10 @@
|
|
|
94564
94733
|
return filteredKeySet;
|
|
94565
94734
|
}
|
|
94566
94735
|
buildFixedTimeWritableCache(generatedTime) {
|
|
94567
|
-
return new FixedTimeWritableCache(this, generatedTime);
|
|
94736
|
+
return new FixedTimeWritableCache$1(this, generatedTime);
|
|
94568
94737
|
}
|
|
94569
|
-
}
|
|
94570
|
-
class FixedTimeWritableCache {
|
|
94738
|
+
};
|
|
94739
|
+
let FixedTimeWritableCache$1 = class FixedTimeWritableCache {
|
|
94571
94740
|
constructor(baseCache, generatedTime) {
|
|
94572
94741
|
this.baseCache = baseCache;
|
|
94573
94742
|
this.generatedTime = generatedTime;
|
|
@@ -94603,22 +94772,22 @@
|
|
|
94603
94772
|
return this.baseCache.entries();
|
|
94604
94773
|
}
|
|
94605
94774
|
record() {
|
|
94606
|
-
return new DefaultRecordableCache(this);
|
|
94775
|
+
return new DefaultRecordableCache$1(this);
|
|
94607
94776
|
}
|
|
94608
94777
|
filter(predicate) {
|
|
94609
|
-
return new DefaultFilteredCache(this, predicate);
|
|
94778
|
+
return new DefaultFilteredCache$1(this, predicate);
|
|
94610
94779
|
}
|
|
94611
94780
|
buildFixedTimeWritableCache(generatedTime) {
|
|
94612
94781
|
return new FixedTimeWritableCache(this, generatedTime);
|
|
94613
94782
|
}
|
|
94614
|
-
}
|
|
94615
|
-
class DefaultCache {
|
|
94783
|
+
};
|
|
94784
|
+
let DefaultCache$1 = class DefaultCache {
|
|
94616
94785
|
constructor() {
|
|
94617
94786
|
this.data = {};
|
|
94618
94787
|
}
|
|
94619
94788
|
get(key, options) {
|
|
94620
94789
|
if (options == null ? void 0 : options.copy) {
|
|
94621
|
-
return deepCopy(this.data[key]);
|
|
94790
|
+
return deepCopy$1(this.data[key]);
|
|
94622
94791
|
}
|
|
94623
94792
|
return this.data[key];
|
|
94624
94793
|
}
|
|
@@ -94680,20 +94849,20 @@
|
|
|
94680
94849
|
return Object.entries(this.data);
|
|
94681
94850
|
}
|
|
94682
94851
|
record() {
|
|
94683
|
-
return new DefaultRecordableCache(this);
|
|
94852
|
+
return new DefaultRecordableCache$1(this);
|
|
94684
94853
|
}
|
|
94685
94854
|
filter(predicate) {
|
|
94686
|
-
return new DefaultFilteredCache(this, predicate);
|
|
94855
|
+
return new DefaultFilteredCache$1(this, predicate);
|
|
94687
94856
|
}
|
|
94688
94857
|
buildFixedTimeWritableCache(generatedTime) {
|
|
94689
|
-
return new FixedTimeWritableCache(this, generatedTime);
|
|
94858
|
+
return new FixedTimeWritableCache$1(this, generatedTime);
|
|
94690
94859
|
}
|
|
94691
|
-
}
|
|
94692
|
-
function buildServiceDescriptor$
|
|
94860
|
+
};
|
|
94861
|
+
function buildServiceDescriptor$6() {
|
|
94693
94862
|
return {
|
|
94694
94863
|
type: "cache",
|
|
94695
94864
|
version: "1.0",
|
|
94696
|
-
service: new DefaultCache()
|
|
94865
|
+
service: new DefaultCache$1()
|
|
94697
94866
|
};
|
|
94698
94867
|
}
|
|
94699
94868
|
|
|
@@ -94726,7 +94895,7 @@
|
|
|
94726
94895
|
const tempCache = this.filteredCache;
|
|
94727
94896
|
return new Promise(async (resolve, reject) => {
|
|
94728
94897
|
try {
|
|
94729
|
-
let readResult = ok$
|
|
94898
|
+
let readResult = ok$1(void 0);
|
|
94730
94899
|
for await (const rfnResult of this.requestRunner.requestFromNetwork()) {
|
|
94731
94900
|
if (rfnResult) {
|
|
94732
94901
|
const result = await this.services.cacheInclusionPolicy.write({
|
|
@@ -94764,13 +94933,13 @@
|
|
|
94764
94933
|
startTime,
|
|
94765
94934
|
options == null ? void 0 : options.instrumentationAttributes
|
|
94766
94935
|
);
|
|
94767
|
-
return ok$
|
|
94936
|
+
return ok$1(void 0);
|
|
94768
94937
|
}
|
|
94769
94938
|
this.collectCacheMissInstrumentation(startTime, options == null ? void 0 : options.instrumentationAttributes);
|
|
94770
94939
|
const tempCache = this.filteredCache;
|
|
94771
94940
|
return new Promise(async (resolve, reject) => {
|
|
94772
94941
|
try {
|
|
94773
|
-
let readResult = ok$
|
|
94942
|
+
let readResult = ok$1(void 0);
|
|
94774
94943
|
for await (const rfnResult of this.requestRunner.requestFromNetwork()) {
|
|
94775
94944
|
if (rfnResult) {
|
|
94776
94945
|
const result = await this.services.cacheInclusionPolicy.write({
|
|
@@ -94786,7 +94955,7 @@
|
|
|
94786
94955
|
readFromL1: (l1) => this.requestRunner.readFromCache(l1)
|
|
94787
94956
|
});
|
|
94788
94957
|
if (readResult.isOk()) {
|
|
94789
|
-
resolve(ok$
|
|
94958
|
+
resolve(ok$1(void 0));
|
|
94790
94959
|
}
|
|
94791
94960
|
}
|
|
94792
94961
|
return resolve(readResult);
|
|
@@ -94857,7 +95026,7 @@
|
|
|
94857
95026
|
yield* this.services.cacheInclusionPolicy.findAndModify(query, cacheUpdate);
|
|
94858
95027
|
}
|
|
94859
95028
|
}
|
|
94860
|
-
function buildServiceDescriptor$
|
|
95029
|
+
function buildServiceDescriptor$5(cache, cacheInclusionPolicy) {
|
|
94861
95030
|
return {
|
|
94862
95031
|
type: "cacheController",
|
|
94863
95032
|
version: "1.0",
|
|
@@ -94865,193 +95034,6 @@
|
|
|
94865
95034
|
};
|
|
94866
95035
|
}
|
|
94867
95036
|
|
|
94868
|
-
/*!
|
|
94869
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
94870
|
-
* All rights reserved.
|
|
94871
|
-
* For full license text, see the LICENSE.txt file
|
|
94872
|
-
*/
|
|
94873
|
-
class CacheInclusionPolicyService {
|
|
94874
|
-
}
|
|
94875
|
-
/*!
|
|
94876
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
94877
|
-
* All rights reserved.
|
|
94878
|
-
* For full license text, see the LICENSE.txt file
|
|
94879
|
-
*/
|
|
94880
|
-
class Ok {
|
|
94881
|
-
constructor(value) {
|
|
94882
|
-
this.value = value;
|
|
94883
|
-
}
|
|
94884
|
-
isOk() {
|
|
94885
|
-
return true;
|
|
94886
|
-
}
|
|
94887
|
-
isErr() {
|
|
94888
|
-
return !this.isOk();
|
|
94889
|
-
}
|
|
94890
|
-
}
|
|
94891
|
-
const ok = (value) => new Ok(value);
|
|
94892
|
-
function resolvedPromiseLike$1(result) {
|
|
94893
|
-
if (isPromiseLike$1(result)) {
|
|
94894
|
-
return result.then((nextResult) => nextResult);
|
|
94895
|
-
}
|
|
94896
|
-
return {
|
|
94897
|
-
then: (onFulfilled, _onRejected) => {
|
|
94898
|
-
try {
|
|
94899
|
-
return resolvedPromiseLike$1(onFulfilled(result));
|
|
94900
|
-
} catch (e) {
|
|
94901
|
-
if (onFulfilled === void 0) {
|
|
94902
|
-
return resolvedPromiseLike$1(result);
|
|
94903
|
-
}
|
|
94904
|
-
return rejectedPromiseLike$1(e);
|
|
94905
|
-
}
|
|
94906
|
-
}
|
|
94907
|
-
};
|
|
94908
|
-
}
|
|
94909
|
-
function rejectedPromiseLike$1(reason) {
|
|
94910
|
-
if (isPromiseLike$1(reason)) {
|
|
94911
|
-
return reason.then((nextResult) => nextResult);
|
|
94912
|
-
}
|
|
94913
|
-
return {
|
|
94914
|
-
then: (_onFulfilled, onRejected) => {
|
|
94915
|
-
if (typeof onRejected === "function") {
|
|
94916
|
-
try {
|
|
94917
|
-
return resolvedPromiseLike$1(onRejected(reason));
|
|
94918
|
-
} catch (e) {
|
|
94919
|
-
return rejectedPromiseLike$1(e);
|
|
94920
|
-
}
|
|
94921
|
-
}
|
|
94922
|
-
return rejectedPromiseLike$1(reason);
|
|
94923
|
-
}
|
|
94924
|
-
};
|
|
94925
|
-
}
|
|
94926
|
-
function isPromiseLike$1(x) {
|
|
94927
|
-
return typeof (x == null ? void 0 : x.then) === "function";
|
|
94928
|
-
}
|
|
94929
|
-
const isAndQuery = (query) => "$and" in query;
|
|
94930
|
-
const isOrQuery = (query) => "$or" in query;
|
|
94931
|
-
const isNotQuery = (query) => "$not" in query;
|
|
94932
|
-
const matchesMetadata = (metadataQuery, cacheControl) => {
|
|
94933
|
-
if ("cacheControlType" in metadataQuery && cacheControl.type !== metadataQuery.cacheControlType.$eq) {
|
|
94934
|
-
return false;
|
|
94935
|
-
}
|
|
94936
|
-
if ("maxAge" in metadataQuery && cacheControl.type === "max-age") {
|
|
94937
|
-
const maxAge = cacheControl.maxAge ?? 0;
|
|
94938
|
-
if (metadataQuery.maxAge.$gte !== void 0 && maxAge < metadataQuery.maxAge.$gte || metadataQuery.maxAge.$lte !== void 0 && maxAge > metadataQuery.maxAge.$lte) {
|
|
94939
|
-
return false;
|
|
94940
|
-
}
|
|
94941
|
-
}
|
|
94942
|
-
return true;
|
|
94943
|
-
};
|
|
94944
|
-
function queryToPredicate(query) {
|
|
94945
|
-
return (key, entry) => {
|
|
94946
|
-
if (!query) return false;
|
|
94947
|
-
if (isAndQuery(query))
|
|
94948
|
-
return query.$and.every((subQuery) => queryToPredicate(subQuery)(key, entry));
|
|
94949
|
-
if (isOrQuery(query))
|
|
94950
|
-
return query.$or.some((subQuery) => queryToPredicate(subQuery)(key, entry));
|
|
94951
|
-
if (isNotQuery(query)) return !queryToPredicate(query.$not)(key, entry);
|
|
94952
|
-
if ("key" in query) return matchesKey(query.key, key);
|
|
94953
|
-
if ("metadata" in query)
|
|
94954
|
-
return matchesMetadata(query.metadata, entry.metadata.cacheControl);
|
|
94955
|
-
if ("value" in query) return false;
|
|
94956
|
-
throw new Error("Unknown Query Operation");
|
|
94957
|
-
};
|
|
94958
|
-
}
|
|
94959
|
-
function matchesKey(keyQuery, key) {
|
|
94960
|
-
if ("$regex" in keyQuery) {
|
|
94961
|
-
return keyQuery.$regex.test(key);
|
|
94962
|
-
}
|
|
94963
|
-
return false;
|
|
94964
|
-
}
|
|
94965
|
-
function buildUpdate(update, existing) {
|
|
94966
|
-
switch (update.type) {
|
|
94967
|
-
case "invalidate":
|
|
94968
|
-
const updatedCacheControl = buildInvalidatedCacheControl(
|
|
94969
|
-
existing.metadata.cacheControl
|
|
94970
|
-
);
|
|
94971
|
-
return updatedCacheControl !== void 0 ? { type: "metadata", metadata: updatedCacheControl } : { type: "no-op" };
|
|
94972
|
-
default:
|
|
94973
|
-
throw new Error(`Invalid update operation: ${update.type}`);
|
|
94974
|
-
}
|
|
94975
|
-
}
|
|
94976
|
-
function buildInvalidatedCacheControl(existingCacheControl) {
|
|
94977
|
-
switch (existingCacheControl.type) {
|
|
94978
|
-
case "max-age":
|
|
94979
|
-
case "stale-while-revalidate":
|
|
94980
|
-
if (existingCacheControl.maxAge !== 0) {
|
|
94981
|
-
return {
|
|
94982
|
-
...existingCacheControl,
|
|
94983
|
-
maxAge: 0
|
|
94984
|
-
};
|
|
94985
|
-
}
|
|
94986
|
-
}
|
|
94987
|
-
return void 0;
|
|
94988
|
-
}
|
|
94989
|
-
class InMemoryCacheInclusionPolicy extends CacheInclusionPolicyService {
|
|
94990
|
-
constructor(services) {
|
|
94991
|
-
super();
|
|
94992
|
-
this.services = services;
|
|
94993
|
-
}
|
|
94994
|
-
/**
|
|
94995
|
-
* Reads data out of a single level in memory store.
|
|
94996
|
-
*/
|
|
94997
|
-
read(options) {
|
|
94998
|
-
const { l1, readFromL1 } = options;
|
|
94999
|
-
return readFromL1(l1);
|
|
95000
|
-
}
|
|
95001
|
-
/**
|
|
95002
|
-
* Writes data to a single level in memory store.
|
|
95003
|
-
*/
|
|
95004
|
-
write(options) {
|
|
95005
|
-
const { l1, writeToL1 } = options;
|
|
95006
|
-
return writeToL1(l1);
|
|
95007
|
-
}
|
|
95008
|
-
/**
|
|
95009
|
-
* Finds cache entries that match the given query.
|
|
95010
|
-
* Returns an async generator that yields `[key, entry]`.
|
|
95011
|
-
*/
|
|
95012
|
-
async *find(query) {
|
|
95013
|
-
const cache = this.services.cache;
|
|
95014
|
-
const predicate = queryToPredicate(query);
|
|
95015
|
-
const filteredEntries = cache.filter(predicate).entries();
|
|
95016
|
-
for (const entry of filteredEntries) {
|
|
95017
|
-
yield entry;
|
|
95018
|
-
}
|
|
95019
|
-
}
|
|
95020
|
-
/**
|
|
95021
|
-
* Finds and modifies cache entries that match the given query.
|
|
95022
|
-
* Extends `find(query)` and returns an async generator of modified keys.
|
|
95023
|
-
*/
|
|
95024
|
-
async *findAndModify(query, cacheUpdate) {
|
|
95025
|
-
const cache = this.services.cache;
|
|
95026
|
-
for await (const [key, value] of this.find(query)) {
|
|
95027
|
-
const update = buildUpdate(cacheUpdate, value);
|
|
95028
|
-
switch (update.type) {
|
|
95029
|
-
case "entry":
|
|
95030
|
-
this.write({
|
|
95031
|
-
l1: cache,
|
|
95032
|
-
writeToL1: (l1) => resolvedPromiseLike$1(ok(l1.set(key, update.entry)))
|
|
95033
|
-
});
|
|
95034
|
-
yield key;
|
|
95035
|
-
break;
|
|
95036
|
-
case "metadata":
|
|
95037
|
-
this.write({
|
|
95038
|
-
l1: cache,
|
|
95039
|
-
writeToL1: (l1) => resolvedPromiseLike$1(ok(l1.setMetadata(key, update.metadata)))
|
|
95040
|
-
});
|
|
95041
|
-
yield key;
|
|
95042
|
-
break;
|
|
95043
|
-
}
|
|
95044
|
-
}
|
|
95045
|
-
}
|
|
95046
|
-
}
|
|
95047
|
-
function buildInMemoryCacheInclusionPolicyService(cache) {
|
|
95048
|
-
return {
|
|
95049
|
-
service: new InMemoryCacheInclusionPolicy({ cache }),
|
|
95050
|
-
type: "cacheInclusionPolicy",
|
|
95051
|
-
version: "1.0"
|
|
95052
|
-
};
|
|
95053
|
-
}
|
|
95054
|
-
|
|
95055
95037
|
/*!
|
|
95056
95038
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
95057
95039
|
* All rights reserved.
|
|
@@ -95090,7 +95072,7 @@
|
|
|
95090
95072
|
};
|
|
95091
95073
|
};
|
|
95092
95074
|
}
|
|
95093
|
-
function buildServiceDescriptor$
|
|
95075
|
+
function buildServiceDescriptor$4(instrumentation) {
|
|
95094
95076
|
return {
|
|
95095
95077
|
type: "instrumentCommand",
|
|
95096
95078
|
version: "1.0",
|
|
@@ -95360,7 +95342,7 @@
|
|
|
95360
95342
|
this.metrics = new O11yOTelMetricsAPI(this.services);
|
|
95361
95343
|
}
|
|
95362
95344
|
}
|
|
95363
|
-
function buildServiceDescriptor$
|
|
95345
|
+
function buildServiceDescriptor$3(logger) {
|
|
95364
95346
|
return {
|
|
95365
95347
|
type: "instrumentation",
|
|
95366
95348
|
version: "1.0",
|
|
@@ -95378,41 +95360,41 @@
|
|
|
95378
95360
|
* All rights reserved.
|
|
95379
95361
|
* For full license text, see the LICENSE.txt file
|
|
95380
95362
|
*/
|
|
95381
|
-
function resolvedPromiseLike(result) {
|
|
95382
|
-
if (isPromiseLike(result)) {
|
|
95363
|
+
function resolvedPromiseLike$1(result) {
|
|
95364
|
+
if (isPromiseLike$1(result)) {
|
|
95383
95365
|
return result.then((nextResult) => nextResult);
|
|
95384
95366
|
}
|
|
95385
95367
|
return {
|
|
95386
95368
|
then: (onFulfilled, _onRejected) => {
|
|
95387
95369
|
try {
|
|
95388
|
-
return resolvedPromiseLike(onFulfilled(result));
|
|
95370
|
+
return resolvedPromiseLike$1(onFulfilled(result));
|
|
95389
95371
|
} catch (e) {
|
|
95390
95372
|
if (onFulfilled === void 0) {
|
|
95391
|
-
return resolvedPromiseLike(result);
|
|
95373
|
+
return resolvedPromiseLike$1(result);
|
|
95392
95374
|
}
|
|
95393
|
-
return rejectedPromiseLike(e);
|
|
95375
|
+
return rejectedPromiseLike$1(e);
|
|
95394
95376
|
}
|
|
95395
95377
|
}
|
|
95396
95378
|
};
|
|
95397
95379
|
}
|
|
95398
|
-
function rejectedPromiseLike(reason) {
|
|
95399
|
-
if (isPromiseLike(reason)) {
|
|
95380
|
+
function rejectedPromiseLike$1(reason) {
|
|
95381
|
+
if (isPromiseLike$1(reason)) {
|
|
95400
95382
|
return reason.then((nextResult) => nextResult);
|
|
95401
95383
|
}
|
|
95402
95384
|
return {
|
|
95403
95385
|
then: (_onFulfilled, onRejected) => {
|
|
95404
95386
|
if (typeof onRejected === "function") {
|
|
95405
95387
|
try {
|
|
95406
|
-
return resolvedPromiseLike(onRejected(reason));
|
|
95388
|
+
return resolvedPromiseLike$1(onRejected(reason));
|
|
95407
95389
|
} catch (e) {
|
|
95408
|
-
return rejectedPromiseLike(e);
|
|
95390
|
+
return rejectedPromiseLike$1(e);
|
|
95409
95391
|
}
|
|
95410
95392
|
}
|
|
95411
|
-
return rejectedPromiseLike(reason);
|
|
95393
|
+
return rejectedPromiseLike$1(reason);
|
|
95412
95394
|
}
|
|
95413
95395
|
};
|
|
95414
95396
|
}
|
|
95415
|
-
function isPromiseLike(x) {
|
|
95397
|
+
function isPromiseLike$1(x) {
|
|
95416
95398
|
return typeof (x == null ? void 0 : x.then) === "function";
|
|
95417
95399
|
}
|
|
95418
95400
|
const EventTypeWildcard = Symbol("EventTypeWildcard");
|
|
@@ -95442,14 +95424,14 @@
|
|
|
95442
95424
|
return;
|
|
95443
95425
|
}
|
|
95444
95426
|
const returnVal = subscription.callback.call(subscription, event);
|
|
95445
|
-
if (isPromiseLike(returnVal)) {
|
|
95427
|
+
if (isPromiseLike$1(returnVal)) {
|
|
95446
95428
|
promises.push(returnVal);
|
|
95447
95429
|
}
|
|
95448
95430
|
});
|
|
95449
95431
|
if (promises.length > 0) {
|
|
95450
95432
|
return Promise.all(promises).then(() => void 0);
|
|
95451
95433
|
}
|
|
95452
|
-
return resolvedPromiseLike(void 0);
|
|
95434
|
+
return resolvedPromiseLike$1(void 0);
|
|
95453
95435
|
}
|
|
95454
95436
|
getSubscriptions(event) {
|
|
95455
95437
|
const eventTypeSubscriptions = this.subscriptions.get(event.type);
|
|
@@ -95470,7 +95452,7 @@
|
|
|
95470
95452
|
return matchingSubscriptions;
|
|
95471
95453
|
}
|
|
95472
95454
|
}
|
|
95473
|
-
function buildServiceDescriptor$
|
|
95455
|
+
function buildServiceDescriptor$2() {
|
|
95474
95456
|
return {
|
|
95475
95457
|
type: "pubSub",
|
|
95476
95458
|
version: "1.0",
|
|
@@ -95483,7 +95465,7 @@
|
|
|
95483
95465
|
* All rights reserved.
|
|
95484
95466
|
* For full license text, see the LICENSE.txt file
|
|
95485
95467
|
*/
|
|
95486
|
-
function buildServiceDescriptor(interceptors = { request: [], response: [] }) {
|
|
95468
|
+
function buildServiceDescriptor$1(interceptors = { request: [], response: [] }) {
|
|
95487
95469
|
return {
|
|
95488
95470
|
type: "fetch",
|
|
95489
95471
|
version: "1.0",
|
|
@@ -95517,7 +95499,7 @@
|
|
|
95517
95499
|
});
|
|
95518
95500
|
};
|
|
95519
95501
|
return {
|
|
95520
|
-
...buildServiceDescriptor(),
|
|
95502
|
+
...buildServiceDescriptor$1(),
|
|
95521
95503
|
service: service,
|
|
95522
95504
|
};
|
|
95523
95505
|
}
|
|
@@ -95566,31 +95548,550 @@
|
|
|
95566
95548
|
};
|
|
95567
95549
|
}
|
|
95568
95550
|
|
|
95551
|
+
/*!
|
|
95552
|
+
* Copyright (c) 2022, Salesforce, Inc.,
|
|
95553
|
+
* All rights reserved.
|
|
95554
|
+
* For full license text, see the LICENSE.txt file
|
|
95555
|
+
*/
|
|
95556
|
+
class CacheInclusionPolicyService {
|
|
95557
|
+
}
|
|
95558
|
+
function setDifference(setA, setB) {
|
|
95559
|
+
const differenceSet = /* @__PURE__ */ new Set();
|
|
95560
|
+
for (const element of setA) {
|
|
95561
|
+
if (!setB.has(element)) {
|
|
95562
|
+
differenceSet.add(element);
|
|
95563
|
+
}
|
|
95564
|
+
}
|
|
95565
|
+
return differenceSet;
|
|
95566
|
+
}
|
|
95567
|
+
function resolvedPromiseLike(result) {
|
|
95568
|
+
if (isPromiseLike(result)) {
|
|
95569
|
+
return result.then((nextResult) => nextResult);
|
|
95570
|
+
}
|
|
95571
|
+
return {
|
|
95572
|
+
then: (onFulfilled, _onRejected) => {
|
|
95573
|
+
try {
|
|
95574
|
+
return resolvedPromiseLike(onFulfilled(result));
|
|
95575
|
+
} catch (e) {
|
|
95576
|
+
if (onFulfilled === void 0) {
|
|
95577
|
+
return resolvedPromiseLike(result);
|
|
95578
|
+
}
|
|
95579
|
+
return rejectedPromiseLike(e);
|
|
95580
|
+
}
|
|
95581
|
+
}
|
|
95582
|
+
};
|
|
95583
|
+
}
|
|
95584
|
+
function rejectedPromiseLike(reason) {
|
|
95585
|
+
if (isPromiseLike(reason)) {
|
|
95586
|
+
return reason.then((nextResult) => nextResult);
|
|
95587
|
+
}
|
|
95588
|
+
return {
|
|
95589
|
+
then: (_onFulfilled, onRejected) => {
|
|
95590
|
+
if (typeof onRejected === "function") {
|
|
95591
|
+
try {
|
|
95592
|
+
return resolvedPromiseLike(onRejected(reason));
|
|
95593
|
+
} catch (e) {
|
|
95594
|
+
return rejectedPromiseLike(e);
|
|
95595
|
+
}
|
|
95596
|
+
}
|
|
95597
|
+
return rejectedPromiseLike(reason);
|
|
95598
|
+
}
|
|
95599
|
+
};
|
|
95600
|
+
}
|
|
95601
|
+
function isPromiseLike(x) {
|
|
95602
|
+
return typeof (x == null ? void 0 : x.then) === "function";
|
|
95603
|
+
}
|
|
95604
|
+
/*!
|
|
95605
|
+
* Copyright (c) 2022, Salesforce, Inc.,
|
|
95606
|
+
* All rights reserved.
|
|
95607
|
+
* For full license text, see the LICENSE.txt file
|
|
95608
|
+
*/
|
|
95609
|
+
/*!
|
|
95610
|
+
* Copyright (c) 2022, Salesforce, Inc.,
|
|
95611
|
+
* All rights reserved.
|
|
95612
|
+
* For full license text, see the LICENSE.txt file
|
|
95613
|
+
*/
|
|
95614
|
+
const { stringify: stringify$8, parse: parse$8 } = JSON;
|
|
95615
|
+
function deepCopy(x) {
|
|
95616
|
+
const stringified = stringify$8(x);
|
|
95617
|
+
return stringified ? parse$8(stringified) : void 0;
|
|
95618
|
+
}
|
|
95619
|
+
class DefaultRecordableCache {
|
|
95620
|
+
constructor(baseCache) {
|
|
95621
|
+
this.baseCache = baseCache;
|
|
95622
|
+
this.keysRead = /* @__PURE__ */ new Set();
|
|
95623
|
+
this.missingKeysRead = /* @__PURE__ */ new Set();
|
|
95624
|
+
this.keysUpdated = /* @__PURE__ */ new Set();
|
|
95625
|
+
this.metadataKeysUpdated = /* @__PURE__ */ new Set();
|
|
95626
|
+
}
|
|
95627
|
+
delete(key) {
|
|
95628
|
+
this.keysUpdated.add(key);
|
|
95629
|
+
this.baseCache.delete(key);
|
|
95630
|
+
}
|
|
95631
|
+
get(key, options) {
|
|
95632
|
+
this.keysRead.add(key);
|
|
95633
|
+
const value = this.baseCache.get(key);
|
|
95634
|
+
if (value === void 0) {
|
|
95635
|
+
this.missingKeysRead.add(key);
|
|
95636
|
+
}
|
|
95637
|
+
if (options == null ? void 0 : options.copy) {
|
|
95638
|
+
return deepCopy(value);
|
|
95639
|
+
}
|
|
95640
|
+
return value;
|
|
95641
|
+
}
|
|
95642
|
+
set(key, value) {
|
|
95643
|
+
this.keysUpdated.add(key);
|
|
95644
|
+
this.metadataKeysUpdated.add(key);
|
|
95645
|
+
this.baseCache.set(key, value);
|
|
95646
|
+
}
|
|
95647
|
+
setMetadata(key, cacheControlMetadata) {
|
|
95648
|
+
this.metadataKeysUpdated.add(key);
|
|
95649
|
+
this.baseCache.setMetadata(key, cacheControlMetadata);
|
|
95650
|
+
}
|
|
95651
|
+
length() {
|
|
95652
|
+
return this.baseCache.length();
|
|
95653
|
+
}
|
|
95654
|
+
keys() {
|
|
95655
|
+
return this.baseCache.keys();
|
|
95656
|
+
}
|
|
95657
|
+
entries() {
|
|
95658
|
+
return this.baseCache.entries();
|
|
95659
|
+
}
|
|
95660
|
+
record() {
|
|
95661
|
+
return new DefaultRecordableCache(this);
|
|
95662
|
+
}
|
|
95663
|
+
filter(predicate) {
|
|
95664
|
+
return new DefaultFilteredCache(this, predicate);
|
|
95665
|
+
}
|
|
95666
|
+
buildFixedTimeWritableCache(generatedTime) {
|
|
95667
|
+
return new FixedTimeWritableCache(this, generatedTime);
|
|
95668
|
+
}
|
|
95669
|
+
}
|
|
95670
|
+
class DefaultFilteredCache {
|
|
95671
|
+
constructor(baseCache, predicate) {
|
|
95672
|
+
this.baseCache = baseCache;
|
|
95673
|
+
this.predicate = predicate;
|
|
95674
|
+
}
|
|
95675
|
+
delete(key) {
|
|
95676
|
+
this.baseCache.delete(key);
|
|
95677
|
+
}
|
|
95678
|
+
get(key, options) {
|
|
95679
|
+
const result = this.baseCache.get(key);
|
|
95680
|
+
if (result && this.predicate(key, result)) {
|
|
95681
|
+
if (options == null ? void 0 : options.copy) {
|
|
95682
|
+
return deepCopy(result);
|
|
95683
|
+
}
|
|
95684
|
+
return result;
|
|
95685
|
+
}
|
|
95686
|
+
return void 0;
|
|
95687
|
+
}
|
|
95688
|
+
set(key, value) {
|
|
95689
|
+
this.baseCache.set(key, value);
|
|
95690
|
+
}
|
|
95691
|
+
setMetadata(key, cacheControlMetadata) {
|
|
95692
|
+
this.baseCache.setMetadata(key, cacheControlMetadata);
|
|
95693
|
+
}
|
|
95694
|
+
length() {
|
|
95695
|
+
return this.getFilteredKeys().size;
|
|
95696
|
+
}
|
|
95697
|
+
keys() {
|
|
95698
|
+
return this.getFilteredKeys();
|
|
95699
|
+
}
|
|
95700
|
+
entries() {
|
|
95701
|
+
return this.getFilteredEntries();
|
|
95702
|
+
}
|
|
95703
|
+
record() {
|
|
95704
|
+
return new DefaultRecordableCache(this);
|
|
95705
|
+
}
|
|
95706
|
+
filter(predicate) {
|
|
95707
|
+
return new DefaultFilteredCache(this, predicate);
|
|
95708
|
+
}
|
|
95709
|
+
getFilteredEntries() {
|
|
95710
|
+
return this.baseCache.entries().filter(([key, _value]) => {
|
|
95711
|
+
return this.get(key);
|
|
95712
|
+
});
|
|
95713
|
+
}
|
|
95714
|
+
getFilteredKeys() {
|
|
95715
|
+
const filteredKeySet = /* @__PURE__ */ new Set();
|
|
95716
|
+
this.baseCache.keys().forEach((key) => {
|
|
95717
|
+
if (this.get(key)) {
|
|
95718
|
+
filteredKeySet.add(key);
|
|
95719
|
+
}
|
|
95720
|
+
});
|
|
95721
|
+
return filteredKeySet;
|
|
95722
|
+
}
|
|
95723
|
+
buildFixedTimeWritableCache(generatedTime) {
|
|
95724
|
+
return new FixedTimeWritableCache(this, generatedTime);
|
|
95725
|
+
}
|
|
95726
|
+
}
|
|
95727
|
+
class FixedTimeWritableCache {
|
|
95728
|
+
constructor(baseCache, generatedTime) {
|
|
95729
|
+
this.baseCache = baseCache;
|
|
95730
|
+
this.generatedTime = generatedTime;
|
|
95731
|
+
}
|
|
95732
|
+
delete(key) {
|
|
95733
|
+
this.baseCache.delete(key);
|
|
95734
|
+
}
|
|
95735
|
+
get(key, options) {
|
|
95736
|
+
return this.baseCache.get(key, options);
|
|
95737
|
+
}
|
|
95738
|
+
set(key, value) {
|
|
95739
|
+
this.baseCache.set(key, {
|
|
95740
|
+
...value,
|
|
95741
|
+
metadata: {
|
|
95742
|
+
...value.metadata,
|
|
95743
|
+
cacheControl: { ...value.metadata.cacheControl, generatedTime: this.generatedTime }
|
|
95744
|
+
}
|
|
95745
|
+
});
|
|
95746
|
+
}
|
|
95747
|
+
setMetadata(key, cacheControlMetadata) {
|
|
95748
|
+
this.baseCache.setMetadata(key, {
|
|
95749
|
+
...cacheControlMetadata,
|
|
95750
|
+
generatedTime: this.generatedTime
|
|
95751
|
+
});
|
|
95752
|
+
}
|
|
95753
|
+
length() {
|
|
95754
|
+
return this.baseCache.length();
|
|
95755
|
+
}
|
|
95756
|
+
keys() {
|
|
95757
|
+
return this.baseCache.keys();
|
|
95758
|
+
}
|
|
95759
|
+
entries() {
|
|
95760
|
+
return this.baseCache.entries();
|
|
95761
|
+
}
|
|
95762
|
+
record() {
|
|
95763
|
+
return new DefaultRecordableCache(this);
|
|
95764
|
+
}
|
|
95765
|
+
filter(predicate) {
|
|
95766
|
+
return new DefaultFilteredCache(this, predicate);
|
|
95767
|
+
}
|
|
95768
|
+
buildFixedTimeWritableCache(generatedTime) {
|
|
95769
|
+
return new FixedTimeWritableCache(this, generatedTime);
|
|
95770
|
+
}
|
|
95771
|
+
}
|
|
95772
|
+
class DefaultCache {
|
|
95773
|
+
constructor() {
|
|
95774
|
+
this.data = {};
|
|
95775
|
+
}
|
|
95776
|
+
get(key, options) {
|
|
95777
|
+
if (options == null ? void 0 : options.copy) {
|
|
95778
|
+
return deepCopy(this.data[key]);
|
|
95779
|
+
}
|
|
95780
|
+
return this.data[key];
|
|
95781
|
+
}
|
|
95782
|
+
/**
|
|
95783
|
+
* Adds the specified key/value to the cache.
|
|
95784
|
+
*
|
|
95785
|
+
* @param key key at which to store value
|
|
95786
|
+
* @param entry value to be stored
|
|
95787
|
+
*/
|
|
95788
|
+
set(key, entry) {
|
|
95789
|
+
if (entry.metadata.cacheControl.type === "no-store") {
|
|
95790
|
+
return;
|
|
95791
|
+
}
|
|
95792
|
+
this.data[key] = {
|
|
95793
|
+
...entry,
|
|
95794
|
+
metadata: {
|
|
95795
|
+
...entry.metadata,
|
|
95796
|
+
type: entry.metadata.type || {
|
|
95797
|
+
namespace: "OneStore:Internal",
|
|
95798
|
+
name: "UnknownType"
|
|
95799
|
+
},
|
|
95800
|
+
cacheControl: {
|
|
95801
|
+
generatedTime: Date.now() / 1e3,
|
|
95802
|
+
...entry.metadata.cacheControl
|
|
95803
|
+
}
|
|
95804
|
+
}
|
|
95805
|
+
};
|
|
95806
|
+
}
|
|
95807
|
+
/**
|
|
95808
|
+
* Removes the cache entry associated with the specified key.
|
|
95809
|
+
*
|
|
95810
|
+
* @param key key to be removed from the store
|
|
95811
|
+
*/
|
|
95812
|
+
delete(key) {
|
|
95813
|
+
delete this.data[key];
|
|
95814
|
+
}
|
|
95815
|
+
/**
|
|
95816
|
+
* Sets the metadata for the specified key if the key is in cache.
|
|
95817
|
+
* If the key doesn't exist, it does nothing.
|
|
95818
|
+
*
|
|
95819
|
+
* @param key key at which to store metadata
|
|
95820
|
+
* @param cacheControlMetadata metadata to be stored
|
|
95821
|
+
*/
|
|
95822
|
+
setMetadata(key, cacheControlMetadata) {
|
|
95823
|
+
if (key in this.data) {
|
|
95824
|
+
this.data[key].metadata.cacheControl = {
|
|
95825
|
+
generatedTime: Date.now() / 1e3,
|
|
95826
|
+
...cacheControlMetadata
|
|
95827
|
+
};
|
|
95828
|
+
}
|
|
95829
|
+
}
|
|
95830
|
+
length() {
|
|
95831
|
+
return this.keys().size;
|
|
95832
|
+
}
|
|
95833
|
+
keys() {
|
|
95834
|
+
return new Set(Object.keys(this.data));
|
|
95835
|
+
}
|
|
95836
|
+
entries() {
|
|
95837
|
+
return Object.entries(this.data);
|
|
95838
|
+
}
|
|
95839
|
+
record() {
|
|
95840
|
+
return new DefaultRecordableCache(this);
|
|
95841
|
+
}
|
|
95842
|
+
filter(predicate) {
|
|
95843
|
+
return new DefaultFilteredCache(this, predicate);
|
|
95844
|
+
}
|
|
95845
|
+
buildFixedTimeWritableCache(generatedTime) {
|
|
95846
|
+
return new FixedTimeWritableCache(this, generatedTime);
|
|
95847
|
+
}
|
|
95848
|
+
}
|
|
95849
|
+
function buildServiceDescriptor() {
|
|
95850
|
+
return {
|
|
95851
|
+
type: "cache",
|
|
95852
|
+
version: "1.0",
|
|
95853
|
+
service: new DefaultCache()
|
|
95854
|
+
};
|
|
95855
|
+
}
|
|
95856
|
+
class DurableCacheInclusionPolicy extends CacheInclusionPolicyService {
|
|
95857
|
+
/**
|
|
95858
|
+
* Reads data out of a 2 level inclusive store.
|
|
95859
|
+
*/
|
|
95860
|
+
read(options) {
|
|
95861
|
+
const { l1, readFromL1, alreadyRevivedKeys } = options;
|
|
95862
|
+
const recordableCache = l1.record();
|
|
95863
|
+
return readFromL1(recordableCache).then((readResult) => {
|
|
95864
|
+
if (readResult.isOk()) {
|
|
95865
|
+
return readResult;
|
|
95866
|
+
}
|
|
95867
|
+
const keysToRevive = recordableCache.keysRead;
|
|
95868
|
+
if (alreadyRevivedKeys && setDifference(keysToRevive, alreadyRevivedKeys).size === 0) {
|
|
95869
|
+
return readResult;
|
|
95870
|
+
}
|
|
95871
|
+
return this.revive(keysToRevive, l1).then((revivedKeys) => {
|
|
95872
|
+
if (setDifference(keysToRevive, revivedKeys).size > 0) {
|
|
95873
|
+
return readResult;
|
|
95874
|
+
}
|
|
95875
|
+
return this.read({ l1, readFromL1, alreadyRevivedKeys: revivedKeys });
|
|
95876
|
+
});
|
|
95877
|
+
});
|
|
95878
|
+
}
|
|
95879
|
+
/**
|
|
95880
|
+
* Writes data to a 2 level inclusive store.
|
|
95881
|
+
*/
|
|
95882
|
+
write(options) {
|
|
95883
|
+
const { l1, writeToL1 } = options;
|
|
95884
|
+
const tempL1 = buildServiceDescriptor().service.record();
|
|
95885
|
+
return writeToL1(tempL1).then(() => {
|
|
95886
|
+
const keysToReviveRecordableCache = l1.record();
|
|
95887
|
+
tempL1.keysUpdated.forEach((key) => keysToReviveRecordableCache.get(key));
|
|
95888
|
+
tempL1.missingKeysRead.forEach((key) => keysToReviveRecordableCache.get(key));
|
|
95889
|
+
const missingKeys = keysToReviveRecordableCache.missingKeysRead;
|
|
95890
|
+
const revivePromiseLike = missingKeys.size > 0 ? this.revive(missingKeys, l1).then(() => void 0) : resolvedPromiseLike(void 0);
|
|
95891
|
+
return revivePromiseLike.then(() => {
|
|
95892
|
+
const recordableCache = l1.record();
|
|
95893
|
+
return writeToL1(recordableCache).then((result) => {
|
|
95894
|
+
this.syncToL2Cache(recordableCache.keysUpdated, l1);
|
|
95895
|
+
return result;
|
|
95896
|
+
});
|
|
95897
|
+
});
|
|
95898
|
+
});
|
|
95899
|
+
}
|
|
95900
|
+
}
|
|
95901
|
+
|
|
95902
|
+
class NimbusDurableCacheInclusionPolicy extends DurableCacheInclusionPolicy {
|
|
95903
|
+
constructor(services, store) {
|
|
95904
|
+
super();
|
|
95905
|
+
this.services = services;
|
|
95906
|
+
this.store = store;
|
|
95907
|
+
this.registerListener();
|
|
95908
|
+
}
|
|
95909
|
+
revive(keys, l1) {
|
|
95910
|
+
if (keys.size === 0)
|
|
95911
|
+
return Promise.resolve(new Set());
|
|
95912
|
+
return this.store.getEntries(keys).then((entries) => {
|
|
95913
|
+
const keysRevived = new Set();
|
|
95914
|
+
if (!entries)
|
|
95915
|
+
return keysRevived;
|
|
95916
|
+
entries.forEach(({ key, entry }) => {
|
|
95917
|
+
l1.set(key, entry);
|
|
95918
|
+
keysRevived.add(key);
|
|
95919
|
+
});
|
|
95920
|
+
return keysRevived;
|
|
95921
|
+
});
|
|
95922
|
+
}
|
|
95923
|
+
syncToL2Cache(changedKeys, l1) {
|
|
95924
|
+
if (changedKeys.size === 0)
|
|
95925
|
+
return Promise.resolve();
|
|
95926
|
+
const entries = [];
|
|
95927
|
+
for (const key of changedKeys) {
|
|
95928
|
+
const entry = l1.get(key);
|
|
95929
|
+
if (entry) {
|
|
95930
|
+
entries.push({ key, entry });
|
|
95931
|
+
}
|
|
95932
|
+
}
|
|
95933
|
+
return entries.length > 0 ? this.store.setEntries(entries) : Promise.resolve();
|
|
95934
|
+
}
|
|
95935
|
+
find(_query) {
|
|
95936
|
+
throw new Error('find not supported on the NimbusDurableCacheInclusionPolicy');
|
|
95937
|
+
}
|
|
95938
|
+
findAndModify(_query, _cacheUpdate) {
|
|
95939
|
+
throw new Error('findAndModify not supported on the NimbusDurableCacheInclusionPolicy');
|
|
95940
|
+
}
|
|
95941
|
+
registerListener() {
|
|
95942
|
+
this.store.registerOnChangedListener(async (changes) => {
|
|
95943
|
+
changes.forEach((change) => {
|
|
95944
|
+
const upsertKeys = new Set();
|
|
95945
|
+
const evictKeys = new Set();
|
|
95946
|
+
for (const key of change.keys) {
|
|
95947
|
+
if (change.type === 'upsert') {
|
|
95948
|
+
upsertKeys.add(key);
|
|
95949
|
+
}
|
|
95950
|
+
else {
|
|
95951
|
+
evictKeys.add(key);
|
|
95952
|
+
}
|
|
95953
|
+
}
|
|
95954
|
+
if (upsertKeys.size > 0) {
|
|
95955
|
+
this.store.getEntries(upsertKeys).then((entries) => {
|
|
95956
|
+
if (entries === undefined)
|
|
95957
|
+
return;
|
|
95958
|
+
entries.forEach(({ key, entry }) => {
|
|
95959
|
+
this.services.cache.set(key, entry);
|
|
95960
|
+
return resolvedPromiseLike$3(ok$1(undefined));
|
|
95961
|
+
});
|
|
95962
|
+
});
|
|
95963
|
+
}
|
|
95964
|
+
// TODO: onestore doesnt support cache eviction yet
|
|
95965
|
+
// if (evictKeys.size > 0) {
|
|
95966
|
+
// evictKeys.forEach((key) => {
|
|
95967
|
+
// this.services.cache.evict(key);
|
|
95968
|
+
// });
|
|
95969
|
+
// }
|
|
95970
|
+
});
|
|
95971
|
+
});
|
|
95972
|
+
}
|
|
95973
|
+
}
|
|
95974
|
+
function buildNimbusDurableCacheInclusionPolicyService(cache, store) {
|
|
95975
|
+
return {
|
|
95976
|
+
service: new NimbusDurableCacheInclusionPolicy({ cache }, store),
|
|
95977
|
+
type: 'cacheInclusionPolicy',
|
|
95978
|
+
version: '1.0',
|
|
95979
|
+
};
|
|
95980
|
+
}
|
|
95981
|
+
|
|
95982
|
+
const TABLE_NAME = 'lds_one_store_data';
|
|
95983
|
+
class NimbusSqliteOneStoreCache {
|
|
95984
|
+
constructor(sqlStore) {
|
|
95985
|
+
this.sqlStore = sqlStore;
|
|
95986
|
+
}
|
|
95987
|
+
async getEntry(key) {
|
|
95988
|
+
const result = await this.query(`SELECT key, data, metadata FROM ${TABLE_NAME} WHERE key = ?`, [key]);
|
|
95989
|
+
if (result.rows.length === 0)
|
|
95990
|
+
return undefined;
|
|
95991
|
+
const [_key, data, metadata] = result.rows[0];
|
|
95992
|
+
return {
|
|
95993
|
+
key,
|
|
95994
|
+
entry: {
|
|
95995
|
+
value: JSON.parse(data),
|
|
95996
|
+
metadata: metadata ? JSON.parse(metadata) : undefined,
|
|
95997
|
+
},
|
|
95998
|
+
};
|
|
95999
|
+
}
|
|
96000
|
+
async getEntries(keys) {
|
|
96001
|
+
if (keys.size === 0)
|
|
96002
|
+
return undefined;
|
|
96003
|
+
const placeholders = Array(keys.size).fill('?').join(', ');
|
|
96004
|
+
const result = await this.query(`SELECT key, data, metadata FROM ${TABLE_NAME} WHERE key IN (${placeholders})`, [...keys]);
|
|
96005
|
+
if (result.rows.length === 0)
|
|
96006
|
+
return undefined;
|
|
96007
|
+
return result.rows.map((row) => {
|
|
96008
|
+
const [key, data, metadata] = row;
|
|
96009
|
+
return {
|
|
96010
|
+
key: key,
|
|
96011
|
+
entry: {
|
|
96012
|
+
value: JSON.parse(data),
|
|
96013
|
+
metadata: metadata ? JSON.parse(metadata) : undefined,
|
|
96014
|
+
},
|
|
96015
|
+
};
|
|
96016
|
+
});
|
|
96017
|
+
}
|
|
96018
|
+
async setEntry(key, entry) {
|
|
96019
|
+
return this.setEntries([{ key, entry }]);
|
|
96020
|
+
}
|
|
96021
|
+
async setEntries(entries) {
|
|
96022
|
+
if (entries.length === 0)
|
|
96023
|
+
return;
|
|
96024
|
+
const rows = entries.map(({ key, entry: { value, metadata } }) => [
|
|
96025
|
+
key,
|
|
96026
|
+
JSON.stringify(value),
|
|
96027
|
+
JSON.stringify(metadata),
|
|
96028
|
+
]);
|
|
96029
|
+
const operation = {
|
|
96030
|
+
type: 'upsert',
|
|
96031
|
+
table: TABLE_NAME,
|
|
96032
|
+
keyColumn: 'key',
|
|
96033
|
+
conflictColumns: ['key'],
|
|
96034
|
+
columns: ['key', 'data', 'metadata'],
|
|
96035
|
+
rows,
|
|
96036
|
+
context: {},
|
|
96037
|
+
};
|
|
96038
|
+
return this.batchQuery([operation]);
|
|
96039
|
+
}
|
|
96040
|
+
registerOnChangedListener(listener) {
|
|
96041
|
+
let unsubscribeId = undefined;
|
|
96042
|
+
this.sqlStore
|
|
96043
|
+
.registerOnChangedListener((changes) => {
|
|
96044
|
+
const onestoreChanges = changes.filter((change) => change.table === TABLE_NAME);
|
|
96045
|
+
return listener(onestoreChanges);
|
|
96046
|
+
})
|
|
96047
|
+
.then((id) => {
|
|
96048
|
+
unsubscribeId = id;
|
|
96049
|
+
});
|
|
96050
|
+
return () => {
|
|
96051
|
+
if (unsubscribeId === undefined)
|
|
96052
|
+
return Promise.resolve();
|
|
96053
|
+
return this.sqlStore.unsubscribeOnChangedListener(unsubscribeId);
|
|
96054
|
+
};
|
|
96055
|
+
}
|
|
96056
|
+
batchQuery(operations) {
|
|
96057
|
+
return new Promise((resolve, reject) => {
|
|
96058
|
+
this.sqlStore.batchOperations(operations, (error) => {
|
|
96059
|
+
error ? reject(error) : resolve();
|
|
96060
|
+
});
|
|
96061
|
+
});
|
|
96062
|
+
}
|
|
96063
|
+
query(sql, params) {
|
|
96064
|
+
return new Promise((resolve, reject) => {
|
|
96065
|
+
this.sqlStore.query(sql, params, resolve, reject);
|
|
96066
|
+
});
|
|
96067
|
+
}
|
|
96068
|
+
}
|
|
96069
|
+
|
|
95569
96070
|
// TODO[@W-18753648]: These services depend on WebApis that aren't available in the worker.
|
|
95570
96071
|
// import { buildServiceDescriptor as buildNdJsonServiceDescriptor } from '@luvio/command-ndjson/v1';
|
|
95571
96072
|
// import { buildServiceDescriptor as buildStreamingCommandServiceDescriptor } from '@luvio/command-streaming/v1';
|
|
95572
96073
|
// import { buildServiceDescriptor as buildSseCommandServiceDescriptor } from '@luvio/command-sse/v1';
|
|
95573
|
-
function initializeOneStore() {
|
|
96074
|
+
function initializeOneStore(sqliteStore) {
|
|
95574
96075
|
if (!useOneStore.isOpen({ fallback: true })) {
|
|
95575
96076
|
return;
|
|
95576
96077
|
}
|
|
95577
96078
|
const loggerService = new ConsoleLogger('ERROR');
|
|
95578
|
-
const cacheServiceDescriptor = buildServiceDescriptor$
|
|
95579
|
-
const instrumentationServiceDescriptor = buildServiceDescriptor$
|
|
95580
|
-
const
|
|
96079
|
+
const cacheServiceDescriptor = buildServiceDescriptor$6();
|
|
96080
|
+
const instrumentationServiceDescriptor = buildServiceDescriptor$3(loggerService);
|
|
96081
|
+
const nimbusSqliteOneStoreCacheServiceDescriptor = buildNimbusDurableCacheInclusionPolicyService(cacheServiceDescriptor.service, new NimbusSqliteOneStoreCache(sqliteStore));
|
|
95581
96082
|
const services = [
|
|
95582
96083
|
instrumentationServiceDescriptor,
|
|
95583
96084
|
buildNimbusFetchServiceDescriptor(),
|
|
95584
|
-
buildServiceDescriptor$
|
|
96085
|
+
buildServiceDescriptor$4(instrumentationServiceDescriptor.service),
|
|
95585
96086
|
// NOTE: These do not directly depend on Aura, and are necessary for HTTP fallback support.
|
|
96087
|
+
buildServiceDescriptor$b(),
|
|
95586
96088
|
buildServiceDescriptor$a(),
|
|
95587
96089
|
buildServiceDescriptor$9(),
|
|
96090
|
+
buildServiceDescriptor$5(cacheServiceDescriptor.service, nimbusSqliteOneStoreCacheServiceDescriptor.service),
|
|
95588
96091
|
buildServiceDescriptor$8(),
|
|
95589
|
-
buildServiceDescriptor$
|
|
96092
|
+
buildServiceDescriptor$c(),
|
|
95590
96093
|
buildServiceDescriptor$7(),
|
|
95591
|
-
buildServiceDescriptor$
|
|
95592
|
-
buildServiceDescriptor$6(),
|
|
95593
|
-
buildServiceDescriptor$1(),
|
|
96094
|
+
buildServiceDescriptor$2(),
|
|
95594
96095
|
// TODO[@W-18753648]: See note above.
|
|
95595
96096
|
// buildStreamingCommandServiceDescriptor(),
|
|
95596
96097
|
// buildNdJsonServiceDescriptor(),
|
|
@@ -95769,7 +96270,7 @@
|
|
|
95769
96270
|
withRegistration('@salesforce/lds-adapters-uiapi/graphql', configureUIAPIGraphQL);
|
|
95770
96271
|
}
|
|
95771
96272
|
// onestore initialization
|
|
95772
|
-
initializeOneStore();
|
|
96273
|
+
initializeOneStore(lazyDurableStore['plugin']);
|
|
95773
96274
|
return {
|
|
95774
96275
|
luvio: lazyLuvio,
|
|
95775
96276
|
internalLuvio: lazyInternalLuvio,
|
|
@@ -95801,7 +96302,7 @@
|
|
|
95801
96302
|
id: '@salesforce/lds-network-adapter',
|
|
95802
96303
|
instrument: instrument$2,
|
|
95803
96304
|
});
|
|
95804
|
-
// version: 1.
|
|
96305
|
+
// version: 1.370.0-3ec6ffba72
|
|
95805
96306
|
|
|
95806
96307
|
const { create: create$2, keys: keys$2 } = Object;
|
|
95807
96308
|
const { stringify, parse } = JSON;
|
|
@@ -96455,6 +96956,267 @@
|
|
|
96455
96956
|
}
|
|
96456
96957
|
const keyPrefix$1 = 'UiApi';
|
|
96457
96958
|
|
|
96959
|
+
/**
|
|
96960
|
+
* Defines configuration for the module with a default value which can be overridden by the runtime environment.
|
|
96961
|
+
*/
|
|
96962
|
+
// A holder for a configurable adapter override
|
|
96963
|
+
let Configurable$1 = class Configurable {
|
|
96964
|
+
constructor() {
|
|
96965
|
+
this.getAdapter = () => {
|
|
96966
|
+
return this.adapter;
|
|
96967
|
+
};
|
|
96968
|
+
this.setAdapter = (value) => {
|
|
96969
|
+
this.adapter = value;
|
|
96970
|
+
};
|
|
96971
|
+
this.adapter = undefined;
|
|
96972
|
+
}
|
|
96973
|
+
};
|
|
96974
|
+
// Configurable adapters that can have environmental overrides
|
|
96975
|
+
let configurableCreateRecordAdapter$1 = new Configurable$1();
|
|
96976
|
+
let configurableUpdateRecordAdapter$1 = new Configurable$1();
|
|
96977
|
+
let configurableDeleteRecordAdapter$1 = new Configurable$1();
|
|
96978
|
+
let configurablePerformQuickActionAdapter$1 = new Configurable$1();
|
|
96979
|
+
let configurablePerformUpdateRecordQuickActionAdapter$1 = new Configurable$1();
|
|
96980
|
+
let configurableCreateContentDocumentAndVersion$1 = new Configurable$1();
|
|
96981
|
+
let configurableCreateContentVersion$1 = new Configurable$1();
|
|
96982
|
+
/**
|
|
96983
|
+
* Depth to which tracked fields will be added to a request that results from a cache miss.
|
|
96984
|
+
* A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
|
|
96985
|
+
* be reached by following 1 relationship from the root record, etc.
|
|
96986
|
+
* @defaultValue '5', replicates the current behavior
|
|
96987
|
+
*/
|
|
96988
|
+
let trackedFieldDepthOnCacheMiss$1 = 5;
|
|
96989
|
+
/**
|
|
96990
|
+
* Depth to which tracked fields will be added to a request that results from a merge conflict
|
|
96991
|
+
* A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
|
|
96992
|
+
* be reached by following 1 relationship from the root record, etc.
|
|
96993
|
+
* @defaultValue '5', replicates the current behavior
|
|
96994
|
+
*/
|
|
96995
|
+
let trackedFieldDepthOnCacheMergeConflict$1 = 5;
|
|
96996
|
+
/**
|
|
96997
|
+
* Depth to which tracked fields will be added to a request that results from a notify change invocation by the consumer
|
|
96998
|
+
* A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
|
|
96999
|
+
* be reached by following 1 relationship from the root record, etc.
|
|
97000
|
+
* @defaultValue '5', replicates the current behavior
|
|
97001
|
+
*/
|
|
97002
|
+
let trackedFieldDepthOnNotifyChange$1 = 5;
|
|
97003
|
+
/**
|
|
97004
|
+
* Determines if we will only fetch the 'Id' field for the leaf relationship record
|
|
97005
|
+
* @defaultValue 'false', replicates the current behavior and fetches all fields in the store for the leaf relationship record
|
|
97006
|
+
*/
|
|
97007
|
+
let trackedFieldLeafNodeIdAndNameOnly$1 = false;
|
|
97008
|
+
/**
|
|
97009
|
+
* One store enabled Get Object Info adapter
|
|
97010
|
+
*/
|
|
97011
|
+
let oneStoreGetObjectInfoAdapter$1 = undefined;
|
|
97012
|
+
/**
|
|
97013
|
+
* One store enabled Get Object Infos adapter
|
|
97014
|
+
*/
|
|
97015
|
+
let oneStoreGetObjectInfosAdapter$1 = undefined;
|
|
97016
|
+
/**
|
|
97017
|
+
* One store enabled GraphQL adapter
|
|
97018
|
+
*/
|
|
97019
|
+
let oneStoreGraphQLWireAdapter$1 = undefined;
|
|
97020
|
+
/**
|
|
97021
|
+
* One store enabled GraphQL imperative query adapter
|
|
97022
|
+
*/
|
|
97023
|
+
let oneStoreGraphQLImperativeQueryAdapter$1 = undefined;
|
|
97024
|
+
/**
|
|
97025
|
+
* Determines when to include PDL strategies for Related Lists
|
|
97026
|
+
*/
|
|
97027
|
+
let relatedListsPredictionsEnabled$1 = false;
|
|
97028
|
+
/**
|
|
97029
|
+
* Determines whether to include additional PDL strategies for Related Lists
|
|
97030
|
+
*/
|
|
97031
|
+
let relatedListsPlusPredictionsEnabled$1 = false;
|
|
97032
|
+
let recordRepresentationIngestionOverride$1 = undefined;
|
|
97033
|
+
/**
|
|
97034
|
+
* Defines the configuration API and is exposed internally as well as externally.
|
|
97035
|
+
* Configuration for one store enabled REST adapters only.
|
|
97036
|
+
*/
|
|
97037
|
+
const configurationForOneStoreEnabledAdapters$1 = {
|
|
97038
|
+
setGetObjectInfoAdapter: function (adapter) {
|
|
97039
|
+
oneStoreGetObjectInfoAdapter$1 = adapter;
|
|
97040
|
+
},
|
|
97041
|
+
getGetObjectInfoAdapter: function () {
|
|
97042
|
+
return oneStoreGetObjectInfoAdapter$1;
|
|
97043
|
+
},
|
|
97044
|
+
setGetObjectInfosAdapter: function (adapter) {
|
|
97045
|
+
oneStoreGetObjectInfosAdapter$1 = adapter;
|
|
97046
|
+
},
|
|
97047
|
+
getGetObjectInfosAdapter: function () {
|
|
97048
|
+
return oneStoreGetObjectInfosAdapter$1;
|
|
97049
|
+
},
|
|
97050
|
+
setGraphQLWireAdapter: function (adapter) {
|
|
97051
|
+
oneStoreGraphQLWireAdapter$1 = adapter;
|
|
97052
|
+
},
|
|
97053
|
+
getGraphQLWireAdapter: function () {
|
|
97054
|
+
return oneStoreGraphQLWireAdapter$1;
|
|
97055
|
+
},
|
|
97056
|
+
setGraphQLImperativeQueryAdapter: function (adapter) {
|
|
97057
|
+
oneStoreGraphQLImperativeQueryAdapter$1 = adapter;
|
|
97058
|
+
},
|
|
97059
|
+
getGraphQLImperativeQueryAdapter: function () {
|
|
97060
|
+
return oneStoreGraphQLImperativeQueryAdapter$1;
|
|
97061
|
+
},
|
|
97062
|
+
};
|
|
97063
|
+
/**
|
|
97064
|
+
* Helper function to return the one store adapter if it's defined, otherwise return the luvio adapter.
|
|
97065
|
+
* @param luvioAdapter - The luvio bound adapter.
|
|
97066
|
+
* @param oneStoreAdapter - The one store bound adapter.
|
|
97067
|
+
* @returns Luvio or one store wire adapter constructor.
|
|
97068
|
+
*/
|
|
97069
|
+
function getLuvioOrOneStoreAdapter(luvioAdapter, oneStoreAdapter) {
|
|
97070
|
+
return oneStoreAdapter ?? luvioAdapter;
|
|
97071
|
+
}
|
|
97072
|
+
const getKeywordSearchResultsFactory$1 = new Configurable$1();
|
|
97073
|
+
const getListRecordsByNameFactory$1 = new Configurable$1();
|
|
97074
|
+
const getListUiFactory$1 = new Configurable$1();
|
|
97075
|
+
const getLookupRecordsFactory$1 = new Configurable$1();
|
|
97076
|
+
const getQuickActionDefaultsFactory$1 = new Configurable$1();
|
|
97077
|
+
const getRecordCreateDefaultsFactory$1 = new Configurable$1();
|
|
97078
|
+
const getRecordTemplateCloneFactory$1 = new Configurable$1();
|
|
97079
|
+
const getRecordTemplateCreateFactory$1 = new Configurable$1();
|
|
97080
|
+
const getRecordUiFactory$1 = new Configurable$1();
|
|
97081
|
+
const getRecordFactory$1 = new Configurable$1();
|
|
97082
|
+
const getRecordsFactory$1 = new Configurable$1();
|
|
97083
|
+
const getRelatedListRecordsFactory$1 = new Configurable$1();
|
|
97084
|
+
const getRelatedListRecordsBatchFactory$1 = new Configurable$1();
|
|
97085
|
+
const getSearchResultsFactory$1 = new Configurable$1();
|
|
97086
|
+
// The following set of adapters all touch RecordRepresentation directly or indirectly,
|
|
97087
|
+
// so they need to support having a custom factory provided by the mobile environment.
|
|
97088
|
+
const configurationForEnvironmentFactoryOverrides$1 = {
|
|
97089
|
+
getKeywordSearchResultsAdapterFactory: getKeywordSearchResultsFactory$1.getAdapter,
|
|
97090
|
+
setGetKeywordSearchResultsAdapterFactory: getKeywordSearchResultsFactory$1.setAdapter,
|
|
97091
|
+
getListRecordsByNameAdapterFactory: getListRecordsByNameFactory$1.getAdapter,
|
|
97092
|
+
setGetListRecordsByNameAdapterFactory: getListRecordsByNameFactory$1.setAdapter,
|
|
97093
|
+
getListUiAdapterFactory: getListUiFactory$1.getAdapter,
|
|
97094
|
+
setGetListUiAdapterFactory: getListUiFactory$1.setAdapter,
|
|
97095
|
+
getLookupRecordsAdapterFactory: getLookupRecordsFactory$1.getAdapter,
|
|
97096
|
+
setGetLookupRecordsAdapterFactory: getLookupRecordsFactory$1.setAdapter,
|
|
97097
|
+
getQuickActionDefaultsAdapterFactory: getQuickActionDefaultsFactory$1.getAdapter,
|
|
97098
|
+
setGetQuickActionDefaultsAdapterFactory: getQuickActionDefaultsFactory$1.setAdapter,
|
|
97099
|
+
getRecordCreateDefaultsAdapterFactory: getRecordCreateDefaultsFactory$1.getAdapter,
|
|
97100
|
+
setGetRecordCreateDefaultsAdapterFactory: getRecordCreateDefaultsFactory$1.setAdapter,
|
|
97101
|
+
getRecordTemplateCloneAdapterFactory: getRecordTemplateCloneFactory$1.getAdapter,
|
|
97102
|
+
setGetRecordTemplateCloneAdapterFactory: getRecordTemplateCloneFactory$1.setAdapter,
|
|
97103
|
+
getRecordTemplateCreateAdapterFactory: getRecordTemplateCreateFactory$1.getAdapter,
|
|
97104
|
+
setGetRecordTemplateCreateAdapterFactory: getRecordTemplateCreateFactory$1.setAdapter,
|
|
97105
|
+
getRecordUiAdapterFactory: getRecordUiFactory$1.getAdapter,
|
|
97106
|
+
setGetRecordUiAdapterFactory: getRecordUiFactory$1.setAdapter,
|
|
97107
|
+
getRecordAdapterFactory: getRecordFactory$1.getAdapter,
|
|
97108
|
+
setGetRecordAdapterFactory: getRecordFactory$1.setAdapter,
|
|
97109
|
+
getRecordsAdapterFactory: getRecordsFactory$1.getAdapter,
|
|
97110
|
+
setGetRecordsAdapterFactory: getRecordsFactory$1.setAdapter,
|
|
97111
|
+
getRelatedListRecordsAdapterFactory: getRelatedListRecordsFactory$1.getAdapter,
|
|
97112
|
+
setGetRelatedListRecordsAdapterFactory: getRelatedListRecordsFactory$1.setAdapter,
|
|
97113
|
+
getRelatedListRecordsBatchAdapterFactory: getRelatedListRecordsBatchFactory$1.getAdapter,
|
|
97114
|
+
setGetRelatedListRecordsBatchAdapterFactory: getRelatedListRecordsBatchFactory$1.setAdapter,
|
|
97115
|
+
getSearchResultsAdapterFactory: getSearchResultsFactory$1.getAdapter,
|
|
97116
|
+
setGetSearchResultsAdapterFactory: getSearchResultsFactory$1.setAdapter,
|
|
97117
|
+
};
|
|
97118
|
+
/**
|
|
97119
|
+
* Defines the configuration API and is exposed internally as well as externally.
|
|
97120
|
+
* Configuration for REST adapters only.
|
|
97121
|
+
*/
|
|
97122
|
+
const configurationForRestAdapters$1 = {
|
|
97123
|
+
setTrackedFieldDepthOnCacheMiss: function (trackedFieldDepthOnCacheMissParam) {
|
|
97124
|
+
trackedFieldDepthOnCacheMiss$1 = trackedFieldDepthOnCacheMissParam;
|
|
97125
|
+
},
|
|
97126
|
+
getTrackedFieldDepthOnCacheMiss: function () {
|
|
97127
|
+
return trackedFieldDepthOnCacheMiss$1;
|
|
97128
|
+
},
|
|
97129
|
+
setTrackedFieldDepthOnCacheMergeConflict: function (trackedFieldDepthOnCacheMergeConflictParam) {
|
|
97130
|
+
trackedFieldDepthOnCacheMergeConflict$1 = trackedFieldDepthOnCacheMergeConflictParam;
|
|
97131
|
+
},
|
|
97132
|
+
getTrackedFieldDepthOnCacheMergeConflict: function () {
|
|
97133
|
+
return trackedFieldDepthOnCacheMergeConflict$1;
|
|
97134
|
+
},
|
|
97135
|
+
setTrackedFieldDepthOnNotifyChange: function (trackedFieldDepthOnNotifyChangeParam) {
|
|
97136
|
+
trackedFieldDepthOnNotifyChange$1 = trackedFieldDepthOnNotifyChangeParam;
|
|
97137
|
+
},
|
|
97138
|
+
getTrackedFieldDepthOnNotifyChange: function () {
|
|
97139
|
+
return trackedFieldDepthOnNotifyChange$1;
|
|
97140
|
+
},
|
|
97141
|
+
setTrackedFieldLeafNodeIdAndNameOnly: function (trackedFieldLeafNodeIdAndNameOnlyParam) {
|
|
97142
|
+
trackedFieldLeafNodeIdAndNameOnly$1 = trackedFieldLeafNodeIdAndNameOnlyParam;
|
|
97143
|
+
},
|
|
97144
|
+
getTrackedFieldLeafNodeIdAndNameOnly: function () {
|
|
97145
|
+
return trackedFieldLeafNodeIdAndNameOnly$1;
|
|
97146
|
+
},
|
|
97147
|
+
setRelatedListsPredictionsEnabled: function (f) {
|
|
97148
|
+
relatedListsPredictionsEnabled$1 = f;
|
|
97149
|
+
},
|
|
97150
|
+
areRelatedListsPredictionsEnabled: function () {
|
|
97151
|
+
return relatedListsPredictionsEnabled$1 === true;
|
|
97152
|
+
},
|
|
97153
|
+
setRelatedListsPlusPredictionsEnabled: function (f) {
|
|
97154
|
+
relatedListsPlusPredictionsEnabled$1 = f;
|
|
97155
|
+
},
|
|
97156
|
+
areRelatedListsPlusPredictionsEnabled: function () {
|
|
97157
|
+
return relatedListsPlusPredictionsEnabled$1 === true;
|
|
97158
|
+
},
|
|
97159
|
+
setRecordRepresentationIngestionOverride: function (ingest) {
|
|
97160
|
+
recordRepresentationIngestionOverride$1 = ingest;
|
|
97161
|
+
},
|
|
97162
|
+
getRecordRepresentationIngestionOverride: function () {
|
|
97163
|
+
return recordRepresentationIngestionOverride$1;
|
|
97164
|
+
},
|
|
97165
|
+
// createRecord
|
|
97166
|
+
getDraftAwareCreateRecordAdapter: configurableCreateRecordAdapter$1.getAdapter,
|
|
97167
|
+
setDraftAwareCreateRecordAdapter: configurableCreateRecordAdapter$1.setAdapter,
|
|
97168
|
+
// updateRecord
|
|
97169
|
+
getDraftAwareUpdateRecordAdapter: configurableUpdateRecordAdapter$1.getAdapter,
|
|
97170
|
+
setDraftAwareUpdateRecordAdapter: configurableUpdateRecordAdapter$1.setAdapter,
|
|
97171
|
+
// deleteRecord
|
|
97172
|
+
getDraftAwareDeleteRecordAdapter: configurableDeleteRecordAdapter$1.getAdapter,
|
|
97173
|
+
setDraftAwareDeleteRecordAdapter: configurableDeleteRecordAdapter$1.setAdapter,
|
|
97174
|
+
// performQuickAction
|
|
97175
|
+
getDraftAwarePerformQuickActionAdapter: configurablePerformQuickActionAdapter$1.getAdapter,
|
|
97176
|
+
setDraftAwarePerformQuickActionAdapter: configurablePerformQuickActionAdapter$1.setAdapter,
|
|
97177
|
+
// performRecordUpdateQuickAction
|
|
97178
|
+
getDraftAwarePerformUpdateRecordQuickActionAdapter: configurablePerformUpdateRecordQuickActionAdapter$1.getAdapter,
|
|
97179
|
+
setDraftAwarePerformUpdateRecordQuickActionAdapter: configurablePerformUpdateRecordQuickActionAdapter$1.setAdapter,
|
|
97180
|
+
// createContentDocumentAndVersion
|
|
97181
|
+
getDraftAwareCreateContentDocumentAndVersionAdapter: configurableCreateContentDocumentAndVersion$1.getAdapter,
|
|
97182
|
+
setDraftAwareCreateContentDocumentAndVersionAdapter: configurableCreateContentDocumentAndVersion$1.setAdapter,
|
|
97183
|
+
// createContentVersion
|
|
97184
|
+
getDraftAwareCreateContentVersionAdapter: configurableCreateContentVersion$1.getAdapter,
|
|
97185
|
+
setDraftAwareCreateContentVersionAdapter: configurableCreateContentVersion$1.setAdapter,
|
|
97186
|
+
...configurationForOneStoreEnabledAdapters$1,
|
|
97187
|
+
...configurationForEnvironmentFactoryOverrides$1,
|
|
97188
|
+
};
|
|
97189
|
+
let configurableGraphQLAdapter$1 = new Configurable$1();
|
|
97190
|
+
let configurableGraphQLBatchAdapter$1 = new Configurable$1();
|
|
97191
|
+
/**
|
|
97192
|
+
* Defines the configuration API and is exposed internally as well as externally.
|
|
97193
|
+
* Configuration for GraphQL adapters only.
|
|
97194
|
+
*/
|
|
97195
|
+
const configurationForGraphQLAdapters$1 = {
|
|
97196
|
+
getDraftAwareGraphQLAdapter: configurableGraphQLAdapter$1.getAdapter,
|
|
97197
|
+
setDraftAwareGraphQLAdapter: configurableGraphQLAdapter$1.setAdapter,
|
|
97198
|
+
getEnvironmentAwareGraphQLBatchAdapter: configurableGraphQLBatchAdapter$1.getAdapter,
|
|
97199
|
+
setEnvironmentAwareGraphQLBatchAdapter: configurableGraphQLBatchAdapter$1.setAdapter,
|
|
97200
|
+
};
|
|
97201
|
+
const registrations$1 = new Set();
|
|
97202
|
+
/**
|
|
97203
|
+
* lds-adapter-uiapi is special. The non-SFDC bundle combines REST and GQL adapters,
|
|
97204
|
+
* yet for SFDC those are separate bundles. So non-SFDC bundle (./main.ts) registers
|
|
97205
|
+
* both REST and GQL configs. We want each SFDC bundle to register (we don't want one
|
|
97206
|
+
* SFDC bundle to assume the other is being loaded and therefore the other one will
|
|
97207
|
+
* take care of registration) but we don't want to double register either.
|
|
97208
|
+
*
|
|
97209
|
+
* So we make this function that memoizes if it's been called before and only
|
|
97210
|
+
* actually registers once.
|
|
97211
|
+
*/
|
|
97212
|
+
function ensureRegisteredOnce$1(registration) {
|
|
97213
|
+
const { id } = registration;
|
|
97214
|
+
if (!registrations$1.has(id)) {
|
|
97215
|
+
register$1(registration);
|
|
97216
|
+
registrations$1.add(id);
|
|
97217
|
+
}
|
|
97218
|
+
}
|
|
97219
|
+
|
|
96458
97220
|
const { keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
|
|
96459
97221
|
function equalsObject(a, b, equalsProp) {
|
|
96460
97222
|
const aKeys = ObjectKeys(a).sort();
|
|
@@ -120688,7 +121450,7 @@
|
|
|
120688
121450
|
// Make a copy of the config before running transform to avoid mutating the original config
|
|
120689
121451
|
const adapterConfigCopy = {
|
|
120690
121452
|
...config,
|
|
120691
|
-
query: parse$
|
|
121453
|
+
query: parse$9(print(config.query))
|
|
120692
121454
|
};
|
|
120693
121455
|
return {
|
|
120694
121456
|
...adapterConfigCopy,
|
|
@@ -120751,238 +121513,6 @@
|
|
|
120751
121513
|
return cacheSnapshot;
|
|
120752
121514
|
}
|
|
120753
121515
|
|
|
120754
|
-
/**
|
|
120755
|
-
* Defines configuration for the module with a default value which can be overridden by the runtime environment.
|
|
120756
|
-
*/
|
|
120757
|
-
// A holder for a configurable adapter override
|
|
120758
|
-
let Configurable$1 = class Configurable {
|
|
120759
|
-
constructor() {
|
|
120760
|
-
this.getAdapter = () => {
|
|
120761
|
-
return this.adapter;
|
|
120762
|
-
};
|
|
120763
|
-
this.setAdapter = (value) => {
|
|
120764
|
-
this.adapter = value;
|
|
120765
|
-
};
|
|
120766
|
-
this.adapter = undefined;
|
|
120767
|
-
}
|
|
120768
|
-
};
|
|
120769
|
-
// Configurable adapters that can have environmental overrides
|
|
120770
|
-
let configurableCreateRecordAdapter$1 = new Configurable$1();
|
|
120771
|
-
let configurableUpdateRecordAdapter$1 = new Configurable$1();
|
|
120772
|
-
let configurableDeleteRecordAdapter$1 = new Configurable$1();
|
|
120773
|
-
let configurablePerformQuickActionAdapter$1 = new Configurable$1();
|
|
120774
|
-
let configurablePerformUpdateRecordQuickActionAdapter$1 = new Configurable$1();
|
|
120775
|
-
let configurableCreateContentDocumentAndVersion$1 = new Configurable$1();
|
|
120776
|
-
let configurableCreateContentVersion$1 = new Configurable$1();
|
|
120777
|
-
/**
|
|
120778
|
-
* Depth to which tracked fields will be added to a request that results from a cache miss.
|
|
120779
|
-
* A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
|
|
120780
|
-
* be reached by following 1 relationship from the root record, etc.
|
|
120781
|
-
* @defaultValue '5', replicates the current behavior
|
|
120782
|
-
*/
|
|
120783
|
-
let trackedFieldDepthOnCacheMiss$1 = 5;
|
|
120784
|
-
/**
|
|
120785
|
-
* Depth to which tracked fields will be added to a request that results from a merge conflict
|
|
120786
|
-
* A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
|
|
120787
|
-
* be reached by following 1 relationship from the root record, etc.
|
|
120788
|
-
* @defaultValue '5', replicates the current behavior
|
|
120789
|
-
*/
|
|
120790
|
-
let trackedFieldDepthOnCacheMergeConflict$1 = 5;
|
|
120791
|
-
/**
|
|
120792
|
-
* Depth to which tracked fields will be added to a request that results from a notify change invocation by the consumer
|
|
120793
|
-
* A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
|
|
120794
|
-
* be reached by following 1 relationship from the root record, etc.
|
|
120795
|
-
* @defaultValue '5', replicates the current behavior
|
|
120796
|
-
*/
|
|
120797
|
-
let trackedFieldDepthOnNotifyChange$1 = 5;
|
|
120798
|
-
/**
|
|
120799
|
-
* Determines if we will only fetch the 'Id' field for the leaf relationship record
|
|
120800
|
-
* @defaultValue 'false', replicates the current behavior and fetches all fields in the store for the leaf relationship record
|
|
120801
|
-
*/
|
|
120802
|
-
let trackedFieldLeafNodeIdAndNameOnly$1 = false;
|
|
120803
|
-
/**
|
|
120804
|
-
* One store enabled Get Object Info adapter
|
|
120805
|
-
*/
|
|
120806
|
-
let oneStoreGetObjectInfoAdapter$1 = undefined;
|
|
120807
|
-
/**
|
|
120808
|
-
* One store enabled Get Object Infos adapter
|
|
120809
|
-
*/
|
|
120810
|
-
let oneStoreGetObjectInfosAdapter$1 = undefined;
|
|
120811
|
-
/**
|
|
120812
|
-
* Determines when to include PDL strategies for Related Lists
|
|
120813
|
-
*/
|
|
120814
|
-
let relatedListsPredictionsEnabled$1 = false;
|
|
120815
|
-
/**
|
|
120816
|
-
* Determines whether to include additional PDL strategies for Related Lists
|
|
120817
|
-
*/
|
|
120818
|
-
let relatedListsPlusPredictionsEnabled$1 = false;
|
|
120819
|
-
let recordRepresentationIngestionOverride$1 = undefined;
|
|
120820
|
-
/**
|
|
120821
|
-
* Defines the configuration API and is exposed internally as well as externally.
|
|
120822
|
-
* Configuration for one store enabled REST adapters only.
|
|
120823
|
-
*/
|
|
120824
|
-
const configurationForOneStoreEnabledAdapters$1 = {
|
|
120825
|
-
setGetObjectInfoAdapter: function (adapter) {
|
|
120826
|
-
oneStoreGetObjectInfoAdapter$1 = adapter;
|
|
120827
|
-
},
|
|
120828
|
-
getGetObjectInfoAdapter: function () {
|
|
120829
|
-
return oneStoreGetObjectInfoAdapter$1;
|
|
120830
|
-
},
|
|
120831
|
-
setGetObjectInfosAdapter: function (adapter) {
|
|
120832
|
-
oneStoreGetObjectInfosAdapter$1 = adapter;
|
|
120833
|
-
},
|
|
120834
|
-
getGetObjectInfosAdapter: function () {
|
|
120835
|
-
return oneStoreGetObjectInfosAdapter$1;
|
|
120836
|
-
},
|
|
120837
|
-
};
|
|
120838
|
-
const getKeywordSearchResultsFactory$1 = new Configurable$1();
|
|
120839
|
-
const getListRecordsByNameFactory$1 = new Configurable$1();
|
|
120840
|
-
const getListUiFactory$1 = new Configurable$1();
|
|
120841
|
-
const getLookupRecordsFactory$1 = new Configurable$1();
|
|
120842
|
-
const getQuickActionDefaultsFactory$1 = new Configurable$1();
|
|
120843
|
-
const getRecordCreateDefaultsFactory$1 = new Configurable$1();
|
|
120844
|
-
const getRecordTemplateCloneFactory$1 = new Configurable$1();
|
|
120845
|
-
const getRecordTemplateCreateFactory$1 = new Configurable$1();
|
|
120846
|
-
const getRecordUiFactory$1 = new Configurable$1();
|
|
120847
|
-
const getRecordFactory$1 = new Configurable$1();
|
|
120848
|
-
const getRecordsFactory$1 = new Configurable$1();
|
|
120849
|
-
const getRelatedListRecordsFactory$1 = new Configurable$1();
|
|
120850
|
-
const getRelatedListRecordsBatchFactory$1 = new Configurable$1();
|
|
120851
|
-
const getSearchResultsFactory$1 = new Configurable$1();
|
|
120852
|
-
// The following set of adapters all touch RecordRepresentation directly or indirectly,
|
|
120853
|
-
// so they need to support having a custom factory provided by the mobile environment.
|
|
120854
|
-
const configurationForEnvironmentFactoryOverrides$1 = {
|
|
120855
|
-
getKeywordSearchResultsAdapterFactory: getKeywordSearchResultsFactory$1.getAdapter,
|
|
120856
|
-
setGetKeywordSearchResultsAdapterFactory: getKeywordSearchResultsFactory$1.setAdapter,
|
|
120857
|
-
getListRecordsByNameAdapterFactory: getListRecordsByNameFactory$1.getAdapter,
|
|
120858
|
-
setGetListRecordsByNameAdapterFactory: getListRecordsByNameFactory$1.setAdapter,
|
|
120859
|
-
getListUiAdapterFactory: getListUiFactory$1.getAdapter,
|
|
120860
|
-
setGetListUiAdapterFactory: getListUiFactory$1.setAdapter,
|
|
120861
|
-
getLookupRecordsAdapterFactory: getLookupRecordsFactory$1.getAdapter,
|
|
120862
|
-
setGetLookupRecordsAdapterFactory: getLookupRecordsFactory$1.setAdapter,
|
|
120863
|
-
getQuickActionDefaultsAdapterFactory: getQuickActionDefaultsFactory$1.getAdapter,
|
|
120864
|
-
setGetQuickActionDefaultsAdapterFactory: getQuickActionDefaultsFactory$1.setAdapter,
|
|
120865
|
-
getRecordCreateDefaultsAdapterFactory: getRecordCreateDefaultsFactory$1.getAdapter,
|
|
120866
|
-
setGetRecordCreateDefaultsAdapterFactory: getRecordCreateDefaultsFactory$1.setAdapter,
|
|
120867
|
-
getRecordTemplateCloneAdapterFactory: getRecordTemplateCloneFactory$1.getAdapter,
|
|
120868
|
-
setGetRecordTemplateCloneAdapterFactory: getRecordTemplateCloneFactory$1.setAdapter,
|
|
120869
|
-
getRecordTemplateCreateAdapterFactory: getRecordTemplateCreateFactory$1.getAdapter,
|
|
120870
|
-
setGetRecordTemplateCreateAdapterFactory: getRecordTemplateCreateFactory$1.setAdapter,
|
|
120871
|
-
getRecordUiAdapterFactory: getRecordUiFactory$1.getAdapter,
|
|
120872
|
-
setGetRecordUiAdapterFactory: getRecordUiFactory$1.setAdapter,
|
|
120873
|
-
getRecordAdapterFactory: getRecordFactory$1.getAdapter,
|
|
120874
|
-
setGetRecordAdapterFactory: getRecordFactory$1.setAdapter,
|
|
120875
|
-
getRecordsAdapterFactory: getRecordsFactory$1.getAdapter,
|
|
120876
|
-
setGetRecordsAdapterFactory: getRecordsFactory$1.setAdapter,
|
|
120877
|
-
getRelatedListRecordsAdapterFactory: getRelatedListRecordsFactory$1.getAdapter,
|
|
120878
|
-
setGetRelatedListRecordsAdapterFactory: getRelatedListRecordsFactory$1.setAdapter,
|
|
120879
|
-
getRelatedListRecordsBatchAdapterFactory: getRelatedListRecordsBatchFactory$1.getAdapter,
|
|
120880
|
-
setGetRelatedListRecordsBatchAdapterFactory: getRelatedListRecordsBatchFactory$1.setAdapter,
|
|
120881
|
-
getSearchResultsAdapterFactory: getSearchResultsFactory$1.getAdapter,
|
|
120882
|
-
setGetSearchResultsAdapterFactory: getSearchResultsFactory$1.setAdapter,
|
|
120883
|
-
};
|
|
120884
|
-
/**
|
|
120885
|
-
* Defines the configuration API and is exposed internally as well as externally.
|
|
120886
|
-
* Configuration for REST adapters only.
|
|
120887
|
-
*/
|
|
120888
|
-
const configurationForRestAdapters$1 = {
|
|
120889
|
-
setTrackedFieldDepthOnCacheMiss: function (trackedFieldDepthOnCacheMissParam) {
|
|
120890
|
-
trackedFieldDepthOnCacheMiss$1 = trackedFieldDepthOnCacheMissParam;
|
|
120891
|
-
},
|
|
120892
|
-
getTrackedFieldDepthOnCacheMiss: function () {
|
|
120893
|
-
return trackedFieldDepthOnCacheMiss$1;
|
|
120894
|
-
},
|
|
120895
|
-
setTrackedFieldDepthOnCacheMergeConflict: function (trackedFieldDepthOnCacheMergeConflictParam) {
|
|
120896
|
-
trackedFieldDepthOnCacheMergeConflict$1 = trackedFieldDepthOnCacheMergeConflictParam;
|
|
120897
|
-
},
|
|
120898
|
-
getTrackedFieldDepthOnCacheMergeConflict: function () {
|
|
120899
|
-
return trackedFieldDepthOnCacheMergeConflict$1;
|
|
120900
|
-
},
|
|
120901
|
-
setTrackedFieldDepthOnNotifyChange: function (trackedFieldDepthOnNotifyChangeParam) {
|
|
120902
|
-
trackedFieldDepthOnNotifyChange$1 = trackedFieldDepthOnNotifyChangeParam;
|
|
120903
|
-
},
|
|
120904
|
-
getTrackedFieldDepthOnNotifyChange: function () {
|
|
120905
|
-
return trackedFieldDepthOnNotifyChange$1;
|
|
120906
|
-
},
|
|
120907
|
-
setTrackedFieldLeafNodeIdAndNameOnly: function (trackedFieldLeafNodeIdAndNameOnlyParam) {
|
|
120908
|
-
trackedFieldLeafNodeIdAndNameOnly$1 = trackedFieldLeafNodeIdAndNameOnlyParam;
|
|
120909
|
-
},
|
|
120910
|
-
getTrackedFieldLeafNodeIdAndNameOnly: function () {
|
|
120911
|
-
return trackedFieldLeafNodeIdAndNameOnly$1;
|
|
120912
|
-
},
|
|
120913
|
-
setRelatedListsPredictionsEnabled: function (f) {
|
|
120914
|
-
relatedListsPredictionsEnabled$1 = f;
|
|
120915
|
-
},
|
|
120916
|
-
areRelatedListsPredictionsEnabled: function () {
|
|
120917
|
-
return relatedListsPredictionsEnabled$1 === true;
|
|
120918
|
-
},
|
|
120919
|
-
setRelatedListsPlusPredictionsEnabled: function (f) {
|
|
120920
|
-
relatedListsPlusPredictionsEnabled$1 = f;
|
|
120921
|
-
},
|
|
120922
|
-
areRelatedListsPlusPredictionsEnabled: function () {
|
|
120923
|
-
return relatedListsPlusPredictionsEnabled$1 === true;
|
|
120924
|
-
},
|
|
120925
|
-
setRecordRepresentationIngestionOverride: function (ingest) {
|
|
120926
|
-
recordRepresentationIngestionOverride$1 = ingest;
|
|
120927
|
-
},
|
|
120928
|
-
getRecordRepresentationIngestionOverride: function () {
|
|
120929
|
-
return recordRepresentationIngestionOverride$1;
|
|
120930
|
-
},
|
|
120931
|
-
// createRecord
|
|
120932
|
-
getDraftAwareCreateRecordAdapter: configurableCreateRecordAdapter$1.getAdapter,
|
|
120933
|
-
setDraftAwareCreateRecordAdapter: configurableCreateRecordAdapter$1.setAdapter,
|
|
120934
|
-
// updateRecord
|
|
120935
|
-
getDraftAwareUpdateRecordAdapter: configurableUpdateRecordAdapter$1.getAdapter,
|
|
120936
|
-
setDraftAwareUpdateRecordAdapter: configurableUpdateRecordAdapter$1.setAdapter,
|
|
120937
|
-
// deleteRecord
|
|
120938
|
-
getDraftAwareDeleteRecordAdapter: configurableDeleteRecordAdapter$1.getAdapter,
|
|
120939
|
-
setDraftAwareDeleteRecordAdapter: configurableDeleteRecordAdapter$1.setAdapter,
|
|
120940
|
-
// performQuickAction
|
|
120941
|
-
getDraftAwarePerformQuickActionAdapter: configurablePerformQuickActionAdapter$1.getAdapter,
|
|
120942
|
-
setDraftAwarePerformQuickActionAdapter: configurablePerformQuickActionAdapter$1.setAdapter,
|
|
120943
|
-
// performRecordUpdateQuickAction
|
|
120944
|
-
getDraftAwarePerformUpdateRecordQuickActionAdapter: configurablePerformUpdateRecordQuickActionAdapter$1.getAdapter,
|
|
120945
|
-
setDraftAwarePerformUpdateRecordQuickActionAdapter: configurablePerformUpdateRecordQuickActionAdapter$1.setAdapter,
|
|
120946
|
-
// createContentDocumentAndVersion
|
|
120947
|
-
getDraftAwareCreateContentDocumentAndVersionAdapter: configurableCreateContentDocumentAndVersion$1.getAdapter,
|
|
120948
|
-
setDraftAwareCreateContentDocumentAndVersionAdapter: configurableCreateContentDocumentAndVersion$1.setAdapter,
|
|
120949
|
-
// createContentVersion
|
|
120950
|
-
getDraftAwareCreateContentVersionAdapter: configurableCreateContentVersion$1.getAdapter,
|
|
120951
|
-
setDraftAwareCreateContentVersionAdapter: configurableCreateContentVersion$1.setAdapter,
|
|
120952
|
-
...configurationForOneStoreEnabledAdapters$1,
|
|
120953
|
-
...configurationForEnvironmentFactoryOverrides$1,
|
|
120954
|
-
};
|
|
120955
|
-
let configurableGraphQLAdapter$1 = new Configurable$1();
|
|
120956
|
-
let configurableGraphQLBatchAdapter$1 = new Configurable$1();
|
|
120957
|
-
/**
|
|
120958
|
-
* Defines the configuration API and is exposed internally as well as externally.
|
|
120959
|
-
* Configuration for GraphQL adapters only.
|
|
120960
|
-
*/
|
|
120961
|
-
const configurationForGraphQLAdapters$1 = {
|
|
120962
|
-
getDraftAwareGraphQLAdapter: configurableGraphQLAdapter$1.getAdapter,
|
|
120963
|
-
setDraftAwareGraphQLAdapter: configurableGraphQLAdapter$1.setAdapter,
|
|
120964
|
-
getEnvironmentAwareGraphQLBatchAdapter: configurableGraphQLBatchAdapter$1.getAdapter,
|
|
120965
|
-
setEnvironmentAwareGraphQLBatchAdapter: configurableGraphQLBatchAdapter$1.setAdapter,
|
|
120966
|
-
};
|
|
120967
|
-
const registrations$1 = new Set();
|
|
120968
|
-
/**
|
|
120969
|
-
* lds-adapter-uiapi is special. The non-SFDC bundle combines REST and GQL adapters,
|
|
120970
|
-
* yet for SFDC those are separate bundles. So non-SFDC bundle (./main.ts) registers
|
|
120971
|
-
* both REST and GQL configs. We want each SFDC bundle to register (we don't want one
|
|
120972
|
-
* SFDC bundle to assume the other is being loaded and therefore the other one will
|
|
120973
|
-
* take care of registration) but we don't want to double register either.
|
|
120974
|
-
*
|
|
120975
|
-
* So we make this function that memoizes if it's been called before and only
|
|
120976
|
-
* actually registers once.
|
|
120977
|
-
*/
|
|
120978
|
-
function ensureRegisteredOnce$1(registration) {
|
|
120979
|
-
const { id } = registration;
|
|
120980
|
-
if (!registrations$1.has(id)) {
|
|
120981
|
-
register$1(registration);
|
|
120982
|
-
registrations$1.add(id);
|
|
120983
|
-
}
|
|
120984
|
-
}
|
|
120985
|
-
|
|
120986
121516
|
function validateAdapterConfig$1(untrustedConfig, _configPropertyNames) {
|
|
120987
121517
|
if (untrustedConfig !== null && typeof untrustedConfig === 'object') {
|
|
120988
121518
|
const operationNameIsDefinedAsUndefined = ObjectPrototypeHasOwnProperty.call(untrustedConfig, 'operationName') &&
|
|
@@ -121309,7 +121839,7 @@
|
|
|
121309
121839
|
const batchQueryTransformed = config.batchQuery.map((singleConfig) => {
|
|
121310
121840
|
return {
|
|
121311
121841
|
...singleConfig,
|
|
121312
|
-
query: applyMinimumFieldsToDocument(parse$
|
|
121842
|
+
query: applyMinimumFieldsToDocument(parse$9(print(singleConfig.query)), { queryTypeName: 'Query' }, getQueryTransformerForType, singleConfig.operationName), // Stringifies and parses again to avoid mutating original. Should we just JSON.stringify to avoid the dependency on the parser?
|
|
121313
121843
|
};
|
|
121314
121844
|
});
|
|
121315
121845
|
return {
|
|
@@ -121451,11 +121981,11 @@
|
|
|
121451
121981
|
const graphqlBatch_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'graphqlBatch', factory), graphqlBatchMetadata);
|
|
121452
121982
|
return {
|
|
121453
121983
|
// Wire Adapters
|
|
121454
|
-
graphql: createGraphQLWireAdapterConstructor(luvio, graphql_ldsAdapter, graphqlMetadata, astResolver),
|
|
121455
121984
|
graphqlBatch: createGraphQLWireAdapterConstructor(luvio, graphqlBatch_ldsAdapter, graphqlBatchMetadata, astResolver),
|
|
121456
121985
|
// One Store Enabled Adapters
|
|
121986
|
+
graphql: getLuvioOrOneStoreAdapter(createGraphQLWireAdapterConstructor(luvio, graphql_ldsAdapter, graphqlMetadata, astResolver), configurationForOneStoreEnabledAdapters$1.getGraphQLWireAdapter()),
|
|
121987
|
+
graphql_imperative: getLuvioOrOneStoreAdapter(createGraphQLImperativeAdapter(luvio, graphql_ldsAdapter, graphqlMetadata, astResolver), configurationForOneStoreEnabledAdapters$1.getGraphQLImperativeQueryAdapter()),
|
|
121457
121988
|
// Imperative Adapters
|
|
121458
|
-
graphql_imperative: createGraphQLImperativeAdapter(luvio, graphql_ldsAdapter, graphqlMetadata, astResolver),
|
|
121459
121989
|
graphqlBatch_imperative: createGraphQLImperativeAdapter(luvio, graphqlBatch_ldsAdapter, graphqlBatchMetadata, astResolver),
|
|
121460
121990
|
};
|
|
121461
121991
|
}
|
|
@@ -121970,7 +122500,14 @@
|
|
|
121970
122500
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
121971
122501
|
instrument: instrument$1,
|
|
121972
122502
|
});
|
|
121973
|
-
|
|
122503
|
+
function refreshGraphQL(data) {
|
|
122504
|
+
// If OneStore data, call its refresh instead
|
|
122505
|
+
if (typeof data.refresh === 'function') {
|
|
122506
|
+
return data.refresh();
|
|
122507
|
+
}
|
|
122508
|
+
return refresh$3(data, 'refreshUiApi');
|
|
122509
|
+
}
|
|
122510
|
+
// version: 1.370.0-7c1df2520b
|
|
121974
122511
|
|
|
121975
122512
|
// On core the unstable adapters are re-exported with different names,
|
|
121976
122513
|
// we want to match them here.
|
|
@@ -121982,7 +122519,7 @@
|
|
|
121982
122519
|
gql: gql,
|
|
121983
122520
|
get graphql () { return graphql; },
|
|
121984
122521
|
get graphqlBatch () { return graphqlBatch; },
|
|
121985
|
-
|
|
122522
|
+
refreshGraphQL: refreshGraphQL,
|
|
121986
122523
|
get unstable_getActionOverrides_imperative () { return unstable_getActionOverrides_imperative; },
|
|
121987
122524
|
get unstable_getFlexipageFormulaOverrides_imperative () { return unstable_getFlexipageFormulaOverrides_imperative; },
|
|
121988
122525
|
get unstable_getGlobalActions_imperative () { return unstable_getGlobalActions_imperative; },
|
|
@@ -122122,7 +122659,7 @@
|
|
|
122122
122659
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
122123
122660
|
graphQLImperative = ldsAdapter;
|
|
122124
122661
|
});
|
|
122125
|
-
// version: 1.
|
|
122662
|
+
// version: 1.370.0-7c1df2520b
|
|
122126
122663
|
|
|
122127
122664
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
122128
122665
|
__proto__: null,
|
|
@@ -122921,7 +123458,7 @@
|
|
|
122921
123458
|
function register(r) {
|
|
122922
123459
|
callbacks$1.forEach((callback) => callback(r));
|
|
122923
123460
|
}
|
|
122924
|
-
// version: 1.
|
|
123461
|
+
// version: 1.370.0-3ec6ffba72
|
|
122925
123462
|
|
|
122926
123463
|
/**
|
|
122927
123464
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -122987,6 +123524,14 @@
|
|
|
122987
123524
|
* One store enabled Get Object Infos adapter
|
|
122988
123525
|
*/
|
|
122989
123526
|
let oneStoreGetObjectInfosAdapter = undefined;
|
|
123527
|
+
/**
|
|
123528
|
+
* One store enabled GraphQL adapter
|
|
123529
|
+
*/
|
|
123530
|
+
let oneStoreGraphQLWireAdapter = undefined;
|
|
123531
|
+
/**
|
|
123532
|
+
* One store enabled GraphQL imperative query adapter
|
|
123533
|
+
*/
|
|
123534
|
+
let oneStoreGraphQLImperativeQueryAdapter = undefined;
|
|
122990
123535
|
/**
|
|
122991
123536
|
* Determines when to include PDL strategies for Related Lists
|
|
122992
123537
|
*/
|
|
@@ -123013,6 +123558,18 @@
|
|
|
123013
123558
|
getGetObjectInfosAdapter: function () {
|
|
123014
123559
|
return oneStoreGetObjectInfosAdapter;
|
|
123015
123560
|
},
|
|
123561
|
+
setGraphQLWireAdapter: function (adapter) {
|
|
123562
|
+
oneStoreGraphQLWireAdapter = adapter;
|
|
123563
|
+
},
|
|
123564
|
+
getGraphQLWireAdapter: function () {
|
|
123565
|
+
return oneStoreGraphQLWireAdapter;
|
|
123566
|
+
},
|
|
123567
|
+
setGraphQLImperativeQueryAdapter: function (adapter) {
|
|
123568
|
+
oneStoreGraphQLImperativeQueryAdapter = adapter;
|
|
123569
|
+
},
|
|
123570
|
+
getGraphQLImperativeQueryAdapter: function () {
|
|
123571
|
+
return oneStoreGraphQLImperativeQueryAdapter;
|
|
123572
|
+
},
|
|
123016
123573
|
};
|
|
123017
123574
|
const getKeywordSearchResultsFactory = new Configurable();
|
|
123018
123575
|
const getListRecordsByNameFactory = new Configurable();
|
|
@@ -124108,4 +124665,4 @@
|
|
|
124108
124665
|
exports.subscribeToAdapter = subscribeToAdapter;
|
|
124109
124666
|
|
|
124110
124667
|
}));
|
|
124111
|
-
// version: 1.
|
|
124668
|
+
// version: 1.370.0-3ec6ffba72
|