@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
|
@@ -24,7 +24,7 @@ const { create: create$a, entries: entries$5, freeze: freeze$6, keys: keys$a, va
|
|
|
24
24
|
const { hasOwnProperty: hasOwnProperty$4 } = Object.prototype;
|
|
25
25
|
const { isArray: isArray$9 } = Array;
|
|
26
26
|
const { push: push$5, indexOf, slice: slice$2 } = Array.prototype;
|
|
27
|
-
const { parse: parse$
|
|
27
|
+
const { parse: parse$b, stringify: stringify$b } = JSON;
|
|
28
28
|
const WeakSetCtor = WeakSet;
|
|
29
29
|
|
|
30
30
|
const deeplyFrozen = new WeakSetCtor();
|
|
@@ -302,7 +302,7 @@ function stableJSONStringify$4(node) {
|
|
|
302
302
|
return isFinite(node) ? '' + node : 'null';
|
|
303
303
|
}
|
|
304
304
|
if (typeof node !== 'object') {
|
|
305
|
-
return stringify$
|
|
305
|
+
return stringify$b(node);
|
|
306
306
|
}
|
|
307
307
|
let i;
|
|
308
308
|
let out;
|
|
@@ -330,7 +330,7 @@ function stableJSONStringify$4(node) {
|
|
|
330
330
|
if (out) {
|
|
331
331
|
out += ',';
|
|
332
332
|
}
|
|
333
|
-
out += stringify$
|
|
333
|
+
out += stringify$b(key) + ':' + value;
|
|
334
334
|
}
|
|
335
335
|
return '{' + out + '}';
|
|
336
336
|
}
|
|
@@ -2314,7 +2314,7 @@ function formatStorageKey(name, argValues) {
|
|
|
2314
2314
|
if (hasOwnProperty$4.call(argValues, _argName)) {
|
|
2315
2315
|
var value = argValues[_argName];
|
|
2316
2316
|
if (value !== null || value !== undefined) {
|
|
2317
|
-
values.push(_argName + ':' + stringify$
|
|
2317
|
+
values.push(_argName + ':' + stringify$b(value));
|
|
2318
2318
|
}
|
|
2319
2319
|
}
|
|
2320
2320
|
}
|
|
@@ -2629,7 +2629,7 @@ class Reader {
|
|
|
2629
2629
|
}
|
|
2630
2630
|
// Only works for non-complex values.. No Date or Functions.
|
|
2631
2631
|
opaqueCopy(value) {
|
|
2632
|
-
return parse$
|
|
2632
|
+
return parse$b(stringify$b(value));
|
|
2633
2633
|
}
|
|
2634
2634
|
deepCopy(record, data, key, visitedKeys) {
|
|
2635
2635
|
const value = record[key];
|
|
@@ -2775,7 +2775,7 @@ class Reader {
|
|
|
2775
2775
|
this.readScalar(propertyName, source, sink);
|
|
2776
2776
|
return;
|
|
2777
2777
|
}
|
|
2778
|
-
throw new Error(`Invalid Link State. Link on "${this.currentPath.fullPath}" is null but selection is not nullable: \n${stringify$
|
|
2778
|
+
throw new Error(`Invalid Link State. Link on "${this.currentPath.fullPath}" is null but selection is not nullable: \n${stringify$b(selection, null, 2)}`);
|
|
2779
2779
|
case StoreLinkStateValues$2.Pending:
|
|
2780
2780
|
this.markPending();
|
|
2781
2781
|
return;
|
|
@@ -2897,7 +2897,7 @@ class Reader {
|
|
|
2897
2897
|
}
|
|
2898
2898
|
if ((options === null || options === void 0 ? void 0 : options.useDeepEquals) === true) {
|
|
2899
2899
|
this.snapshotChanged =
|
|
2900
|
-
stringify$
|
|
2900
|
+
stringify$b(this.currentPath.baseSnapshotValue) !== stringify$b(value);
|
|
2901
2901
|
}
|
|
2902
2902
|
else {
|
|
2903
2903
|
this.snapshotChanged = this.currentPath.baseSnapshotValue !== value;
|
|
@@ -3298,7 +3298,7 @@ function normalizeNetworkAdapterError(error) {
|
|
|
3298
3298
|
return error;
|
|
3299
3299
|
}
|
|
3300
3300
|
// anything else should get turned into an Error with the errorType set
|
|
3301
|
-
const normalizedError = new Error(`NetworkAdapter rejected with non-Error object: ${typeof error === 'undefined' ? 'undefined' : stringify$
|
|
3301
|
+
const normalizedError = new Error(`NetworkAdapter rejected with non-Error object: ${typeof error === 'undefined' ? 'undefined' : stringify$b(error)}`);
|
|
3302
3302
|
normalizedError.errorType = 'networkAdapterError';
|
|
3303
3303
|
return normalizedError;
|
|
3304
3304
|
}
|
|
@@ -4146,7 +4146,7 @@ function createResourceParamsImpl(config, configMetadata) {
|
|
|
4146
4146
|
}
|
|
4147
4147
|
return resourceParams;
|
|
4148
4148
|
}
|
|
4149
|
-
// engine version: 0.158.
|
|
4149
|
+
// engine version: 0.158.7-bafe2646
|
|
4150
4150
|
|
|
4151
4151
|
/**
|
|
4152
4152
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -4274,7 +4274,7 @@ function withDefaultLuvio(callback) {
|
|
|
4274
4274
|
}
|
|
4275
4275
|
callbacks.push(callback);
|
|
4276
4276
|
}
|
|
4277
|
-
// version: 1.
|
|
4277
|
+
// version: 1.370.0-3ec6ffba72
|
|
4278
4278
|
|
|
4279
4279
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
4280
4280
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -4390,7 +4390,7 @@ function isPromise$1$1(value) {
|
|
|
4390
4390
|
}
|
|
4391
4391
|
|
|
4392
4392
|
const { isArray: isArray$8 } = Array;
|
|
4393
|
-
const { stringify: stringify$
|
|
4393
|
+
const { stringify: stringify$a } = JSON;
|
|
4394
4394
|
|
|
4395
4395
|
/**
|
|
4396
4396
|
* (Re)throws an error after adding a prefix to the message.
|
|
@@ -4403,7 +4403,7 @@ function throwAnnotatedError(error, messagePrefix) {
|
|
|
4403
4403
|
error.message = `${messagePrefix}\n[${error.message}]`;
|
|
4404
4404
|
throw error;
|
|
4405
4405
|
}
|
|
4406
|
-
throw new Error(`${messagePrefix}\n[${stringify$
|
|
4406
|
+
throw new Error(`${messagePrefix}\n[${stringify$a(error)}]`);
|
|
4407
4407
|
}
|
|
4408
4408
|
|
|
4409
4409
|
class Sanitizer {
|
|
@@ -4419,7 +4419,7 @@ class Sanitizer {
|
|
|
4419
4419
|
}
|
|
4420
4420
|
sanitize() {
|
|
4421
4421
|
const sanitizer = this;
|
|
4422
|
-
stringify$
|
|
4422
|
+
stringify$a(this.obj, function (key, value) {
|
|
4423
4423
|
if (key === '') {
|
|
4424
4424
|
return value;
|
|
4425
4425
|
}
|
|
@@ -4645,6 +4645,53 @@ function createWireAdapterConstructor$1(adapter, name, luvio) {
|
|
|
4645
4645
|
return constructor;
|
|
4646
4646
|
}
|
|
4647
4647
|
|
|
4648
|
+
/**
|
|
4649
|
+
* Simple deep equality comparison for configuration objects.
|
|
4650
|
+
* Handles primitives, arrays, and plain objects.
|
|
4651
|
+
*/
|
|
4652
|
+
function deepEquals$1(a, b) {
|
|
4653
|
+
if (a === b) {
|
|
4654
|
+
return true;
|
|
4655
|
+
}
|
|
4656
|
+
if (a === null || a === undefined || b === null || b === undefined) {
|
|
4657
|
+
return a === b;
|
|
4658
|
+
}
|
|
4659
|
+
if (typeof a !== typeof b) {
|
|
4660
|
+
return false;
|
|
4661
|
+
}
|
|
4662
|
+
if (typeof a !== 'object') {
|
|
4663
|
+
return false;
|
|
4664
|
+
}
|
|
4665
|
+
if (Array.isArray(a) !== Array.isArray(b)) {
|
|
4666
|
+
return false;
|
|
4667
|
+
}
|
|
4668
|
+
if (Array.isArray(a) && Array.isArray(b)) {
|
|
4669
|
+
if (a.length !== b.length) {
|
|
4670
|
+
return false;
|
|
4671
|
+
}
|
|
4672
|
+
for (let i = 0; i < a.length; i++) {
|
|
4673
|
+
if (!deepEquals$1(a[i], b[i])) {
|
|
4674
|
+
return false;
|
|
4675
|
+
}
|
|
4676
|
+
}
|
|
4677
|
+
return true;
|
|
4678
|
+
}
|
|
4679
|
+
// Handle plain objects
|
|
4680
|
+
const aKeys = Object.keys(a);
|
|
4681
|
+
const bKeys = Object.keys(b);
|
|
4682
|
+
if (aKeys.length !== bKeys.length) {
|
|
4683
|
+
return false;
|
|
4684
|
+
}
|
|
4685
|
+
for (const key of aKeys) {
|
|
4686
|
+
if (!bKeys.includes(key)) {
|
|
4687
|
+
return false;
|
|
4688
|
+
}
|
|
4689
|
+
if (!deepEquals$1(a[key], b[key])) {
|
|
4690
|
+
return false;
|
|
4691
|
+
}
|
|
4692
|
+
}
|
|
4693
|
+
return true;
|
|
4694
|
+
}
|
|
4648
4695
|
class LWCInfinteScrollingLuvioWireAdapter extends LWCLuvioWireAdapter {
|
|
4649
4696
|
constructor(adapter, name, luvio, callback, sourceContext, paginationConfigParamNames) {
|
|
4650
4697
|
super(adapter, name, luvio, callback, sourceContext);
|
|
@@ -4680,7 +4727,7 @@ class LWCInfinteScrollingLuvioWireAdapter extends LWCLuvioWireAdapter {
|
|
|
4680
4727
|
var _a;
|
|
4681
4728
|
// If this is not a pagination param and its value has changed
|
|
4682
4729
|
return (!((_a = this.paginationConfigParamNames) === null || _a === void 0 ? void 0 : _a.includes(paramName)) &&
|
|
4683
|
-
config[paramName]
|
|
4730
|
+
!deepEquals$1(config[paramName], currentConfig === null || currentConfig === void 0 ? void 0 : currentConfig[paramName]));
|
|
4684
4731
|
});
|
|
4685
4732
|
if (hasNonPaginationParamChanged) {
|
|
4686
4733
|
this.connectTimestamp = Date.now();
|
|
@@ -5131,12 +5178,16 @@ function createGraphQLImperativeAdapter(luvio, adapter, metadata, astResolver) {
|
|
|
5131
5178
|
callback(snapshotToTuple(snapshotOrPromise));
|
|
5132
5179
|
return;
|
|
5133
5180
|
}
|
|
5134
|
-
snapshotOrPromise
|
|
5181
|
+
snapshotOrPromise
|
|
5182
|
+
.then((snapshot) => {
|
|
5135
5183
|
if (snapshot === null) {
|
|
5136
5184
|
callback(createInvalidConfigError());
|
|
5137
5185
|
return;
|
|
5138
5186
|
}
|
|
5139
5187
|
callback(snapshotToTuple(snapshot));
|
|
5188
|
+
})
|
|
5189
|
+
.finally(() => {
|
|
5190
|
+
luvio.storeCleanup();
|
|
5140
5191
|
});
|
|
5141
5192
|
};
|
|
5142
5193
|
defineProperty(imperativeAdapterInvoke, 'name', {
|
|
@@ -5239,7 +5290,7 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
|
|
|
5239
5290
|
const { apiFamily, name } = metadata;
|
|
5240
5291
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
5241
5292
|
}
|
|
5242
|
-
// version: 1.
|
|
5293
|
+
// version: 1.370.0-3ec6ffba72
|
|
5243
5294
|
|
|
5244
5295
|
/**
|
|
5245
5296
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -5338,7 +5389,7 @@ var TypeCheckShapes;
|
|
|
5338
5389
|
TypeCheckShapes[TypeCheckShapes["Integer"] = 3] = "Integer";
|
|
5339
5390
|
TypeCheckShapes[TypeCheckShapes["Unsupported"] = 4] = "Unsupported";
|
|
5340
5391
|
})(TypeCheckShapes || (TypeCheckShapes = {}));
|
|
5341
|
-
// engine version: 0.158.
|
|
5392
|
+
// engine version: 0.158.7-bafe2646
|
|
5342
5393
|
|
|
5343
5394
|
const { keys: ObjectKeys$4, create: ObjectCreate$4 } = Object;
|
|
5344
5395
|
|
|
@@ -5401,6 +5452,14 @@ let oneStoreGetObjectInfoAdapter$3 = undefined;
|
|
|
5401
5452
|
* One store enabled Get Object Infos adapter
|
|
5402
5453
|
*/
|
|
5403
5454
|
let oneStoreGetObjectInfosAdapter$3 = undefined;
|
|
5455
|
+
/**
|
|
5456
|
+
* One store enabled GraphQL adapter
|
|
5457
|
+
*/
|
|
5458
|
+
let oneStoreGraphQLWireAdapter$3 = undefined;
|
|
5459
|
+
/**
|
|
5460
|
+
* One store enabled GraphQL imperative query adapter
|
|
5461
|
+
*/
|
|
5462
|
+
let oneStoreGraphQLImperativeQueryAdapter$3 = undefined;
|
|
5404
5463
|
/**
|
|
5405
5464
|
* Determines when to include PDL strategies for Related Lists
|
|
5406
5465
|
*/
|
|
@@ -5427,6 +5486,18 @@ const configurationForOneStoreEnabledAdapters$3 = {
|
|
|
5427
5486
|
getGetObjectInfosAdapter: function () {
|
|
5428
5487
|
return oneStoreGetObjectInfosAdapter$3;
|
|
5429
5488
|
},
|
|
5489
|
+
setGraphQLWireAdapter: function (adapter) {
|
|
5490
|
+
oneStoreGraphQLWireAdapter$3 = adapter;
|
|
5491
|
+
},
|
|
5492
|
+
getGraphQLWireAdapter: function () {
|
|
5493
|
+
return oneStoreGraphQLWireAdapter$3;
|
|
5494
|
+
},
|
|
5495
|
+
setGraphQLImperativeQueryAdapter: function (adapter) {
|
|
5496
|
+
oneStoreGraphQLImperativeQueryAdapter$3 = adapter;
|
|
5497
|
+
},
|
|
5498
|
+
getGraphQLImperativeQueryAdapter: function () {
|
|
5499
|
+
return oneStoreGraphQLImperativeQueryAdapter$3;
|
|
5500
|
+
},
|
|
5430
5501
|
};
|
|
5431
5502
|
const getKeywordSearchResultsFactory$3 = new Configurable$3();
|
|
5432
5503
|
const getListRecordsByNameFactory$3 = new Configurable$3();
|
|
@@ -5666,6 +5737,14 @@ let oneStoreGetObjectInfoAdapter$2 = undefined;
|
|
|
5666
5737
|
* One store enabled Get Object Infos adapter
|
|
5667
5738
|
*/
|
|
5668
5739
|
let oneStoreGetObjectInfosAdapter$2 = undefined;
|
|
5740
|
+
/**
|
|
5741
|
+
* One store enabled GraphQL adapter
|
|
5742
|
+
*/
|
|
5743
|
+
let oneStoreGraphQLWireAdapter$2 = undefined;
|
|
5744
|
+
/**
|
|
5745
|
+
* One store enabled GraphQL imperative query adapter
|
|
5746
|
+
*/
|
|
5747
|
+
let oneStoreGraphQLImperativeQueryAdapter$2 = undefined;
|
|
5669
5748
|
/**
|
|
5670
5749
|
* Determines when to include PDL strategies for Related Lists
|
|
5671
5750
|
*/
|
|
@@ -5692,6 +5771,18 @@ const configurationForOneStoreEnabledAdapters$2 = {
|
|
|
5692
5771
|
getGetObjectInfosAdapter: function () {
|
|
5693
5772
|
return oneStoreGetObjectInfosAdapter$2;
|
|
5694
5773
|
},
|
|
5774
|
+
setGraphQLWireAdapter: function (adapter) {
|
|
5775
|
+
oneStoreGraphQLWireAdapter$2 = adapter;
|
|
5776
|
+
},
|
|
5777
|
+
getGraphQLWireAdapter: function () {
|
|
5778
|
+
return oneStoreGraphQLWireAdapter$2;
|
|
5779
|
+
},
|
|
5780
|
+
setGraphQLImperativeQueryAdapter: function (adapter) {
|
|
5781
|
+
oneStoreGraphQLImperativeQueryAdapter$2 = adapter;
|
|
5782
|
+
},
|
|
5783
|
+
getGraphQLImperativeQueryAdapter: function () {
|
|
5784
|
+
return oneStoreGraphQLImperativeQueryAdapter$2;
|
|
5785
|
+
},
|
|
5695
5786
|
};
|
|
5696
5787
|
/**
|
|
5697
5788
|
* Helper function to return the one store adapter if it's defined, otherwise return the luvio adapter.
|
|
@@ -5699,7 +5790,7 @@ const configurationForOneStoreEnabledAdapters$2 = {
|
|
|
5699
5790
|
* @param oneStoreAdapter - The one store bound adapter.
|
|
5700
5791
|
* @returns Luvio or one store wire adapter constructor.
|
|
5701
5792
|
*/
|
|
5702
|
-
function getLuvioOrOneStoreAdapter(luvioAdapter, oneStoreAdapter) {
|
|
5793
|
+
function getLuvioOrOneStoreAdapter$1(luvioAdapter, oneStoreAdapter) {
|
|
5703
5794
|
return oneStoreAdapter ?? luvioAdapter;
|
|
5704
5795
|
}
|
|
5705
5796
|
const getKeywordSearchResultsFactory$2 = new Configurable$2();
|
|
@@ -6064,7 +6155,7 @@ const { hasOwnProperty: hasOwnProperty$3 } = Object.prototype;
|
|
|
6064
6155
|
const { split: split$1, endsWith: endsWith$1 } = String.prototype;
|
|
6065
6156
|
const { isArray: isArray$7 } = Array;
|
|
6066
6157
|
const { concat: concat$3, filter: filter$3, includes: includes$3, push: push$4, reduce: reduce$3 } = Array.prototype;
|
|
6067
|
-
const { parse: parse$
|
|
6158
|
+
const { parse: parse$a, stringify: stringify$9 } = JSON;
|
|
6068
6159
|
|
|
6069
6160
|
function isString$3(value) {
|
|
6070
6161
|
return typeof value === 'string';
|
|
@@ -14763,7 +14854,7 @@ function prepareRequest$5$1(luvio, config) {
|
|
|
14763
14854
|
// we have to run ingest code and look at the resulting snapshot's seenRecords.
|
|
14764
14855
|
function getCacheKeys$1(keySet, luvio, config, key, originalResponseBody) {
|
|
14765
14856
|
const { recordIds, layoutTypes, modes } = config;
|
|
14766
|
-
const responseBody = parse$
|
|
14857
|
+
const responseBody = parse$a(stringify$9(originalResponseBody));
|
|
14767
14858
|
eachLayout$1(responseBody, (apiName, recordTypeId, layout) => {
|
|
14768
14859
|
if (layout.id === null) {
|
|
14769
14860
|
return;
|
|
@@ -27942,7 +28033,7 @@ function equalsMetadata$1(existingMetadata, incomingMetadata) {
|
|
|
27942
28033
|
}
|
|
27943
28034
|
|
|
27944
28035
|
const TTL$a$1 = 30000;
|
|
27945
|
-
const VERSION$c$2 = "
|
|
28036
|
+
const VERSION$c$2 = "ecedd058ac9cfc9b51de0f2c00276ce8";
|
|
27946
28037
|
const RepresentationType$d$1 = 'RelatedListRecordCollectionRepresentation';
|
|
27947
28038
|
function keyBuilder$t$2(luvio, config) {
|
|
27948
28039
|
return keyPrefix$3 + '::' + RepresentationType$d$1 + ':' + '[' + config.sortBy.join(',') + ']' + ':' + (config.parentRecordId === null ? '' : config.parentRecordId) + ':' + config.relatedListId + ':' + (config.where === null ? '' : config.where);
|
|
@@ -28058,6 +28149,14 @@ const dynamicSelect$4$1 = function dynamicRelatedListRecordCollectionRepresentat
|
|
|
28058
28149
|
reader.enterPath('count');
|
|
28059
28150
|
reader.readScalar('count', metadataProperties, sink);
|
|
28060
28151
|
reader.exitPath();
|
|
28152
|
+
reader.enterPath('columnLabels');
|
|
28153
|
+
reader.readObject('columnLabels', {
|
|
28154
|
+
name: 'columnLabels',
|
|
28155
|
+
kind: 'Object',
|
|
28156
|
+
// Any
|
|
28157
|
+
required: false
|
|
28158
|
+
}, source, sink);
|
|
28159
|
+
reader.exitPath();
|
|
28061
28160
|
reader.enterPath('fields');
|
|
28062
28161
|
reader.readScalarPlural('fields', source, sink, true);
|
|
28063
28162
|
reader.exitPath();
|
|
@@ -28100,6 +28199,19 @@ function equals$c$1(existing, incoming) {
|
|
|
28100
28199
|
if (!(existing_currentPageToken === incoming_currentPageToken)) {
|
|
28101
28200
|
return false;
|
|
28102
28201
|
}
|
|
28202
|
+
const existing_columnLabels = existing.columnLabels;
|
|
28203
|
+
const incoming_columnLabels = incoming.columnLabels;
|
|
28204
|
+
// if at least one of these optionals is defined
|
|
28205
|
+
if (existing_columnLabels !== undefined || incoming_columnLabels !== undefined) {
|
|
28206
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
28207
|
+
// not equal
|
|
28208
|
+
if (existing_columnLabels === undefined || incoming_columnLabels === undefined) {
|
|
28209
|
+
return false;
|
|
28210
|
+
}
|
|
28211
|
+
if (JSONStringify$3(incoming_columnLabels) !== JSONStringify$3(existing_columnLabels)) {
|
|
28212
|
+
return false;
|
|
28213
|
+
}
|
|
28214
|
+
}
|
|
28103
28215
|
const existing_currentPageUrl = existing.currentPageUrl;
|
|
28104
28216
|
const incoming_currentPageUrl = incoming.currentPageUrl;
|
|
28105
28217
|
if (!(existing_currentPageUrl === incoming_currentPageUrl)) {
|
|
@@ -28325,10 +28437,11 @@ function createPaginationParams$7(params) {
|
|
|
28325
28437
|
}
|
|
28326
28438
|
function keyBuilder$s$2(luvio, params) {
|
|
28327
28439
|
return keyBuilder$t$2(luvio, {
|
|
28440
|
+
includeColumnLabels: params.body.includeColumnLabels || null,
|
|
28441
|
+
relatedListId: params.urlParams.relatedListId,
|
|
28328
28442
|
sortBy: params.body.sortBy || [],
|
|
28329
|
-
where: params.body.where || null,
|
|
28330
28443
|
parentRecordId: params.urlParams.parentRecordId,
|
|
28331
|
-
|
|
28444
|
+
where: params.body.where || null
|
|
28332
28445
|
});
|
|
28333
28446
|
}
|
|
28334
28447
|
function getResponseCacheKeys$h(storeKeyMap, luvio, resourceParams, response) {
|
|
@@ -28737,6 +28850,7 @@ const getRelatedListRecords_ConfigPropertyMetadata$1 = [
|
|
|
28737
28850
|
generateParamConfigMetadata$3('parentRecordId', true, 0 /* UrlParameter */, 0 /* String */, false, getRecordId18$1),
|
|
28738
28851
|
generateParamConfigMetadata$3('relatedListId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
28739
28852
|
generateParamConfigMetadata$3('fields', false, 2 /* Body */, 0 /* String */, true),
|
|
28853
|
+
generateParamConfigMetadata$3('includeColumnLabels', false, 2 /* Body */, 1 /* Boolean */),
|
|
28740
28854
|
generateParamConfigMetadata$3('optionalFields', false, 2 /* Body */, 0 /* String */, true),
|
|
28741
28855
|
generateParamConfigMetadata$3('pageSize', false, 2 /* Body */, 3 /* Integer */),
|
|
28742
28856
|
generateParamConfigMetadata$3('pageToken', false, 2 /* Body */, 0 /* String */),
|
|
@@ -30445,7 +30559,7 @@ function ingestAndBroadcast(luvio, key, config, body) {
|
|
|
30445
30559
|
});
|
|
30446
30560
|
}
|
|
30447
30561
|
function clone$2(userLayoutState) {
|
|
30448
|
-
return parse$
|
|
30562
|
+
return parse$a(stringify$9(userLayoutState));
|
|
30449
30563
|
}
|
|
30450
30564
|
// Applies optimisticUpdate to layoutUserState
|
|
30451
30565
|
// If the optimistic update can be applied, returns RecordLayoutUserStateRepresentation
|
|
@@ -30480,7 +30594,7 @@ function coerceConfigWithDefaults$2$1(untrusted, layoutUserStateInput) {
|
|
|
30480
30594
|
const config = validateAdapterConfig$L(untrusted, getLayoutUserState_ConfigPropertyNames);
|
|
30481
30595
|
if (config === null) {
|
|
30482
30596
|
// eslint-disable-next-line @salesforce/lds/no-error-in-production
|
|
30483
|
-
throw new Error(`@wire(updateLayoutUserState) invalid configuration ${stringify$
|
|
30597
|
+
throw new Error(`@wire(updateLayoutUserState) invalid configuration ${stringify$9(untrusted)}`);
|
|
30484
30598
|
}
|
|
30485
30599
|
// This will throw if layoutUserStateInput is not a valid input
|
|
30486
30600
|
validate$8(layoutUserStateInput, 'layoutUserStateInput');
|
|
@@ -33822,8 +33936,8 @@ function bindExportsTo$1(luvio) {
|
|
|
33822
33936
|
updateRecord: unwrapSnapshotData(factory$2$1),
|
|
33823
33937
|
updateRecordAvatar: unwrapSnapshotData(factory$8$1),
|
|
33824
33938
|
// One Store Enabled Adapters
|
|
33825
|
-
getObjectInfo: getLuvioOrOneStoreAdapter(createWireAdapterConstructor(luvio, getObjectInfo_ldsAdapter, getObjectInfoMetadata), configurationForOneStoreEnabledAdapters$2.getGetObjectInfoAdapter()),
|
|
33826
|
-
getObjectInfos: getLuvioOrOneStoreAdapter(createWireAdapterConstructor(luvio, getObjectInfos_ldsAdapter, getObjectInfosMetadata), configurationForOneStoreEnabledAdapters$2.getGetObjectInfosAdapter()),
|
|
33939
|
+
getObjectInfo: getLuvioOrOneStoreAdapter$1(createWireAdapterConstructor(luvio, getObjectInfo_ldsAdapter, getObjectInfoMetadata), configurationForOneStoreEnabledAdapters$2.getGetObjectInfoAdapter()),
|
|
33940
|
+
getObjectInfos: getLuvioOrOneStoreAdapter$1(createWireAdapterConstructor(luvio, getObjectInfos_ldsAdapter, getObjectInfosMetadata), configurationForOneStoreEnabledAdapters$2.getGetObjectInfosAdapter()),
|
|
33827
33941
|
// Imperative Adapters
|
|
33828
33942
|
unstable_getActionOverrides_imperative: createImperativeAdapter(luvio, getActionOverrides_ldsAdapter, getActionOverridesMetadata),
|
|
33829
33943
|
getAllApps_imperative: createImperativeAdapter(luvio, getAllApps_ldsAdapter, getAllAppsMetadata),
|
|
@@ -34052,7 +34166,7 @@ withDefaultLuvio((luvio) => {
|
|
|
34052
34166
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
34053
34167
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
34054
34168
|
});
|
|
34055
|
-
// version: 1.
|
|
34169
|
+
// version: 1.370.0-7c1df2520b
|
|
34056
34170
|
|
|
34057
34171
|
function requestIdleDetectedCallback(_callback) { }
|
|
34058
34172
|
function declareNotifierTaskSingle(_name) {
|
|
@@ -35718,7 +35832,7 @@ function isNameStart(code) {
|
|
|
35718
35832
|
* Given a GraphQL source, parses it into a Document.
|
|
35719
35833
|
* Throws GraphQLError if a syntax error is encountered.
|
|
35720
35834
|
*/
|
|
35721
|
-
function parse$
|
|
35835
|
+
function parse$9(source, options) {
|
|
35722
35836
|
var parser = new Parser(source, options);
|
|
35723
35837
|
return parser.parseDocument();
|
|
35724
35838
|
}
|
|
@@ -44727,7 +44841,7 @@ function buildASTSchema(documentAST, options) {
|
|
|
44727
44841
|
*/
|
|
44728
44842
|
|
|
44729
44843
|
function buildSchema(source, options) {
|
|
44730
|
-
var document = parse$
|
|
44844
|
+
var document = parse$9(source, {
|
|
44731
44845
|
noLocation: options === null || options === void 0 ? void 0 : options.noLocation,
|
|
44732
44846
|
allowLegacySDLEmptyFields: options === null || options === void 0 ? void 0 : options.allowLegacySDLEmptyFields,
|
|
44733
44847
|
allowLegacySDLImplementsInterfaces: options === null || options === void 0 ? void 0 : options.allowLegacySDLImplementsInterfaces,
|
|
@@ -45278,7 +45392,7 @@ function parseDocument(inputString) {
|
|
|
45278
45392
|
return cachedDoc;
|
|
45279
45393
|
}
|
|
45280
45394
|
// parse throws an GraphQLError in case of invalid query, should this be in try/catch?
|
|
45281
|
-
const parsedDoc = parse$
|
|
45395
|
+
const parsedDoc = parse$9(inputString, { noLocation: true });
|
|
45282
45396
|
if (!parsedDoc || parsedDoc.kind !== 'Document') {
|
|
45283
45397
|
return null;
|
|
45284
45398
|
}
|
|
@@ -45536,7 +45650,7 @@ function metaschemaMapper(doc) {
|
|
|
45536
45650
|
* @deprecated In favor of gql tagged template literal
|
|
45537
45651
|
*/
|
|
45538
45652
|
function parseAndVisit(source) {
|
|
45539
|
-
const ast = parse$
|
|
45653
|
+
const ast = parse$9(source, { noLocation: true });
|
|
45540
45654
|
const luvioDocumentNode = transform(ast);
|
|
45541
45655
|
// In-place substitution of metaschema annotations
|
|
45542
45656
|
metaschemaMapper(ast);
|
|
@@ -45635,6 +45749,15 @@ var lmrPrimingUseSoql = {
|
|
|
45635
45749
|
},
|
|
45636
45750
|
};
|
|
45637
45751
|
|
|
45752
|
+
var aggressiveTrimCountKillSwitchGate = {
|
|
45753
|
+
isOpen: function (e) {
|
|
45754
|
+
return e.fallback;
|
|
45755
|
+
},
|
|
45756
|
+
hasError: function () {
|
|
45757
|
+
return !0;
|
|
45758
|
+
},
|
|
45759
|
+
};
|
|
45760
|
+
|
|
45638
45761
|
var graphqlL2AdapterGate = {
|
|
45639
45762
|
isOpen: function (e) {
|
|
45640
45763
|
return e.fallback;
|
|
@@ -45733,7 +45856,7 @@ function setServices(services) {
|
|
|
45733
45856
|
*/
|
|
45734
45857
|
|
|
45735
45858
|
|
|
45736
|
-
const { parse: parse$
|
|
45859
|
+
const { parse: parse$7, stringify: stringify$7 } = JSON;
|
|
45737
45860
|
const { join: join$1, push: push$2, unshift } = Array.prototype;
|
|
45738
45861
|
const { isArray: isArray$5 } = Array;
|
|
45739
45862
|
const { entries: entries$4, keys: keys$6 } = Object;
|
|
@@ -46031,10 +46154,10 @@ function getTransactionKey(req) {
|
|
|
46031
46154
|
const { resourceRequest } = req;
|
|
46032
46155
|
const { baseUri, basePath, queryParams, headers } = resourceRequest;
|
|
46033
46156
|
const path = `${baseUri}${basePath}`;
|
|
46034
|
-
const queryParamsString = queryParams ? stringify$
|
|
46035
|
-
const headersString = stringify$
|
|
46157
|
+
const queryParamsString = queryParams ? stringify$7(queryParams) : EMPTY_STRING;
|
|
46158
|
+
const headersString = stringify$7(headers);
|
|
46036
46159
|
const bodyString = resourceRequest.body && isResourceRequestDedupable(req)
|
|
46037
|
-
? stringify$
|
|
46160
|
+
? stringify$7(resourceRequest.body)
|
|
46038
46161
|
: EMPTY_STRING;
|
|
46039
46162
|
return `${path}${TRANSACTION_KEY_SEP}${headersString}${TRANSACTION_KEY_SEP}${queryParamsString}${bodyString}`;
|
|
46040
46163
|
}
|
|
@@ -46100,7 +46223,7 @@ const dedupeRequest = (req) => {
|
|
|
46100
46223
|
// extra clone (particularly when there's only 1 handler).
|
|
46101
46224
|
for (let i = 1, len = handlers.length; i < len; i++) {
|
|
46102
46225
|
const handler = handlers[i];
|
|
46103
|
-
handler.resolve(parse$
|
|
46226
|
+
handler.resolve(parse$7(stringify$7(response)));
|
|
46104
46227
|
}
|
|
46105
46228
|
handlers[0].resolve(response);
|
|
46106
46229
|
}, (error) => {
|
|
@@ -47512,7 +47635,7 @@ var QueueOperationType;
|
|
|
47512
47635
|
})(QueueOperationType || (QueueOperationType = {}));
|
|
47513
47636
|
|
|
47514
47637
|
const { keys: keys$4, create: create$4, assign: assign$3, values: values$2 } = Object;
|
|
47515
|
-
const { stringify: stringify$
|
|
47638
|
+
const { stringify: stringify$6, parse: parse$6 } = JSON;
|
|
47516
47639
|
const { isArray: isArray$4 } = Array;
|
|
47517
47640
|
|
|
47518
47641
|
class DraftSynthesisError extends Error {
|
|
@@ -48214,7 +48337,7 @@ class DurableDraftQueue {
|
|
|
48214
48337
|
}
|
|
48215
48338
|
|
|
48216
48339
|
function clone$1(obj) {
|
|
48217
|
-
return parse$
|
|
48340
|
+
return parse$6(stringify$6(obj));
|
|
48218
48341
|
}
|
|
48219
48342
|
|
|
48220
48343
|
const DRAFT_ACTION_KEY_JUNCTION = '__DraftAction__';
|
|
@@ -48673,7 +48796,7 @@ class DraftManager {
|
|
|
48673
48796
|
// We should always return an array, if the body is just a dictionary,
|
|
48674
48797
|
// stick it in an array
|
|
48675
48798
|
const body = isArray$4(action.error.body) ? action.error.body : [action.error.body];
|
|
48676
|
-
const bodyString = stringify$
|
|
48799
|
+
const bodyString = stringify$6(body);
|
|
48677
48800
|
item.error = {
|
|
48678
48801
|
status: action.error.status || 0,
|
|
48679
48802
|
ok: action.error.ok || false,
|
|
@@ -48894,7 +49017,7 @@ const { hasOwnProperty: hasOwnProperty$1 } = Object.prototype;
|
|
|
48894
49017
|
const { split, endsWith } = String.prototype;
|
|
48895
49018
|
const { from: from$1, isArray: isArray$3$1 } = Array;
|
|
48896
49019
|
const { concat: concat$2, filter: filter$2, includes: includes$2, push: push$1$1, reduce: reduce$2, shift, slice: slice$1 } = Array.prototype;
|
|
48897
|
-
const { parse: parse$
|
|
49020
|
+
const { parse: parse$5, stringify: stringify$5 } = JSON;
|
|
48898
49021
|
|
|
48899
49022
|
function isString$2(value) {
|
|
48900
49023
|
return typeof value === 'string';
|
|
@@ -55270,7 +55393,7 @@ function prepareRequest$3(luvio, config) {
|
|
|
55270
55393
|
// we have to run ingest code and look at the resulting snapshot's seenRecords.
|
|
55271
55394
|
function getCacheKeys(keySet, luvio, config, key, originalResponseBody) {
|
|
55272
55395
|
const { recordIds, layoutTypes, modes } = config;
|
|
55273
|
-
const responseBody = parse$
|
|
55396
|
+
const responseBody = parse$5(stringify$5(originalResponseBody));
|
|
55274
55397
|
eachLayout(responseBody, (apiName, recordTypeId, layout) => {
|
|
55275
55398
|
if (layout.id === null) {
|
|
55276
55399
|
return;
|
|
@@ -79686,7 +79809,7 @@ class AbstractResourceRequestActionHandler {
|
|
|
79686
79809
|
let updatedActionTargetId = undefined;
|
|
79687
79810
|
const { tag: queueActionTag, data: queueActionRequest, id: queueActionId, } = queueAction;
|
|
79688
79811
|
let { basePath, body } = queueActionRequest;
|
|
79689
|
-
let stringifiedBody = stringify$
|
|
79812
|
+
let stringifiedBody = stringify$5(body);
|
|
79690
79813
|
// for each redirected ID/key we loop over the operation to see if it needs
|
|
79691
79814
|
// to be updated
|
|
79692
79815
|
for (const { draftId, draftKey, canonicalId, canonicalKey } of redirects) {
|
|
@@ -79711,7 +79834,7 @@ class AbstractResourceRequestActionHandler {
|
|
|
79711
79834
|
data: {
|
|
79712
79835
|
...queueActionRequest,
|
|
79713
79836
|
basePath: basePath,
|
|
79714
|
-
body: parse$
|
|
79837
|
+
body: parse$5(stringifiedBody),
|
|
79715
79838
|
},
|
|
79716
79839
|
};
|
|
79717
79840
|
// item needs to be replaced with a new item at the new record key
|
|
@@ -79730,7 +79853,7 @@ class AbstractResourceRequestActionHandler {
|
|
|
79730
79853
|
data: {
|
|
79731
79854
|
...queueActionRequest,
|
|
79732
79855
|
basePath: basePath,
|
|
79733
|
-
body: parse$
|
|
79856
|
+
body: parse$5(stringifiedBody),
|
|
79734
79857
|
},
|
|
79735
79858
|
};
|
|
79736
79859
|
// item needs to be updated
|
|
@@ -80446,7 +80569,7 @@ function normalizeError$1(err) {
|
|
|
80446
80569
|
else if (typeof err === 'string') {
|
|
80447
80570
|
return new Error(err);
|
|
80448
80571
|
}
|
|
80449
|
-
return new Error(stringify$
|
|
80572
|
+
return new Error(stringify$5(err));
|
|
80450
80573
|
}
|
|
80451
80574
|
// metrics
|
|
80452
80575
|
/** GraphQL */
|
|
@@ -80482,6 +80605,10 @@ const GRAPHQL_QUERY_PARSE_ERROR = 'gql-query-parse-error';
|
|
|
80482
80605
|
const GRAPHQL_SQL_EVAL_PRECONDITION_ERROR = 'gql-sql-pre-eval-error';
|
|
80483
80606
|
const GRAPHQL_CREATE_SNAPSHOT_ERROR = 'gql-create-snapshot-error';
|
|
80484
80607
|
const DRAFT_AWARE_CREATE_CONTENT_DOCUMENT_AND_VERSION_ERROR = 'draft-aware-create-content-document-and-version-error';
|
|
80608
|
+
/** Garbage Collection */
|
|
80609
|
+
const GARBAGE_COLLECTION_AGGRESSIVE_TRIM_COUNT = 'garbage-collection-aggressive-trim-count';
|
|
80610
|
+
const GARBAGE_COLLECTION_AGGRESSIVE_TRIM_RECORDS_TRIMMED = 'garbage-collection-aggressive-trim-records-trimmed';
|
|
80611
|
+
const GARBAGE_COLLECTION_AGGRESSIVE_TRIM_TOTAL_RECORDS_BEFORE_TRIM = 'garbage-collection-aggressive-trim-total-records-before-trim';
|
|
80485
80612
|
const ldsMobileInstrumentation$2 = getInstrumentation();
|
|
80486
80613
|
const nimbusLogger = typeof __nimbus !== 'undefined' &&
|
|
80487
80614
|
__nimbus.plugins !== undefined &&
|
|
@@ -80622,6 +80749,12 @@ function reportChunkCandidateUrlLength(urlLength) {
|
|
|
80622
80749
|
const buckets = [8000, 10000, 12000, 14000, 16000];
|
|
80623
80750
|
ldsMobileInstrumentation$2.bucketValue('chunk-candidate-url-length-histogram', urlLength, buckets);
|
|
80624
80751
|
}
|
|
80752
|
+
/** Garbage Collection */
|
|
80753
|
+
function reportAggressiveTrimTriggered(trimCount, beforeTrimRecordCount, totalRecordsTrimmed) {
|
|
80754
|
+
ldsMobileInstrumentation$2.trackValue(GARBAGE_COLLECTION_AGGRESSIVE_TRIM_COUNT, trimCount);
|
|
80755
|
+
ldsMobileInstrumentation$2.trackValue(GARBAGE_COLLECTION_AGGRESSIVE_TRIM_TOTAL_RECORDS_BEFORE_TRIM, beforeTrimRecordCount);
|
|
80756
|
+
ldsMobileInstrumentation$2.trackValue(GARBAGE_COLLECTION_AGGRESSIVE_TRIM_RECORDS_TRIMMED, totalRecordsTrimmed);
|
|
80757
|
+
}
|
|
80625
80758
|
|
|
80626
80759
|
const QUICK_ACTION_HANDLER = 'QUICK_ACTION_HANDLER';
|
|
80627
80760
|
class QuickActionExecutionRepresentationHandler extends AbstractQuickActionHandler {
|
|
@@ -81549,7 +81682,7 @@ function recordLoaderFactory(query) {
|
|
|
81549
81682
|
rows.forEach((row) => {
|
|
81550
81683
|
if (!row[0])
|
|
81551
81684
|
return null;
|
|
81552
|
-
const record = parse$
|
|
81685
|
+
const record = parse$5(row[0]);
|
|
81553
81686
|
if (record.id === id) {
|
|
81554
81687
|
foundRow = record;
|
|
81555
81688
|
}
|
|
@@ -81908,7 +82041,7 @@ function dateTimePredicate(input, operator, field, alias) {
|
|
|
81908
82041
|
return dateTimeRange(range, operator, field, alias);
|
|
81909
82042
|
}
|
|
81910
82043
|
// eslint-disable-next-line @salesforce/lds/no-error-in-production
|
|
81911
|
-
throw new Error(`Where filter ${stringify$
|
|
82044
|
+
throw new Error(`Where filter ${stringify$5(input)} is not supported`);
|
|
81912
82045
|
}
|
|
81913
82046
|
function dateTimeRange(input, op, field, alias) {
|
|
81914
82047
|
const dateFunction = field.dataType === 'DateTime' ? 'datetime' : 'date';
|
|
@@ -84552,14 +84685,14 @@ function isLocalCursor(maybeCursor) {
|
|
|
84552
84685
|
typeof maybeCursor.i === 'number');
|
|
84553
84686
|
}
|
|
84554
84687
|
function encodeV1Cursor(cursor) {
|
|
84555
|
-
return base64encode(stringify$
|
|
84688
|
+
return base64encode(stringify$5(cursor));
|
|
84556
84689
|
}
|
|
84557
84690
|
const CURSOR_PARSE_ERROR = 'Unable to parse cursor';
|
|
84558
84691
|
function decodeV1Cursor(base64cursor) {
|
|
84559
84692
|
let maybeCursor;
|
|
84560
84693
|
try {
|
|
84561
84694
|
const cursorString = base64decode(base64cursor);
|
|
84562
|
-
maybeCursor = parse$
|
|
84695
|
+
maybeCursor = parse$5(cursorString);
|
|
84563
84696
|
}
|
|
84564
84697
|
catch (error) {
|
|
84565
84698
|
let message = CURSOR_PARSE_ERROR;
|
|
@@ -84763,7 +84896,7 @@ async function readPaginationMetadataForKeys(keys, query) {
|
|
|
84763
84896
|
const results = await query(sql, keys.map((k) => k + '__pagination'));
|
|
84764
84897
|
for (let row of results.rows) {
|
|
84765
84898
|
let key = row[0].replace(/__pagination$/, '');
|
|
84766
|
-
let metadata = parse$
|
|
84899
|
+
let metadata = parse$5(row[1]);
|
|
84767
84900
|
metadataMap.set(key, metadata);
|
|
84768
84901
|
}
|
|
84769
84902
|
return metadataMap;
|
|
@@ -84869,8 +85002,8 @@ async function connectionResolver(obj, args, context, info) {
|
|
|
84869
85002
|
//map each sql result with the ingestion timestamp to pass it down a level
|
|
84870
85003
|
let records = results.rows.map((row, index) => {
|
|
84871
85004
|
const recordMetadataResult = {
|
|
84872
|
-
recordRepresentation: parse$
|
|
84873
|
-
metadata: parse$
|
|
85005
|
+
recordRepresentation: parse$5(row[0]),
|
|
85006
|
+
metadata: parse$5(row[1]),
|
|
84874
85007
|
};
|
|
84875
85008
|
const { recordRepresentation, metadata } = recordMetadataResult;
|
|
84876
85009
|
context.seenRecordIds.add(recordRepresentation.id);
|
|
@@ -85321,7 +85454,7 @@ function extendSchemaWithObjectInfos(cache, objectInfoMap) {
|
|
|
85321
85454
|
return cache;
|
|
85322
85455
|
}
|
|
85323
85456
|
// parse extensions into DocumentNode to extend the schema
|
|
85324
|
-
const extensions = parse$
|
|
85457
|
+
const extensions = parse$9(typeDefs);
|
|
85325
85458
|
const polymorphicFieldTypeNames = [
|
|
85326
85459
|
...polyFieldTypeNameArr,
|
|
85327
85460
|
...cache.getPolymorphicFieldTypeNames(),
|
|
@@ -87864,7 +87997,7 @@ function draftAwareGraphQLAdapterFactory(userId, objectInfoService, store, luvio
|
|
|
87864
87997
|
const getCanonicalId = getCanonicalIdFunction(luvio);
|
|
87865
87998
|
return async function draftAwareGraphQLAdapter(config, requestContext = {}) {
|
|
87866
87999
|
//create a copy to not accidentally modify the AST in the astResolver map of luvio
|
|
87867
|
-
const copy = parse$
|
|
88000
|
+
const copy = parse$5(stringify$5(config.query));
|
|
87868
88001
|
// the injected ast has extra fields needed for eval in it
|
|
87869
88002
|
let injectedAST;
|
|
87870
88003
|
// the cursor mapped ast is passed upstream so it won't reject on our local cursors
|
|
@@ -87957,7 +88090,7 @@ function draftAwareGraphQLAdapterFactory(userId, objectInfoService, store, luvio
|
|
|
87957
88090
|
} = await evaluate({
|
|
87958
88091
|
...config,
|
|
87959
88092
|
//need to create another copy of the ast for future writes
|
|
87960
|
-
query: parse$
|
|
88093
|
+
query: parse$5(stringify$5(injectedAST)),
|
|
87961
88094
|
}, observers, { userId }, objectInfoNeeded, store, nonEvaluatedSnapshot, graphqlSchemaCache, draftFunctions, mappedCursors));
|
|
87962
88095
|
}
|
|
87963
88096
|
catch (throwable) {
|
|
@@ -88083,7 +88216,7 @@ function makeGetRecordsConfig(keyMap) {
|
|
|
88083
88216
|
|
|
88084
88217
|
function environmentAwareGraphQLBatchAdapterFactory(objectInfoService, luvio, isDraftId, buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy) {
|
|
88085
88218
|
return async function environmentAwareGraphQLBatchAdapter(config, requestContext = {}) {
|
|
88086
|
-
const batchQueryCopy = config.batchQuery.map((query) => parse$
|
|
88219
|
+
const batchQueryCopy = config.batchQuery.map((query) => parse$5(stringify$5(query)));
|
|
88087
88220
|
let injectedBatchQuery = [];
|
|
88088
88221
|
const getCanonicalId = getCanonicalIdFunction(luvio);
|
|
88089
88222
|
const draftFunctions = {
|
|
@@ -88308,7 +88441,7 @@ const recordIdGenerator = (id) => {
|
|
|
88308
88441
|
|
|
88309
88442
|
|
|
88310
88443
|
const { keys: keys$2$1, create: create$2$1, assign: assign$1$1, entries: entries$2 } = Object;
|
|
88311
|
-
const { stringify: stringify$
|
|
88444
|
+
const { stringify: stringify$4, parse: parse$4 } = JSON;
|
|
88312
88445
|
const { push: push$3, join, slice } = Array.prototype;
|
|
88313
88446
|
const { isArray: isArray$2$1, from } = Array;
|
|
88314
88447
|
|
|
@@ -88332,7 +88465,7 @@ function ldsParamsToString(params) {
|
|
|
88332
88465
|
returnParams[key] = `${value}`;
|
|
88333
88466
|
}
|
|
88334
88467
|
if (isObject(value) === true && keys$2$1(value).length > 0) {
|
|
88335
|
-
returnParams[key] = stringify$
|
|
88468
|
+
returnParams[key] = stringify$4(value);
|
|
88336
88469
|
}
|
|
88337
88470
|
}
|
|
88338
88471
|
return returnParams;
|
|
@@ -88394,13 +88527,13 @@ function stringifyIfPresent(value) {
|
|
|
88394
88527
|
if (typeof value === 'string') {
|
|
88395
88528
|
return value;
|
|
88396
88529
|
}
|
|
88397
|
-
return stringify$
|
|
88530
|
+
return stringify$4(value);
|
|
88398
88531
|
}
|
|
88399
88532
|
function parseIfPresent(value) {
|
|
88400
88533
|
if (value === undefined || value === null || value === '') {
|
|
88401
88534
|
return null;
|
|
88402
88535
|
}
|
|
88403
|
-
return parse$
|
|
88536
|
+
return parse$4(value);
|
|
88404
88537
|
}
|
|
88405
88538
|
function buildNimbusNetworkPluginRequest(resourceRequest, resourceRequestContext) {
|
|
88406
88539
|
const { basePath, baseUri, method, headers, queryParams, body } = resourceRequest;
|
|
@@ -88899,8 +89032,8 @@ function getMaxLengthPerChunkAllowed(request) {
|
|
|
88899
89032
|
// Too much work to get exact length of the final url, so use stringified json to get the rough length.
|
|
88900
89033
|
const roughUrlLengthWithoutFieldsAndOptionFields = request.basePath.length +
|
|
88901
89034
|
request.baseUri.length +
|
|
88902
|
-
(request.urlParams ? stringify$
|
|
88903
|
-
stringify$
|
|
89035
|
+
(request.urlParams ? stringify$4(request.urlParams).length : 0) +
|
|
89036
|
+
stringify$4({ ...request.queryParams, fields: {}, optionalFields: {} }).length;
|
|
88904
89037
|
return MAX_URL_LENGTH - roughUrlLengthWithoutFieldsAndOptionFields;
|
|
88905
89038
|
}
|
|
88906
89039
|
// we don't have access to the host so we cannot calculate the exact length of the url
|
|
@@ -89006,10 +89139,10 @@ class NimbusDraftQueue {
|
|
|
89006
89139
|
if (callProxyMethod === undefined) {
|
|
89007
89140
|
return Promise.reject(new Error('callProxyMethod not defined on the nimbus plugin'));
|
|
89008
89141
|
}
|
|
89009
|
-
const serializedAction = stringify$
|
|
89142
|
+
const serializedAction = stringify$5([handlerId, data]);
|
|
89010
89143
|
return new Promise((resolve, reject) => {
|
|
89011
89144
|
callProxyMethod('enqueue', serializedAction, (serializedActionResponse) => {
|
|
89012
|
-
const response = parse$
|
|
89145
|
+
const response = parse$5(serializedActionResponse);
|
|
89013
89146
|
resolve(response);
|
|
89014
89147
|
}, (errorMessage) => {
|
|
89015
89148
|
reject(new Error(errorMessage));
|
|
@@ -89030,8 +89163,8 @@ class NimbusDraftQueue {
|
|
|
89030
89163
|
return Promise.reject(new Error('callProxyMethod not defined on the nimbus plugin'));
|
|
89031
89164
|
}
|
|
89032
89165
|
return new Promise((resolve, reject) => {
|
|
89033
|
-
callProxyMethod('getQueueActions', stringify$
|
|
89034
|
-
resolve(parse$
|
|
89166
|
+
callProxyMethod('getQueueActions', stringify$5([]), (serializedQueue) => {
|
|
89167
|
+
resolve(parse$5(serializedQueue));
|
|
89035
89168
|
}, (errorMessage) => {
|
|
89036
89169
|
reject(new Error(errorMessage));
|
|
89037
89170
|
});
|
|
@@ -89042,17 +89175,17 @@ class NimbusDraftQueue {
|
|
|
89042
89175
|
if (callProxyMethod === undefined) {
|
|
89043
89176
|
return Promise.reject('callProxyMethod not defined on the nimbus plugin');
|
|
89044
89177
|
}
|
|
89045
|
-
const stringifiedArgs = stringify$
|
|
89178
|
+
const stringifiedArgs = stringify$5([action]);
|
|
89046
89179
|
return new Promise((resolve, reject) => {
|
|
89047
89180
|
callProxyMethod('getDataForAction', stringifiedArgs, (data) => {
|
|
89048
89181
|
if (data === undefined) {
|
|
89049
89182
|
resolve(undefined);
|
|
89050
89183
|
}
|
|
89051
89184
|
else {
|
|
89052
|
-
resolve(parse$
|
|
89185
|
+
resolve(parse$5(data));
|
|
89053
89186
|
}
|
|
89054
89187
|
}, (serializedError) => {
|
|
89055
|
-
reject(parse$
|
|
89188
|
+
reject(parse$5(serializedError));
|
|
89056
89189
|
});
|
|
89057
89190
|
});
|
|
89058
89191
|
}
|
|
@@ -89534,7 +89667,7 @@ function registerReportObserver(reportObserver) {
|
|
|
89534
89667
|
}
|
|
89535
89668
|
|
|
89536
89669
|
const { keys: keys$1$1, create: create$1$1, assign: assign$5, entries: entries$1, values } = Object;
|
|
89537
|
-
const { stringify: stringify$
|
|
89670
|
+
const { stringify: stringify$3, parse: parse$3 } = JSON;
|
|
89538
89671
|
|
|
89539
89672
|
function selectColumnsFromTableWhereKeyIn(columnNames, table, keyColumnName, whereIn) {
|
|
89540
89673
|
const paramList = whereIn.map(() => '?').join(',');
|
|
@@ -89547,13 +89680,13 @@ function selectColumnsFromTableWhereKeyInNamespaced(columnNames, table, keyColum
|
|
|
89547
89680
|
|
|
89548
89681
|
// These const values must be in sync with the latest
|
|
89549
89682
|
// @salesforce/nimbus-plugin-lds/sql schema file
|
|
89550
|
-
const TABLE_NAME$1 = 'lds_data';
|
|
89683
|
+
const TABLE_NAME$1$1 = 'lds_data';
|
|
89551
89684
|
const COLUMN_NAME_KEY$2 = 'key';
|
|
89552
89685
|
const COLUMN_NAME_DATA$2 = 'data';
|
|
89553
89686
|
const COLUMN_NAME_METADATA$1 = 'metadata';
|
|
89554
89687
|
class LdsDataTable {
|
|
89555
89688
|
constructor(plugin) {
|
|
89556
|
-
this.tableName = TABLE_NAME$1;
|
|
89689
|
+
this.tableName = TABLE_NAME$1$1;
|
|
89557
89690
|
this.columnNames = [COLUMN_NAME_KEY$2, COLUMN_NAME_DATA$2, COLUMN_NAME_METADATA$1];
|
|
89558
89691
|
this.conflictColumnNames = [COLUMN_NAME_KEY$2];
|
|
89559
89692
|
this.getAllQuery = `SELECT ${this.columnNames.join(',')} FROM ${this.tableName}`;
|
|
@@ -89575,7 +89708,7 @@ class LdsDataTable {
|
|
|
89575
89708
|
const [key, stringifiedMetadata] = row;
|
|
89576
89709
|
if (stringifiedMetadata !== undefined) {
|
|
89577
89710
|
entries[key] = {
|
|
89578
|
-
metadata: parse$
|
|
89711
|
+
metadata: parse$3(stringifiedMetadata),
|
|
89579
89712
|
};
|
|
89580
89713
|
}
|
|
89581
89714
|
return entries;
|
|
@@ -89603,7 +89736,7 @@ class LdsDataTable {
|
|
|
89603
89736
|
rows: keys$1$1(entries).reduce((rows, key) => {
|
|
89604
89737
|
const entry = entries[key];
|
|
89605
89738
|
const { data, metadata } = entry;
|
|
89606
|
-
const row = [key, stringify$
|
|
89739
|
+
const row = [key, stringify$3(data), metadata ? stringify$3(metadata) : null];
|
|
89607
89740
|
rows.push(row);
|
|
89608
89741
|
return rows;
|
|
89609
89742
|
}, []),
|
|
@@ -89621,7 +89754,7 @@ class LdsDataTable {
|
|
|
89621
89754
|
columns: [COLUMN_NAME_METADATA$1],
|
|
89622
89755
|
values: keys$1$1(entries).reduce((values, key) => {
|
|
89623
89756
|
const { metadata } = entries[key];
|
|
89624
|
-
const row = [metadata ? stringify$
|
|
89757
|
+
const row = [metadata ? stringify$3(metadata) : null];
|
|
89625
89758
|
values[key] = row;
|
|
89626
89759
|
return values;
|
|
89627
89760
|
}, {}),
|
|
@@ -89631,10 +89764,10 @@ class LdsDataTable {
|
|
|
89631
89764
|
return sqliteResult.rows.reduce((entries, row) => {
|
|
89632
89765
|
const [key, stringifiedData, stringifiedMetadata] = row;
|
|
89633
89766
|
const durableStoreEntry = {
|
|
89634
|
-
data: parse$
|
|
89767
|
+
data: parse$3(stringifiedData),
|
|
89635
89768
|
};
|
|
89636
89769
|
if (stringifiedMetadata !== null) {
|
|
89637
|
-
durableStoreEntry.metadata = parse$
|
|
89770
|
+
durableStoreEntry.metadata = parse$3(stringifiedMetadata);
|
|
89638
89771
|
}
|
|
89639
89772
|
entries[key] = durableStoreEntry;
|
|
89640
89773
|
return entries;
|
|
@@ -89684,7 +89817,7 @@ class LdsInternalDataTable {
|
|
|
89684
89817
|
const [key, stringifiedMetadata] = row;
|
|
89685
89818
|
if (stringifiedMetadata !== undefined) {
|
|
89686
89819
|
entries[key] = {
|
|
89687
|
-
metadata: parse$
|
|
89820
|
+
metadata: parse$3(stringifiedMetadata),
|
|
89688
89821
|
};
|
|
89689
89822
|
}
|
|
89690
89823
|
return entries;
|
|
@@ -89712,9 +89845,9 @@ class LdsInternalDataTable {
|
|
|
89712
89845
|
rows: keys$1$1(entries).reduce((rows, key) => {
|
|
89713
89846
|
const entry = entries[key];
|
|
89714
89847
|
const { data, metadata } = entry;
|
|
89715
|
-
const row = [key, stringify$
|
|
89848
|
+
const row = [key, stringify$3(data)];
|
|
89716
89849
|
if (metadata) {
|
|
89717
|
-
row.push(stringify$
|
|
89850
|
+
row.push(stringify$3(metadata));
|
|
89718
89851
|
}
|
|
89719
89852
|
else {
|
|
89720
89853
|
row.push(null);
|
|
@@ -89737,7 +89870,7 @@ class LdsInternalDataTable {
|
|
|
89737
89870
|
columns: [COLUMN_NAME_METADATA],
|
|
89738
89871
|
values: keys$1$1(entries).reduce((values, key) => {
|
|
89739
89872
|
const { metadata } = entries[key];
|
|
89740
|
-
const row = [metadata ? stringify$
|
|
89873
|
+
const row = [metadata ? stringify$3(metadata) : null];
|
|
89741
89874
|
values[key] = row;
|
|
89742
89875
|
return values;
|
|
89743
89876
|
}, {}),
|
|
@@ -89749,7 +89882,7 @@ class LdsInternalDataTable {
|
|
|
89749
89882
|
if (metadata !== undefined) {
|
|
89750
89883
|
accu.push({
|
|
89751
89884
|
sql: `UPDATE ${this.tableName} SET ${COLUMN_NAME_METADATA} = ? WHERE (${COLUMN_NAME_KEY$1} IS ? AND ${COLUMN_NAME_NAMESPACE} IS ?)`,
|
|
89752
|
-
params: [stringify$
|
|
89885
|
+
params: [stringify$3(metadata), key, segment],
|
|
89753
89886
|
change: {
|
|
89754
89887
|
ids: [key],
|
|
89755
89888
|
segment,
|
|
@@ -89765,10 +89898,10 @@ class LdsInternalDataTable {
|
|
|
89765
89898
|
return sqliteResult.rows.reduce((entries, row) => {
|
|
89766
89899
|
const [key, stringifiedData, stringifiedMetadata] = row;
|
|
89767
89900
|
const durableStoreEntry = {
|
|
89768
|
-
data: parse$
|
|
89901
|
+
data: parse$3(stringifiedData),
|
|
89769
89902
|
};
|
|
89770
89903
|
if (stringifiedMetadata !== null) {
|
|
89771
|
-
durableStoreEntry.metadata = parse$
|
|
89904
|
+
durableStoreEntry.metadata = parse$3(stringifiedMetadata);
|
|
89772
89905
|
}
|
|
89773
89906
|
entries[key] = durableStoreEntry;
|
|
89774
89907
|
return entries;
|
|
@@ -89990,7 +90123,7 @@ class AbstractKeyValueDataTable {
|
|
|
89990
90123
|
columns: this.columnNames,
|
|
89991
90124
|
rows: keys$1$1(entries).reduce((rows, key) => {
|
|
89992
90125
|
const entry = entries[key];
|
|
89993
|
-
rows.push([key, stringify$
|
|
90126
|
+
rows.push([key, stringify$3(entry.data)]);
|
|
89994
90127
|
return rows;
|
|
89995
90128
|
}, []),
|
|
89996
90129
|
};
|
|
@@ -90003,7 +90136,7 @@ class AbstractKeyValueDataTable {
|
|
|
90003
90136
|
return sqliteResult.rows.reduce((entries, row) => {
|
|
90004
90137
|
const [key, stringifiedData] = row;
|
|
90005
90138
|
const durableStoreEntry = {
|
|
90006
|
-
data: parse$
|
|
90139
|
+
data: parse$3(stringifiedData),
|
|
90007
90140
|
};
|
|
90008
90141
|
entries[key] = durableStoreEntry;
|
|
90009
90142
|
return entries;
|
|
@@ -90013,10 +90146,10 @@ class AbstractKeyValueDataTable {
|
|
|
90013
90146
|
|
|
90014
90147
|
// These const values must be in sync with the latest
|
|
90015
90148
|
// @salesforce/nimbus-plugin-lds/sql schema file
|
|
90016
|
-
const TABLE_NAME = 'lds_env_drafts';
|
|
90149
|
+
const TABLE_NAME$1 = 'lds_env_drafts';
|
|
90017
90150
|
class LdsDraftsDataTable extends AbstractKeyValueDataTable {
|
|
90018
90151
|
constructor(plugin) {
|
|
90019
|
-
super(plugin, TABLE_NAME);
|
|
90152
|
+
super(plugin, TABLE_NAME$1);
|
|
90020
90153
|
}
|
|
90021
90154
|
}
|
|
90022
90155
|
|
|
@@ -91794,8 +91927,14 @@ function primingSessionFactory(config) {
|
|
|
91794
91927
|
return instrumentPrimingSession(session);
|
|
91795
91928
|
}
|
|
91796
91929
|
|
|
91797
|
-
|
|
91798
|
-
|
|
91930
|
+
// count will get reset to 0 when the module is instantated again when bootstrapped
|
|
91931
|
+
let aggressiveTrimCount = 0;
|
|
91932
|
+
const DEFAULT_MAX_RECORD_COUNT = aggressiveTrimCountKillSwitchGate.isOpen({ fallback: false })
|
|
91933
|
+
? 10000
|
|
91934
|
+
: 80000;
|
|
91935
|
+
const DEFAULT_MAX_BATCH_SIZE = aggressiveTrimCountKillSwitchGate.isOpen({ fallback: false })
|
|
91936
|
+
? 1000
|
|
91937
|
+
: 200;
|
|
91799
91938
|
async function aggressiveTrim(data, deallocateFn, options = {}) {
|
|
91800
91939
|
const maxStoreRecords = options.maxStoreRecords !== undefined ? options.maxStoreRecords : DEFAULT_MAX_RECORD_COUNT;
|
|
91801
91940
|
const batchSize = options.batchSize !== undefined ? options.batchSize : DEFAULT_MAX_BATCH_SIZE;
|
|
@@ -91827,6 +91966,9 @@ async function aggressiveTrim(data, deallocateFn, options = {}) {
|
|
|
91827
91966
|
const count = await batch();
|
|
91828
91967
|
deallocatedCount = deallocatedCount + count;
|
|
91829
91968
|
}
|
|
91969
|
+
//increment trim count and report metrics
|
|
91970
|
+
aggressiveTrimCount++;
|
|
91971
|
+
reportAggressiveTrimTriggered(aggressiveTrimCount, storeKeyLength, deallocatedCount);
|
|
91830
91972
|
const trimKeysSkipped = makeSetFilteredFromDifference(pendingTrimKeys, (key) => trimKeys.has(key) === false);
|
|
91831
91973
|
return {
|
|
91832
91974
|
deallocatedCount,
|
|
@@ -91869,7 +92011,7 @@ function setupObserver() {
|
|
|
91869
92011
|
registerReportObserver((report) => {
|
|
91870
92012
|
__nimbus.plugins.LdsObserverPlugin.logAdapterExecution({
|
|
91871
92013
|
name: report.adapterName,
|
|
91872
|
-
serializedConfig: stringify$
|
|
92014
|
+
serializedConfig: stringify$5(report.config),
|
|
91873
92015
|
status: report.result,
|
|
91874
92016
|
duration: report.executionTime,
|
|
91875
92017
|
});
|
|
@@ -91985,7 +92127,7 @@ function transformConfiguration$1$1(config) {
|
|
|
91985
92127
|
// Make a copy of the config before running transform to avoid mutating the original config
|
|
91986
92128
|
const adapterConfigCopy = {
|
|
91987
92129
|
...config,
|
|
91988
|
-
query: parse$
|
|
92130
|
+
query: parse$9(print(config.query))
|
|
91989
92131
|
};
|
|
91990
92132
|
return {
|
|
91991
92133
|
...adapterConfigCopy,
|
|
@@ -92347,7 +92489,7 @@ function transformConfiguration$2(config) {
|
|
|
92347
92489
|
const batchQueryTransformed = config.batchQuery.map((singleConfig) => {
|
|
92348
92490
|
return {
|
|
92349
92491
|
...singleConfig,
|
|
92350
|
-
query: applyMinimumFieldsToQuery(parse$
|
|
92492
|
+
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?
|
|
92351
92493
|
};
|
|
92352
92494
|
});
|
|
92353
92495
|
return {
|
|
@@ -92812,7 +92954,7 @@ class SideEffectService {
|
|
|
92812
92954
|
}
|
|
92813
92955
|
|
|
92814
92956
|
function clone(obj) {
|
|
92815
|
-
return parse$
|
|
92957
|
+
return parse$5(stringify$5(obj));
|
|
92816
92958
|
}
|
|
92817
92959
|
|
|
92818
92960
|
/* global __nimbus */
|
|
@@ -93310,7 +93452,7 @@ function createSfsSideEffectHooks(durableRecordStore) {
|
|
|
93310
93452
|
*/
|
|
93311
93453
|
const { create: create$6, freeze: freeze$3, keys: keys$7, entries } = Object;
|
|
93312
93454
|
const { isArray: isArray$1$1 } = Array;
|
|
93313
|
-
const { stringify: stringify$
|
|
93455
|
+
const { stringify: stringify$2, parse: parse$2 } = JSON;
|
|
93314
93456
|
const LogLevelMap = {
|
|
93315
93457
|
TRACE: 4,
|
|
93316
93458
|
DEBUG: 3,
|
|
@@ -93347,7 +93489,7 @@ class ConsoleLogger {
|
|
|
93347
93489
|
this.printer(this.formatter(level, message));
|
|
93348
93490
|
}
|
|
93349
93491
|
}
|
|
93350
|
-
let Ok$
|
|
93492
|
+
let Ok$1 = class Ok {
|
|
93351
93493
|
constructor(value) {
|
|
93352
93494
|
this.value = value;
|
|
93353
93495
|
}
|
|
@@ -93369,7 +93511,7 @@ let Err$1 = class Err {
|
|
|
93369
93511
|
return !this.isOk();
|
|
93370
93512
|
}
|
|
93371
93513
|
};
|
|
93372
|
-
const ok$
|
|
93514
|
+
const ok$1 = (value) => new Ok$1(value);
|
|
93373
93515
|
const err$1 = (err2) => new Err$1(err2);
|
|
93374
93516
|
function isSubscribableResult(x) {
|
|
93375
93517
|
if (typeof x !== "object" || x === null) {
|
|
@@ -93432,7 +93574,7 @@ function stableJSONStringify$2(node) {
|
|
|
93432
93574
|
return isFinite(node) ? "" + node : "null";
|
|
93433
93575
|
}
|
|
93434
93576
|
if (typeof node !== "object") {
|
|
93435
|
-
return stringify$
|
|
93577
|
+
return stringify$2(node);
|
|
93436
93578
|
}
|
|
93437
93579
|
let i;
|
|
93438
93580
|
let out;
|
|
@@ -93460,7 +93602,7 @@ function stableJSONStringify$2(node) {
|
|
|
93460
93602
|
if (out) {
|
|
93461
93603
|
out += ",";
|
|
93462
93604
|
}
|
|
93463
|
-
out += stringify$
|
|
93605
|
+
out += stringify$2(key) + ":" + value;
|
|
93464
93606
|
}
|
|
93465
93607
|
return "{" + out + "}";
|
|
93466
93608
|
}
|
|
@@ -93504,7 +93646,7 @@ let NetworkCommand$1 = class NetworkCommand extends BaseCommand {
|
|
|
93504
93646
|
return err$1(networkResult.error);
|
|
93505
93647
|
} else {
|
|
93506
93648
|
const data = networkResult.value;
|
|
93507
|
-
return ok$
|
|
93649
|
+
return ok$1({
|
|
93508
93650
|
data,
|
|
93509
93651
|
subscribe: (cb) => {
|
|
93510
93652
|
this.subscriptions.push(cb);
|
|
@@ -93523,10 +93665,10 @@ let NetworkCommand$1 = class NetworkCommand extends BaseCommand {
|
|
|
93523
93665
|
if (isSubscribableResult(newResult)) {
|
|
93524
93666
|
const value = newResult.value;
|
|
93525
93667
|
this.subscriptions.forEach((cb) => {
|
|
93526
|
-
cb(ok$
|
|
93668
|
+
cb(ok$1(value.data));
|
|
93527
93669
|
});
|
|
93528
93670
|
}
|
|
93529
|
-
return ok$
|
|
93671
|
+
return ok$1(void 0);
|
|
93530
93672
|
}
|
|
93531
93673
|
return err$1(newResult.error);
|
|
93532
93674
|
});
|
|
@@ -93534,7 +93676,7 @@ let NetworkCommand$1 = class NetworkCommand extends BaseCommand {
|
|
|
93534
93676
|
async afterRequestHooks(_options) {
|
|
93535
93677
|
}
|
|
93536
93678
|
};
|
|
93537
|
-
function buildServiceDescriptor$
|
|
93679
|
+
function buildServiceDescriptor$c() {
|
|
93538
93680
|
return {
|
|
93539
93681
|
type: "networkCommandBaseClass",
|
|
93540
93682
|
version: "1.0",
|
|
@@ -93577,7 +93719,7 @@ class AuraNetworkCommand extends NetworkCommand$1 {
|
|
|
93577
93719
|
this.afterRequestHooks({ statusCode: 200 });
|
|
93578
93720
|
} catch (e) {
|
|
93579
93721
|
}
|
|
93580
|
-
return ok$
|
|
93722
|
+
return ok$1(auraReturnValue);
|
|
93581
93723
|
}).catch((error) => {
|
|
93582
93724
|
if (!error || !error.getError) {
|
|
93583
93725
|
return err$1(toError("Failed to get error from response"));
|
|
@@ -93596,7 +93738,7 @@ class AuraNetworkCommand extends NetworkCommand$1 {
|
|
|
93596
93738
|
(response2) => {
|
|
93597
93739
|
if (response2.ok) {
|
|
93598
93740
|
return response2.json().then(
|
|
93599
|
-
(json) => ok$
|
|
93741
|
+
(json) => ok$1(json),
|
|
93600
93742
|
(reason) => err$1(toError(reason))
|
|
93601
93743
|
).finally(() => {
|
|
93602
93744
|
try {
|
|
@@ -93636,7 +93778,7 @@ class AuraNetworkCommand extends NetworkCommand$1 {
|
|
|
93636
93778
|
return resolvedPromiseLike$3(err$1(toError("Aura/Fetch network services not found")));
|
|
93637
93779
|
}
|
|
93638
93780
|
}
|
|
93639
|
-
function buildServiceDescriptor$
|
|
93781
|
+
function buildServiceDescriptor$b() {
|
|
93640
93782
|
return {
|
|
93641
93783
|
type: "auraNetworkCommandBaseClass",
|
|
93642
93784
|
version: "1.0",
|
|
@@ -93655,7 +93797,7 @@ function buildServiceDescriptor$a() {
|
|
|
93655
93797
|
* For full license text, see the LICENSE.txt file
|
|
93656
93798
|
*/
|
|
93657
93799
|
const { isArray: isArray$6 } = Array;
|
|
93658
|
-
|
|
93800
|
+
class Ok {
|
|
93659
93801
|
constructor(value) {
|
|
93660
93802
|
this.value = value;
|
|
93661
93803
|
}
|
|
@@ -93665,7 +93807,7 @@ let Ok$1 = class Ok {
|
|
|
93665
93807
|
isErr() {
|
|
93666
93808
|
return !this.isOk();
|
|
93667
93809
|
}
|
|
93668
|
-
}
|
|
93810
|
+
}
|
|
93669
93811
|
class Err {
|
|
93670
93812
|
constructor(error) {
|
|
93671
93813
|
this.error = error;
|
|
@@ -93677,7 +93819,7 @@ class Err {
|
|
|
93677
93819
|
return !this.isOk();
|
|
93678
93820
|
}
|
|
93679
93821
|
}
|
|
93680
|
-
const ok
|
|
93822
|
+
const ok = (value) => new Ok(value);
|
|
93681
93823
|
const err = (err2) => new Err(err2);
|
|
93682
93824
|
function resolvedPromiseLike$2(result) {
|
|
93683
93825
|
if (isPromiseLike$2(result)) {
|
|
@@ -93768,6 +93910,38 @@ function setOverlaps(setA, setB) {
|
|
|
93768
93910
|
}
|
|
93769
93911
|
return false;
|
|
93770
93912
|
}
|
|
93913
|
+
class CacheControlRequestRunner {
|
|
93914
|
+
constructor(readFromCache, requestFromNetwork, writeToCache) {
|
|
93915
|
+
this.readFromCacheInternal = readFromCache;
|
|
93916
|
+
this.requestFromNetworkInternal = requestFromNetwork;
|
|
93917
|
+
this.writeToCacheInternal = writeToCache;
|
|
93918
|
+
}
|
|
93919
|
+
readFromCache(cache) {
|
|
93920
|
+
const resultPromise = this.readFromCacheInternal(cache);
|
|
93921
|
+
return resultPromise.then((result) => {
|
|
93922
|
+
if (result.isErr()) {
|
|
93923
|
+
return err(result.error);
|
|
93924
|
+
}
|
|
93925
|
+
this.returnData = result;
|
|
93926
|
+
return ok(void 0);
|
|
93927
|
+
});
|
|
93928
|
+
}
|
|
93929
|
+
requestFromNetwork() {
|
|
93930
|
+
const that = this;
|
|
93931
|
+
return async function* () {
|
|
93932
|
+
const result = await that.requestFromNetworkInternal();
|
|
93933
|
+
if (result.isErr()) {
|
|
93934
|
+
that.networkError = result;
|
|
93935
|
+
} else {
|
|
93936
|
+
that.networkData = result;
|
|
93937
|
+
}
|
|
93938
|
+
yield result;
|
|
93939
|
+
}();
|
|
93940
|
+
}
|
|
93941
|
+
writeToCache(cache, networkResult) {
|
|
93942
|
+
return this.writeToCacheInternal(cache, networkResult);
|
|
93943
|
+
}
|
|
93944
|
+
}
|
|
93771
93945
|
class CacheControlCommand extends BaseCommand {
|
|
93772
93946
|
constructor(services) {
|
|
93773
93947
|
super();
|
|
@@ -93787,57 +93961,48 @@ class CacheControlCommand extends BaseCommand {
|
|
|
93787
93961
|
this.cacheControlStrategyConfig,
|
|
93788
93962
|
overrides
|
|
93789
93963
|
);
|
|
93790
|
-
|
|
93791
|
-
let returnError;
|
|
93792
|
-
const requestRunner = {
|
|
93793
|
-
readFromCache: (cache) => {
|
|
93794
|
-
const resultPromise2 = this.buildResultWithSubscribe(cache);
|
|
93795
|
-
return resultPromise2.then((result) => {
|
|
93796
|
-
if (result.isErr()) {
|
|
93797
|
-
return err(result.error);
|
|
93798
|
-
}
|
|
93799
|
-
returnData = result;
|
|
93800
|
-
return ok$1(void 0);
|
|
93801
|
-
});
|
|
93802
|
-
},
|
|
93803
|
-
requestFromNetwork: () => {
|
|
93804
|
-
const that = this;
|
|
93805
|
-
return async function* () {
|
|
93806
|
-
const result = await that.requestFromNetwork();
|
|
93807
|
-
if (result.isErr()) {
|
|
93808
|
-
returnError = result;
|
|
93809
|
-
}
|
|
93810
|
-
yield result;
|
|
93811
|
-
}();
|
|
93812
|
-
},
|
|
93813
|
-
writeToCache: (cache, networkResult) => {
|
|
93814
|
-
return this.writeToCacheAndRecordKeys(cache, networkResult);
|
|
93815
|
-
}
|
|
93816
|
-
};
|
|
93964
|
+
const requestRunner = this.buildRequestRunner();
|
|
93817
93965
|
const resultPromise = this.services.cacheController.execute(mergedCacheControlConfig, requestRunner, {
|
|
93818
93966
|
instrumentationAttributes: this.instrumentationAttributes
|
|
93819
93967
|
});
|
|
93820
93968
|
return resultPromise.then((result) => {
|
|
93821
|
-
return this.
|
|
93822
|
-
|
|
93823
|
-
|
|
93824
|
-
|
|
93825
|
-
|
|
93826
|
-
|
|
93827
|
-
|
|
93828
|
-
|
|
93829
|
-
|
|
93830
|
-
|
|
93831
|
-
if (
|
|
93832
|
-
return
|
|
93969
|
+
return this.handleCacheControllerResult(result, requestRunner);
|
|
93970
|
+
});
|
|
93971
|
+
}
|
|
93972
|
+
handleCacheControllerResult(result, requestRunner) {
|
|
93973
|
+
const { networkError, networkData, returnData } = requestRunner;
|
|
93974
|
+
return this.publishUpdatedKeys().then(() => {
|
|
93975
|
+
if (networkError) {
|
|
93976
|
+
return networkError;
|
|
93977
|
+
}
|
|
93978
|
+
if (result.isErr()) {
|
|
93979
|
+
if (networkData) {
|
|
93980
|
+
return this.constructSubscribableResult(networkData.value);
|
|
93833
93981
|
}
|
|
93834
|
-
|
|
93835
|
-
|
|
93982
|
+
return err(result.error);
|
|
93983
|
+
}
|
|
93984
|
+
if (this.subscriptions.length > 0) {
|
|
93985
|
+
this.subscribeToKeysUsed();
|
|
93986
|
+
}
|
|
93987
|
+
if (returnData === void 0) {
|
|
93988
|
+
if (networkData) {
|
|
93989
|
+
return this.constructSubscribableResult(networkData.value);
|
|
93836
93990
|
}
|
|
93837
|
-
return
|
|
93838
|
-
}
|
|
93991
|
+
return err(new Error("Cache miss after fetching from network"));
|
|
93992
|
+
}
|
|
93993
|
+
if (returnData.isOk() && this.lastEmittedData === void 0) {
|
|
93994
|
+
this.lastEmittedData = returnData.value.data;
|
|
93995
|
+
}
|
|
93996
|
+
return returnData;
|
|
93839
93997
|
});
|
|
93840
93998
|
}
|
|
93999
|
+
buildRequestRunner() {
|
|
94000
|
+
return new CacheControlRequestRunner(
|
|
94001
|
+
(cache) => this.buildResultWithSubscribe(cache),
|
|
94002
|
+
() => this.requestFromNetwork(),
|
|
94003
|
+
(cache, networkResult) => this.writeToCacheAndRecordKeys(cache, networkResult)
|
|
94004
|
+
);
|
|
94005
|
+
}
|
|
93841
94006
|
publishUpdatedKeys() {
|
|
93842
94007
|
if (this.services.pubSub) {
|
|
93843
94008
|
if (this.keysUpdated !== void 0 && this.keysUpdated.size > 0) {
|
|
@@ -93888,7 +94053,7 @@ class CacheControlCommand extends BaseCommand {
|
|
|
93888
94053
|
if (result.isErr()) {
|
|
93889
94054
|
return err(result.error);
|
|
93890
94055
|
}
|
|
93891
|
-
return ok
|
|
94056
|
+
return ok(void 0);
|
|
93892
94057
|
});
|
|
93893
94058
|
}
|
|
93894
94059
|
writeToCacheAndRecordKeys(cache, networkResult) {
|
|
@@ -93896,7 +94061,7 @@ class CacheControlCommand extends BaseCommand {
|
|
|
93896
94061
|
return this.writeToCache(recordableCache, networkResult).then((result) => {
|
|
93897
94062
|
this.instantiationTime = Date.now() / 1e3;
|
|
93898
94063
|
this.keysUpdated = recordableCache.keysUpdated;
|
|
93899
|
-
return ok
|
|
94064
|
+
return ok(result);
|
|
93900
94065
|
});
|
|
93901
94066
|
}
|
|
93902
94067
|
buildResultWithSubscribe(cache) {
|
|
@@ -93908,14 +94073,18 @@ class CacheControlCommand extends BaseCommand {
|
|
|
93908
94073
|
} else {
|
|
93909
94074
|
const data = readResult.value;
|
|
93910
94075
|
this.keysUsed = recordableCache.keysRead;
|
|
93911
|
-
return
|
|
93912
|
-
data,
|
|
93913
|
-
subscribe: this.buildSubscribe(),
|
|
93914
|
-
refresh: () => this.refresh()
|
|
93915
|
-
});
|
|
94076
|
+
return this.constructSubscribableResult(data);
|
|
93916
94077
|
}
|
|
93917
94078
|
});
|
|
93918
94079
|
}
|
|
94080
|
+
constructSubscribableResult(data) {
|
|
94081
|
+
return ok({
|
|
94082
|
+
data,
|
|
94083
|
+
// this cast is in case we need to return Network data as a fallback for caching errors
|
|
94084
|
+
subscribe: this.buildSubscribe(),
|
|
94085
|
+
refresh: () => this.refresh()
|
|
94086
|
+
});
|
|
94087
|
+
}
|
|
93919
94088
|
/**
|
|
93920
94089
|
* Builds a function that subscribes to cache changes via the pubsub service. Whenever
|
|
93921
94090
|
* relevant cache updates occur, it re-reads the data and compares it against
|
|
@@ -93947,7 +94116,7 @@ class CacheControlCommand extends BaseCommand {
|
|
|
93947
94116
|
}
|
|
93948
94117
|
if (!this.equals(this.lastEmittedData, result.value.data)) {
|
|
93949
94118
|
this.lastEmittedData = result.value.data;
|
|
93950
|
-
this.invokeConsumerCallbacks(ok
|
|
94119
|
+
this.invokeConsumerCallbacks(ok(result.value.data));
|
|
93951
94120
|
}
|
|
93952
94121
|
return result;
|
|
93953
94122
|
});
|
|
@@ -94035,7 +94204,7 @@ let AuraCacheControlCommand$1 = class AuraCacheControlCommand extends CacheContr
|
|
|
94035
94204
|
this.afterRequestHooks({ statusCode: 200 });
|
|
94036
94205
|
} catch (e) {
|
|
94037
94206
|
}
|
|
94038
|
-
return ok$
|
|
94207
|
+
return ok$1(auraReturnValue);
|
|
94039
94208
|
}).catch((error) => {
|
|
94040
94209
|
if (!error || !error.getError) {
|
|
94041
94210
|
return err$1(toError("Failed to get error from response"));
|
|
@@ -94054,7 +94223,7 @@ let AuraCacheControlCommand$1 = class AuraCacheControlCommand extends CacheContr
|
|
|
94054
94223
|
(response2) => {
|
|
94055
94224
|
if (response2.ok) {
|
|
94056
94225
|
return response2.json().then(
|
|
94057
|
-
(json) => ok$
|
|
94226
|
+
(json) => ok$1(json),
|
|
94058
94227
|
(reason) => err$1(toError(reason))
|
|
94059
94228
|
).finally(() => {
|
|
94060
94229
|
try {
|
|
@@ -94086,10 +94255,10 @@ class AuraNormalizedCacheControlCommand extends AuraCacheControlCommand$1 {
|
|
|
94086
94255
|
const data = this.buildResultType().query(cache, this.buildQuery());
|
|
94087
94256
|
if (data.isErr()) {
|
|
94088
94257
|
return resolvedPromiseLike$3(
|
|
94089
|
-
err$1(new Error(`Failed to build data from type: ${stringify$
|
|
94258
|
+
err$1(new Error(`Failed to build data from type: ${stringify$2(data.error)}`))
|
|
94090
94259
|
);
|
|
94091
94260
|
}
|
|
94092
|
-
return resolvedPromiseLike$3(ok$
|
|
94261
|
+
return resolvedPromiseLike$3(ok$1(data.value));
|
|
94093
94262
|
}
|
|
94094
94263
|
writeToCache(cache, networkResult) {
|
|
94095
94264
|
if (networkResult.isOk()) {
|
|
@@ -94101,7 +94270,7 @@ class AuraNormalizedCacheControlCommand extends AuraCacheControlCommand$1 {
|
|
|
94101
94270
|
return resolvedPromiseLike$3(void 0);
|
|
94102
94271
|
}
|
|
94103
94272
|
}
|
|
94104
|
-
function buildServiceDescriptor$
|
|
94273
|
+
function buildServiceDescriptor$a() {
|
|
94105
94274
|
return {
|
|
94106
94275
|
type: "auraNormalizedCacheControlCommand",
|
|
94107
94276
|
version: "1.0",
|
|
@@ -94166,7 +94335,7 @@ class AuraCacheControlCommand extends CacheControlCommand {
|
|
|
94166
94335
|
this.afterRequestHooks({ statusCode: 200 });
|
|
94167
94336
|
} catch (e) {
|
|
94168
94337
|
}
|
|
94169
|
-
return ok$
|
|
94338
|
+
return ok$1(auraReturnValue);
|
|
94170
94339
|
}).catch((error) => {
|
|
94171
94340
|
if (!error || !error.getError) {
|
|
94172
94341
|
return err$1(toError("Failed to get error from response"));
|
|
@@ -94185,7 +94354,7 @@ class AuraCacheControlCommand extends CacheControlCommand {
|
|
|
94185
94354
|
(response2) => {
|
|
94186
94355
|
if (response2.ok) {
|
|
94187
94356
|
return response2.json().then(
|
|
94188
|
-
(json) => ok$
|
|
94357
|
+
(json) => ok$1(json),
|
|
94189
94358
|
(reason) => err$1(toError(reason))
|
|
94190
94359
|
).finally(() => {
|
|
94191
94360
|
try {
|
|
@@ -94222,7 +94391,7 @@ class AuraResourceCacheControlCommand extends AuraCacheControlCommand {
|
|
|
94222
94391
|
if (data === void 0) {
|
|
94223
94392
|
return resolvedPromiseLike$3(err$1(new Error("Failed to find data in cache")));
|
|
94224
94393
|
}
|
|
94225
|
-
return resolvedPromiseLike$3(ok$
|
|
94394
|
+
return resolvedPromiseLike$3(ok$1(data));
|
|
94226
94395
|
}
|
|
94227
94396
|
writeToCache(cache, networkResult) {
|
|
94228
94397
|
if (networkResult.isOk()) {
|
|
@@ -94239,7 +94408,7 @@ class AuraResourceCacheControlCommand extends AuraCacheControlCommand {
|
|
|
94239
94408
|
return `{"endpoint":${this.endpoint},"params":${stableJSONStringify$2(this.auraParams)}}`;
|
|
94240
94409
|
}
|
|
94241
94410
|
}
|
|
94242
|
-
function buildServiceDescriptor$
|
|
94411
|
+
function buildServiceDescriptor$9() {
|
|
94243
94412
|
return {
|
|
94244
94413
|
type: "auraResourceCacheControlCommand",
|
|
94245
94414
|
version: "1.0",
|
|
@@ -94277,7 +94446,7 @@ class NetworkCommand extends BaseCommand {
|
|
|
94277
94446
|
return err$1(networkResult.error);
|
|
94278
94447
|
} else {
|
|
94279
94448
|
const data = networkResult.value;
|
|
94280
|
-
return ok$
|
|
94449
|
+
return ok$1({
|
|
94281
94450
|
data,
|
|
94282
94451
|
subscribe: (cb) => {
|
|
94283
94452
|
this.subscriptions.push(cb);
|
|
@@ -94296,10 +94465,10 @@ class NetworkCommand extends BaseCommand {
|
|
|
94296
94465
|
if (isSubscribableResult(newResult)) {
|
|
94297
94466
|
const value = newResult.value;
|
|
94298
94467
|
this.subscriptions.forEach((cb) => {
|
|
94299
|
-
cb(ok$
|
|
94468
|
+
cb(ok$1(value.data));
|
|
94300
94469
|
});
|
|
94301
94470
|
}
|
|
94302
|
-
return ok$
|
|
94471
|
+
return ok$1(void 0);
|
|
94303
94472
|
}
|
|
94304
94473
|
return err$1(newResult.error);
|
|
94305
94474
|
});
|
|
@@ -94323,7 +94492,7 @@ class FetchNetworkCommand extends NetworkCommand {
|
|
|
94323
94492
|
(response2) => {
|
|
94324
94493
|
if (response2.ok) {
|
|
94325
94494
|
return response2.json().then(
|
|
94326
|
-
(json) => ok$
|
|
94495
|
+
(json) => ok$1(json),
|
|
94327
94496
|
(reason) => err$1(toError(reason))
|
|
94328
94497
|
).finally(() => {
|
|
94329
94498
|
try {
|
|
@@ -94346,7 +94515,7 @@ class FetchNetworkCommand extends NetworkCommand {
|
|
|
94346
94515
|
);
|
|
94347
94516
|
}
|
|
94348
94517
|
}
|
|
94349
|
-
function buildServiceDescriptor$
|
|
94518
|
+
function buildServiceDescriptor$8() {
|
|
94350
94519
|
return {
|
|
94351
94520
|
type: "fetchNetworkCommandBaseClass",
|
|
94352
94521
|
version: "1.0",
|
|
@@ -94383,7 +94552,7 @@ class HttpCacheControlCommand extends CacheControlCommand {
|
|
|
94383
94552
|
(response2) => {
|
|
94384
94553
|
if (response2.ok) {
|
|
94385
94554
|
return response2.json().then(
|
|
94386
|
-
(json) => ok$
|
|
94555
|
+
(json) => ok$1(json),
|
|
94387
94556
|
(reason) => err$1(toError(reason))
|
|
94388
94557
|
).finally(() => {
|
|
94389
94558
|
try {
|
|
@@ -94415,10 +94584,10 @@ class HttpNormalizedCacheControlCommand extends HttpCacheControlCommand {
|
|
|
94415
94584
|
const data = this.buildResultType().query(cache, this.buildQuery());
|
|
94416
94585
|
if (data.isErr()) {
|
|
94417
94586
|
return resolvedPromiseLike$3(
|
|
94418
|
-
err$1(new Error(`Failed to build data from type: ${stringify$
|
|
94587
|
+
err$1(new Error(`Failed to build data from type: ${stringify$2(data.error)}`))
|
|
94419
94588
|
);
|
|
94420
94589
|
}
|
|
94421
|
-
return resolvedPromiseLike$3(ok$
|
|
94590
|
+
return resolvedPromiseLike$3(ok$1(data.value));
|
|
94422
94591
|
}
|
|
94423
94592
|
writeToCache(cache, networkResult) {
|
|
94424
94593
|
if (networkResult.isOk()) {
|
|
@@ -94430,7 +94599,7 @@ class HttpNormalizedCacheControlCommand extends HttpCacheControlCommand {
|
|
|
94430
94599
|
return resolvedPromiseLike$3(void 0);
|
|
94431
94600
|
}
|
|
94432
94601
|
}
|
|
94433
|
-
function buildServiceDescriptor$
|
|
94602
|
+
function buildServiceDescriptor$7() {
|
|
94434
94603
|
return {
|
|
94435
94604
|
type: "httpNormalizedCacheControlCommand",
|
|
94436
94605
|
version: "1.0",
|
|
@@ -94448,12 +94617,12 @@ function buildServiceDescriptor$6() {
|
|
|
94448
94617
|
* All rights reserved.
|
|
94449
94618
|
* For full license text, see the LICENSE.txt file
|
|
94450
94619
|
*/
|
|
94451
|
-
const { stringify: stringify$
|
|
94452
|
-
function deepCopy(x) {
|
|
94453
|
-
const stringified = stringify$
|
|
94454
|
-
return stringified ? parse$
|
|
94620
|
+
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
94621
|
+
function deepCopy$1(x) {
|
|
94622
|
+
const stringified = stringify$1(x);
|
|
94623
|
+
return stringified ? parse$1(stringified) : void 0;
|
|
94455
94624
|
}
|
|
94456
|
-
class DefaultRecordableCache {
|
|
94625
|
+
let DefaultRecordableCache$1 = class DefaultRecordableCache {
|
|
94457
94626
|
constructor(baseCache) {
|
|
94458
94627
|
this.baseCache = baseCache;
|
|
94459
94628
|
this.keysRead = /* @__PURE__ */ new Set();
|
|
@@ -94472,7 +94641,7 @@ class DefaultRecordableCache {
|
|
|
94472
94641
|
this.missingKeysRead.add(key);
|
|
94473
94642
|
}
|
|
94474
94643
|
if (options == null ? void 0 : options.copy) {
|
|
94475
|
-
return deepCopy(value);
|
|
94644
|
+
return deepCopy$1(value);
|
|
94476
94645
|
}
|
|
94477
94646
|
return value;
|
|
94478
94647
|
}
|
|
@@ -94498,13 +94667,13 @@ class DefaultRecordableCache {
|
|
|
94498
94667
|
return new DefaultRecordableCache(this);
|
|
94499
94668
|
}
|
|
94500
94669
|
filter(predicate) {
|
|
94501
|
-
return new DefaultFilteredCache(this, predicate);
|
|
94670
|
+
return new DefaultFilteredCache$1(this, predicate);
|
|
94502
94671
|
}
|
|
94503
94672
|
buildFixedTimeWritableCache(generatedTime) {
|
|
94504
|
-
return new FixedTimeWritableCache(this, generatedTime);
|
|
94673
|
+
return new FixedTimeWritableCache$1(this, generatedTime);
|
|
94505
94674
|
}
|
|
94506
|
-
}
|
|
94507
|
-
class DefaultFilteredCache {
|
|
94675
|
+
};
|
|
94676
|
+
let DefaultFilteredCache$1 = class DefaultFilteredCache {
|
|
94508
94677
|
constructor(baseCache, predicate) {
|
|
94509
94678
|
this.baseCache = baseCache;
|
|
94510
94679
|
this.predicate = predicate;
|
|
@@ -94516,7 +94685,7 @@ class DefaultFilteredCache {
|
|
|
94516
94685
|
const result = this.baseCache.get(key);
|
|
94517
94686
|
if (result && this.predicate(key, result)) {
|
|
94518
94687
|
if (options == null ? void 0 : options.copy) {
|
|
94519
|
-
return deepCopy(result);
|
|
94688
|
+
return deepCopy$1(result);
|
|
94520
94689
|
}
|
|
94521
94690
|
return result;
|
|
94522
94691
|
}
|
|
@@ -94538,7 +94707,7 @@ class DefaultFilteredCache {
|
|
|
94538
94707
|
return this.getFilteredEntries();
|
|
94539
94708
|
}
|
|
94540
94709
|
record() {
|
|
94541
|
-
return new DefaultRecordableCache(this);
|
|
94710
|
+
return new DefaultRecordableCache$1(this);
|
|
94542
94711
|
}
|
|
94543
94712
|
filter(predicate) {
|
|
94544
94713
|
return new DefaultFilteredCache(this, predicate);
|
|
@@ -94558,10 +94727,10 @@ class DefaultFilteredCache {
|
|
|
94558
94727
|
return filteredKeySet;
|
|
94559
94728
|
}
|
|
94560
94729
|
buildFixedTimeWritableCache(generatedTime) {
|
|
94561
|
-
return new FixedTimeWritableCache(this, generatedTime);
|
|
94730
|
+
return new FixedTimeWritableCache$1(this, generatedTime);
|
|
94562
94731
|
}
|
|
94563
|
-
}
|
|
94564
|
-
class FixedTimeWritableCache {
|
|
94732
|
+
};
|
|
94733
|
+
let FixedTimeWritableCache$1 = class FixedTimeWritableCache {
|
|
94565
94734
|
constructor(baseCache, generatedTime) {
|
|
94566
94735
|
this.baseCache = baseCache;
|
|
94567
94736
|
this.generatedTime = generatedTime;
|
|
@@ -94597,22 +94766,22 @@ class FixedTimeWritableCache {
|
|
|
94597
94766
|
return this.baseCache.entries();
|
|
94598
94767
|
}
|
|
94599
94768
|
record() {
|
|
94600
|
-
return new DefaultRecordableCache(this);
|
|
94769
|
+
return new DefaultRecordableCache$1(this);
|
|
94601
94770
|
}
|
|
94602
94771
|
filter(predicate) {
|
|
94603
|
-
return new DefaultFilteredCache(this, predicate);
|
|
94772
|
+
return new DefaultFilteredCache$1(this, predicate);
|
|
94604
94773
|
}
|
|
94605
94774
|
buildFixedTimeWritableCache(generatedTime) {
|
|
94606
94775
|
return new FixedTimeWritableCache(this, generatedTime);
|
|
94607
94776
|
}
|
|
94608
|
-
}
|
|
94609
|
-
class DefaultCache {
|
|
94777
|
+
};
|
|
94778
|
+
let DefaultCache$1 = class DefaultCache {
|
|
94610
94779
|
constructor() {
|
|
94611
94780
|
this.data = {};
|
|
94612
94781
|
}
|
|
94613
94782
|
get(key, options) {
|
|
94614
94783
|
if (options == null ? void 0 : options.copy) {
|
|
94615
|
-
return deepCopy(this.data[key]);
|
|
94784
|
+
return deepCopy$1(this.data[key]);
|
|
94616
94785
|
}
|
|
94617
94786
|
return this.data[key];
|
|
94618
94787
|
}
|
|
@@ -94674,20 +94843,20 @@ class DefaultCache {
|
|
|
94674
94843
|
return Object.entries(this.data);
|
|
94675
94844
|
}
|
|
94676
94845
|
record() {
|
|
94677
|
-
return new DefaultRecordableCache(this);
|
|
94846
|
+
return new DefaultRecordableCache$1(this);
|
|
94678
94847
|
}
|
|
94679
94848
|
filter(predicate) {
|
|
94680
|
-
return new DefaultFilteredCache(this, predicate);
|
|
94849
|
+
return new DefaultFilteredCache$1(this, predicate);
|
|
94681
94850
|
}
|
|
94682
94851
|
buildFixedTimeWritableCache(generatedTime) {
|
|
94683
|
-
return new FixedTimeWritableCache(this, generatedTime);
|
|
94852
|
+
return new FixedTimeWritableCache$1(this, generatedTime);
|
|
94684
94853
|
}
|
|
94685
|
-
}
|
|
94686
|
-
function buildServiceDescriptor$
|
|
94854
|
+
};
|
|
94855
|
+
function buildServiceDescriptor$6() {
|
|
94687
94856
|
return {
|
|
94688
94857
|
type: "cache",
|
|
94689
94858
|
version: "1.0",
|
|
94690
|
-
service: new DefaultCache()
|
|
94859
|
+
service: new DefaultCache$1()
|
|
94691
94860
|
};
|
|
94692
94861
|
}
|
|
94693
94862
|
|
|
@@ -94720,7 +94889,7 @@ class NoCacheCacheControlStrategy extends CacheControlStrategy {
|
|
|
94720
94889
|
const tempCache = this.filteredCache;
|
|
94721
94890
|
return new Promise(async (resolve, reject) => {
|
|
94722
94891
|
try {
|
|
94723
|
-
let readResult = ok$
|
|
94892
|
+
let readResult = ok$1(void 0);
|
|
94724
94893
|
for await (const rfnResult of this.requestRunner.requestFromNetwork()) {
|
|
94725
94894
|
if (rfnResult) {
|
|
94726
94895
|
const result = await this.services.cacheInclusionPolicy.write({
|
|
@@ -94758,13 +94927,13 @@ class MaxAgeCacheControlStrategy extends CacheControlStrategy {
|
|
|
94758
94927
|
startTime,
|
|
94759
94928
|
options == null ? void 0 : options.instrumentationAttributes
|
|
94760
94929
|
);
|
|
94761
|
-
return ok$
|
|
94930
|
+
return ok$1(void 0);
|
|
94762
94931
|
}
|
|
94763
94932
|
this.collectCacheMissInstrumentation(startTime, options == null ? void 0 : options.instrumentationAttributes);
|
|
94764
94933
|
const tempCache = this.filteredCache;
|
|
94765
94934
|
return new Promise(async (resolve, reject) => {
|
|
94766
94935
|
try {
|
|
94767
|
-
let readResult = ok$
|
|
94936
|
+
let readResult = ok$1(void 0);
|
|
94768
94937
|
for await (const rfnResult of this.requestRunner.requestFromNetwork()) {
|
|
94769
94938
|
if (rfnResult) {
|
|
94770
94939
|
const result = await this.services.cacheInclusionPolicy.write({
|
|
@@ -94780,7 +94949,7 @@ class MaxAgeCacheControlStrategy extends CacheControlStrategy {
|
|
|
94780
94949
|
readFromL1: (l1) => this.requestRunner.readFromCache(l1)
|
|
94781
94950
|
});
|
|
94782
94951
|
if (readResult.isOk()) {
|
|
94783
|
-
resolve(ok$
|
|
94952
|
+
resolve(ok$1(void 0));
|
|
94784
94953
|
}
|
|
94785
94954
|
}
|
|
94786
94955
|
return resolve(readResult);
|
|
@@ -94851,7 +95020,7 @@ class CacheController {
|
|
|
94851
95020
|
yield* this.services.cacheInclusionPolicy.findAndModify(query, cacheUpdate);
|
|
94852
95021
|
}
|
|
94853
95022
|
}
|
|
94854
|
-
function buildServiceDescriptor$
|
|
95023
|
+
function buildServiceDescriptor$5(cache, cacheInclusionPolicy) {
|
|
94855
95024
|
return {
|
|
94856
95025
|
type: "cacheController",
|
|
94857
95026
|
version: "1.0",
|
|
@@ -94859,193 +95028,6 @@ function buildServiceDescriptor$4(cache, cacheInclusionPolicy) {
|
|
|
94859
95028
|
};
|
|
94860
95029
|
}
|
|
94861
95030
|
|
|
94862
|
-
/*!
|
|
94863
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
94864
|
-
* All rights reserved.
|
|
94865
|
-
* For full license text, see the LICENSE.txt file
|
|
94866
|
-
*/
|
|
94867
|
-
class CacheInclusionPolicyService {
|
|
94868
|
-
}
|
|
94869
|
-
/*!
|
|
94870
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
94871
|
-
* All rights reserved.
|
|
94872
|
-
* For full license text, see the LICENSE.txt file
|
|
94873
|
-
*/
|
|
94874
|
-
class Ok {
|
|
94875
|
-
constructor(value) {
|
|
94876
|
-
this.value = value;
|
|
94877
|
-
}
|
|
94878
|
-
isOk() {
|
|
94879
|
-
return true;
|
|
94880
|
-
}
|
|
94881
|
-
isErr() {
|
|
94882
|
-
return !this.isOk();
|
|
94883
|
-
}
|
|
94884
|
-
}
|
|
94885
|
-
const ok = (value) => new Ok(value);
|
|
94886
|
-
function resolvedPromiseLike$1(result) {
|
|
94887
|
-
if (isPromiseLike$1(result)) {
|
|
94888
|
-
return result.then((nextResult) => nextResult);
|
|
94889
|
-
}
|
|
94890
|
-
return {
|
|
94891
|
-
then: (onFulfilled, _onRejected) => {
|
|
94892
|
-
try {
|
|
94893
|
-
return resolvedPromiseLike$1(onFulfilled(result));
|
|
94894
|
-
} catch (e) {
|
|
94895
|
-
if (onFulfilled === void 0) {
|
|
94896
|
-
return resolvedPromiseLike$1(result);
|
|
94897
|
-
}
|
|
94898
|
-
return rejectedPromiseLike$1(e);
|
|
94899
|
-
}
|
|
94900
|
-
}
|
|
94901
|
-
};
|
|
94902
|
-
}
|
|
94903
|
-
function rejectedPromiseLike$1(reason) {
|
|
94904
|
-
if (isPromiseLike$1(reason)) {
|
|
94905
|
-
return reason.then((nextResult) => nextResult);
|
|
94906
|
-
}
|
|
94907
|
-
return {
|
|
94908
|
-
then: (_onFulfilled, onRejected) => {
|
|
94909
|
-
if (typeof onRejected === "function") {
|
|
94910
|
-
try {
|
|
94911
|
-
return resolvedPromiseLike$1(onRejected(reason));
|
|
94912
|
-
} catch (e) {
|
|
94913
|
-
return rejectedPromiseLike$1(e);
|
|
94914
|
-
}
|
|
94915
|
-
}
|
|
94916
|
-
return rejectedPromiseLike$1(reason);
|
|
94917
|
-
}
|
|
94918
|
-
};
|
|
94919
|
-
}
|
|
94920
|
-
function isPromiseLike$1(x) {
|
|
94921
|
-
return typeof (x == null ? void 0 : x.then) === "function";
|
|
94922
|
-
}
|
|
94923
|
-
const isAndQuery = (query) => "$and" in query;
|
|
94924
|
-
const isOrQuery = (query) => "$or" in query;
|
|
94925
|
-
const isNotQuery = (query) => "$not" in query;
|
|
94926
|
-
const matchesMetadata = (metadataQuery, cacheControl) => {
|
|
94927
|
-
if ("cacheControlType" in metadataQuery && cacheControl.type !== metadataQuery.cacheControlType.$eq) {
|
|
94928
|
-
return false;
|
|
94929
|
-
}
|
|
94930
|
-
if ("maxAge" in metadataQuery && cacheControl.type === "max-age") {
|
|
94931
|
-
const maxAge = cacheControl.maxAge ?? 0;
|
|
94932
|
-
if (metadataQuery.maxAge.$gte !== void 0 && maxAge < metadataQuery.maxAge.$gte || metadataQuery.maxAge.$lte !== void 0 && maxAge > metadataQuery.maxAge.$lte) {
|
|
94933
|
-
return false;
|
|
94934
|
-
}
|
|
94935
|
-
}
|
|
94936
|
-
return true;
|
|
94937
|
-
};
|
|
94938
|
-
function queryToPredicate(query) {
|
|
94939
|
-
return (key, entry) => {
|
|
94940
|
-
if (!query) return false;
|
|
94941
|
-
if (isAndQuery(query))
|
|
94942
|
-
return query.$and.every((subQuery) => queryToPredicate(subQuery)(key, entry));
|
|
94943
|
-
if (isOrQuery(query))
|
|
94944
|
-
return query.$or.some((subQuery) => queryToPredicate(subQuery)(key, entry));
|
|
94945
|
-
if (isNotQuery(query)) return !queryToPredicate(query.$not)(key, entry);
|
|
94946
|
-
if ("key" in query) return matchesKey(query.key, key);
|
|
94947
|
-
if ("metadata" in query)
|
|
94948
|
-
return matchesMetadata(query.metadata, entry.metadata.cacheControl);
|
|
94949
|
-
if ("value" in query) return false;
|
|
94950
|
-
throw new Error("Unknown Query Operation");
|
|
94951
|
-
};
|
|
94952
|
-
}
|
|
94953
|
-
function matchesKey(keyQuery, key) {
|
|
94954
|
-
if ("$regex" in keyQuery) {
|
|
94955
|
-
return keyQuery.$regex.test(key);
|
|
94956
|
-
}
|
|
94957
|
-
return false;
|
|
94958
|
-
}
|
|
94959
|
-
function buildUpdate(update, existing) {
|
|
94960
|
-
switch (update.type) {
|
|
94961
|
-
case "invalidate":
|
|
94962
|
-
const updatedCacheControl = buildInvalidatedCacheControl(
|
|
94963
|
-
existing.metadata.cacheControl
|
|
94964
|
-
);
|
|
94965
|
-
return updatedCacheControl !== void 0 ? { type: "metadata", metadata: updatedCacheControl } : { type: "no-op" };
|
|
94966
|
-
default:
|
|
94967
|
-
throw new Error(`Invalid update operation: ${update.type}`);
|
|
94968
|
-
}
|
|
94969
|
-
}
|
|
94970
|
-
function buildInvalidatedCacheControl(existingCacheControl) {
|
|
94971
|
-
switch (existingCacheControl.type) {
|
|
94972
|
-
case "max-age":
|
|
94973
|
-
case "stale-while-revalidate":
|
|
94974
|
-
if (existingCacheControl.maxAge !== 0) {
|
|
94975
|
-
return {
|
|
94976
|
-
...existingCacheControl,
|
|
94977
|
-
maxAge: 0
|
|
94978
|
-
};
|
|
94979
|
-
}
|
|
94980
|
-
}
|
|
94981
|
-
return void 0;
|
|
94982
|
-
}
|
|
94983
|
-
class InMemoryCacheInclusionPolicy extends CacheInclusionPolicyService {
|
|
94984
|
-
constructor(services) {
|
|
94985
|
-
super();
|
|
94986
|
-
this.services = services;
|
|
94987
|
-
}
|
|
94988
|
-
/**
|
|
94989
|
-
* Reads data out of a single level in memory store.
|
|
94990
|
-
*/
|
|
94991
|
-
read(options) {
|
|
94992
|
-
const { l1, readFromL1 } = options;
|
|
94993
|
-
return readFromL1(l1);
|
|
94994
|
-
}
|
|
94995
|
-
/**
|
|
94996
|
-
* Writes data to a single level in memory store.
|
|
94997
|
-
*/
|
|
94998
|
-
write(options) {
|
|
94999
|
-
const { l1, writeToL1 } = options;
|
|
95000
|
-
return writeToL1(l1);
|
|
95001
|
-
}
|
|
95002
|
-
/**
|
|
95003
|
-
* Finds cache entries that match the given query.
|
|
95004
|
-
* Returns an async generator that yields `[key, entry]`.
|
|
95005
|
-
*/
|
|
95006
|
-
async *find(query) {
|
|
95007
|
-
const cache = this.services.cache;
|
|
95008
|
-
const predicate = queryToPredicate(query);
|
|
95009
|
-
const filteredEntries = cache.filter(predicate).entries();
|
|
95010
|
-
for (const entry of filteredEntries) {
|
|
95011
|
-
yield entry;
|
|
95012
|
-
}
|
|
95013
|
-
}
|
|
95014
|
-
/**
|
|
95015
|
-
* Finds and modifies cache entries that match the given query.
|
|
95016
|
-
* Extends `find(query)` and returns an async generator of modified keys.
|
|
95017
|
-
*/
|
|
95018
|
-
async *findAndModify(query, cacheUpdate) {
|
|
95019
|
-
const cache = this.services.cache;
|
|
95020
|
-
for await (const [key, value] of this.find(query)) {
|
|
95021
|
-
const update = buildUpdate(cacheUpdate, value);
|
|
95022
|
-
switch (update.type) {
|
|
95023
|
-
case "entry":
|
|
95024
|
-
this.write({
|
|
95025
|
-
l1: cache,
|
|
95026
|
-
writeToL1: (l1) => resolvedPromiseLike$1(ok(l1.set(key, update.entry)))
|
|
95027
|
-
});
|
|
95028
|
-
yield key;
|
|
95029
|
-
break;
|
|
95030
|
-
case "metadata":
|
|
95031
|
-
this.write({
|
|
95032
|
-
l1: cache,
|
|
95033
|
-
writeToL1: (l1) => resolvedPromiseLike$1(ok(l1.setMetadata(key, update.metadata)))
|
|
95034
|
-
});
|
|
95035
|
-
yield key;
|
|
95036
|
-
break;
|
|
95037
|
-
}
|
|
95038
|
-
}
|
|
95039
|
-
}
|
|
95040
|
-
}
|
|
95041
|
-
function buildInMemoryCacheInclusionPolicyService(cache) {
|
|
95042
|
-
return {
|
|
95043
|
-
service: new InMemoryCacheInclusionPolicy({ cache }),
|
|
95044
|
-
type: "cacheInclusionPolicy",
|
|
95045
|
-
version: "1.0"
|
|
95046
|
-
};
|
|
95047
|
-
}
|
|
95048
|
-
|
|
95049
95031
|
/*!
|
|
95050
95032
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
95051
95033
|
* All rights reserved.
|
|
@@ -95084,7 +95066,7 @@ function buildInstrumentCommand(services) {
|
|
|
95084
95066
|
};
|
|
95085
95067
|
};
|
|
95086
95068
|
}
|
|
95087
|
-
function buildServiceDescriptor$
|
|
95069
|
+
function buildServiceDescriptor$4(instrumentation) {
|
|
95088
95070
|
return {
|
|
95089
95071
|
type: "instrumentCommand",
|
|
95090
95072
|
version: "1.0",
|
|
@@ -95354,7 +95336,7 @@ class O11yInstrumentation {
|
|
|
95354
95336
|
this.metrics = new O11yOTelMetricsAPI(this.services);
|
|
95355
95337
|
}
|
|
95356
95338
|
}
|
|
95357
|
-
function buildServiceDescriptor$
|
|
95339
|
+
function buildServiceDescriptor$3(logger) {
|
|
95358
95340
|
return {
|
|
95359
95341
|
type: "instrumentation",
|
|
95360
95342
|
version: "1.0",
|
|
@@ -95372,41 +95354,41 @@ function buildServiceDescriptor$2(logger) {
|
|
|
95372
95354
|
* All rights reserved.
|
|
95373
95355
|
* For full license text, see the LICENSE.txt file
|
|
95374
95356
|
*/
|
|
95375
|
-
function resolvedPromiseLike(result) {
|
|
95376
|
-
if (isPromiseLike(result)) {
|
|
95357
|
+
function resolvedPromiseLike$1(result) {
|
|
95358
|
+
if (isPromiseLike$1(result)) {
|
|
95377
95359
|
return result.then((nextResult) => nextResult);
|
|
95378
95360
|
}
|
|
95379
95361
|
return {
|
|
95380
95362
|
then: (onFulfilled, _onRejected) => {
|
|
95381
95363
|
try {
|
|
95382
|
-
return resolvedPromiseLike(onFulfilled(result));
|
|
95364
|
+
return resolvedPromiseLike$1(onFulfilled(result));
|
|
95383
95365
|
} catch (e) {
|
|
95384
95366
|
if (onFulfilled === void 0) {
|
|
95385
|
-
return resolvedPromiseLike(result);
|
|
95367
|
+
return resolvedPromiseLike$1(result);
|
|
95386
95368
|
}
|
|
95387
|
-
return rejectedPromiseLike(e);
|
|
95369
|
+
return rejectedPromiseLike$1(e);
|
|
95388
95370
|
}
|
|
95389
95371
|
}
|
|
95390
95372
|
};
|
|
95391
95373
|
}
|
|
95392
|
-
function rejectedPromiseLike(reason) {
|
|
95393
|
-
if (isPromiseLike(reason)) {
|
|
95374
|
+
function rejectedPromiseLike$1(reason) {
|
|
95375
|
+
if (isPromiseLike$1(reason)) {
|
|
95394
95376
|
return reason.then((nextResult) => nextResult);
|
|
95395
95377
|
}
|
|
95396
95378
|
return {
|
|
95397
95379
|
then: (_onFulfilled, onRejected) => {
|
|
95398
95380
|
if (typeof onRejected === "function") {
|
|
95399
95381
|
try {
|
|
95400
|
-
return resolvedPromiseLike(onRejected(reason));
|
|
95382
|
+
return resolvedPromiseLike$1(onRejected(reason));
|
|
95401
95383
|
} catch (e) {
|
|
95402
|
-
return rejectedPromiseLike(e);
|
|
95384
|
+
return rejectedPromiseLike$1(e);
|
|
95403
95385
|
}
|
|
95404
95386
|
}
|
|
95405
|
-
return rejectedPromiseLike(reason);
|
|
95387
|
+
return rejectedPromiseLike$1(reason);
|
|
95406
95388
|
}
|
|
95407
95389
|
};
|
|
95408
95390
|
}
|
|
95409
|
-
function isPromiseLike(x) {
|
|
95391
|
+
function isPromiseLike$1(x) {
|
|
95410
95392
|
return typeof (x == null ? void 0 : x.then) === "function";
|
|
95411
95393
|
}
|
|
95412
95394
|
const EventTypeWildcard = Symbol("EventTypeWildcard");
|
|
@@ -95436,14 +95418,14 @@ class DefaultPubSubService {
|
|
|
95436
95418
|
return;
|
|
95437
95419
|
}
|
|
95438
95420
|
const returnVal = subscription.callback.call(subscription, event);
|
|
95439
|
-
if (isPromiseLike(returnVal)) {
|
|
95421
|
+
if (isPromiseLike$1(returnVal)) {
|
|
95440
95422
|
promises.push(returnVal);
|
|
95441
95423
|
}
|
|
95442
95424
|
});
|
|
95443
95425
|
if (promises.length > 0) {
|
|
95444
95426
|
return Promise.all(promises).then(() => void 0);
|
|
95445
95427
|
}
|
|
95446
|
-
return resolvedPromiseLike(void 0);
|
|
95428
|
+
return resolvedPromiseLike$1(void 0);
|
|
95447
95429
|
}
|
|
95448
95430
|
getSubscriptions(event) {
|
|
95449
95431
|
const eventTypeSubscriptions = this.subscriptions.get(event.type);
|
|
@@ -95464,7 +95446,7 @@ class DefaultPubSubService {
|
|
|
95464
95446
|
return matchingSubscriptions;
|
|
95465
95447
|
}
|
|
95466
95448
|
}
|
|
95467
|
-
function buildServiceDescriptor$
|
|
95449
|
+
function buildServiceDescriptor$2() {
|
|
95468
95450
|
return {
|
|
95469
95451
|
type: "pubSub",
|
|
95470
95452
|
version: "1.0",
|
|
@@ -95477,7 +95459,7 @@ function buildServiceDescriptor$1() {
|
|
|
95477
95459
|
* All rights reserved.
|
|
95478
95460
|
* For full license text, see the LICENSE.txt file
|
|
95479
95461
|
*/
|
|
95480
|
-
function buildServiceDescriptor(interceptors = { request: [], response: [] }) {
|
|
95462
|
+
function buildServiceDescriptor$1(interceptors = { request: [], response: [] }) {
|
|
95481
95463
|
return {
|
|
95482
95464
|
type: "fetch",
|
|
95483
95465
|
version: "1.0",
|
|
@@ -95511,7 +95493,7 @@ function buildNimbusFetchServiceDescriptor() {
|
|
|
95511
95493
|
});
|
|
95512
95494
|
};
|
|
95513
95495
|
return {
|
|
95514
|
-
...buildServiceDescriptor(),
|
|
95496
|
+
...buildServiceDescriptor$1(),
|
|
95515
95497
|
service: service,
|
|
95516
95498
|
};
|
|
95517
95499
|
}
|
|
@@ -95560,31 +95542,550 @@ function convertFetchParamsToResourceRequest([input, init]) {
|
|
|
95560
95542
|
};
|
|
95561
95543
|
}
|
|
95562
95544
|
|
|
95545
|
+
/*!
|
|
95546
|
+
* Copyright (c) 2022, Salesforce, Inc.,
|
|
95547
|
+
* All rights reserved.
|
|
95548
|
+
* For full license text, see the LICENSE.txt file
|
|
95549
|
+
*/
|
|
95550
|
+
class CacheInclusionPolicyService {
|
|
95551
|
+
}
|
|
95552
|
+
function setDifference(setA, setB) {
|
|
95553
|
+
const differenceSet = /* @__PURE__ */ new Set();
|
|
95554
|
+
for (const element of setA) {
|
|
95555
|
+
if (!setB.has(element)) {
|
|
95556
|
+
differenceSet.add(element);
|
|
95557
|
+
}
|
|
95558
|
+
}
|
|
95559
|
+
return differenceSet;
|
|
95560
|
+
}
|
|
95561
|
+
function resolvedPromiseLike(result) {
|
|
95562
|
+
if (isPromiseLike(result)) {
|
|
95563
|
+
return result.then((nextResult) => nextResult);
|
|
95564
|
+
}
|
|
95565
|
+
return {
|
|
95566
|
+
then: (onFulfilled, _onRejected) => {
|
|
95567
|
+
try {
|
|
95568
|
+
return resolvedPromiseLike(onFulfilled(result));
|
|
95569
|
+
} catch (e) {
|
|
95570
|
+
if (onFulfilled === void 0) {
|
|
95571
|
+
return resolvedPromiseLike(result);
|
|
95572
|
+
}
|
|
95573
|
+
return rejectedPromiseLike(e);
|
|
95574
|
+
}
|
|
95575
|
+
}
|
|
95576
|
+
};
|
|
95577
|
+
}
|
|
95578
|
+
function rejectedPromiseLike(reason) {
|
|
95579
|
+
if (isPromiseLike(reason)) {
|
|
95580
|
+
return reason.then((nextResult) => nextResult);
|
|
95581
|
+
}
|
|
95582
|
+
return {
|
|
95583
|
+
then: (_onFulfilled, onRejected) => {
|
|
95584
|
+
if (typeof onRejected === "function") {
|
|
95585
|
+
try {
|
|
95586
|
+
return resolvedPromiseLike(onRejected(reason));
|
|
95587
|
+
} catch (e) {
|
|
95588
|
+
return rejectedPromiseLike(e);
|
|
95589
|
+
}
|
|
95590
|
+
}
|
|
95591
|
+
return rejectedPromiseLike(reason);
|
|
95592
|
+
}
|
|
95593
|
+
};
|
|
95594
|
+
}
|
|
95595
|
+
function isPromiseLike(x) {
|
|
95596
|
+
return typeof (x == null ? void 0 : x.then) === "function";
|
|
95597
|
+
}
|
|
95598
|
+
/*!
|
|
95599
|
+
* Copyright (c) 2022, Salesforce, Inc.,
|
|
95600
|
+
* All rights reserved.
|
|
95601
|
+
* For full license text, see the LICENSE.txt file
|
|
95602
|
+
*/
|
|
95603
|
+
/*!
|
|
95604
|
+
* Copyright (c) 2022, Salesforce, Inc.,
|
|
95605
|
+
* All rights reserved.
|
|
95606
|
+
* For full license text, see the LICENSE.txt file
|
|
95607
|
+
*/
|
|
95608
|
+
const { stringify: stringify$8, parse: parse$8 } = JSON;
|
|
95609
|
+
function deepCopy(x) {
|
|
95610
|
+
const stringified = stringify$8(x);
|
|
95611
|
+
return stringified ? parse$8(stringified) : void 0;
|
|
95612
|
+
}
|
|
95613
|
+
class DefaultRecordableCache {
|
|
95614
|
+
constructor(baseCache) {
|
|
95615
|
+
this.baseCache = baseCache;
|
|
95616
|
+
this.keysRead = /* @__PURE__ */ new Set();
|
|
95617
|
+
this.missingKeysRead = /* @__PURE__ */ new Set();
|
|
95618
|
+
this.keysUpdated = /* @__PURE__ */ new Set();
|
|
95619
|
+
this.metadataKeysUpdated = /* @__PURE__ */ new Set();
|
|
95620
|
+
}
|
|
95621
|
+
delete(key) {
|
|
95622
|
+
this.keysUpdated.add(key);
|
|
95623
|
+
this.baseCache.delete(key);
|
|
95624
|
+
}
|
|
95625
|
+
get(key, options) {
|
|
95626
|
+
this.keysRead.add(key);
|
|
95627
|
+
const value = this.baseCache.get(key);
|
|
95628
|
+
if (value === void 0) {
|
|
95629
|
+
this.missingKeysRead.add(key);
|
|
95630
|
+
}
|
|
95631
|
+
if (options == null ? void 0 : options.copy) {
|
|
95632
|
+
return deepCopy(value);
|
|
95633
|
+
}
|
|
95634
|
+
return value;
|
|
95635
|
+
}
|
|
95636
|
+
set(key, value) {
|
|
95637
|
+
this.keysUpdated.add(key);
|
|
95638
|
+
this.metadataKeysUpdated.add(key);
|
|
95639
|
+
this.baseCache.set(key, value);
|
|
95640
|
+
}
|
|
95641
|
+
setMetadata(key, cacheControlMetadata) {
|
|
95642
|
+
this.metadataKeysUpdated.add(key);
|
|
95643
|
+
this.baseCache.setMetadata(key, cacheControlMetadata);
|
|
95644
|
+
}
|
|
95645
|
+
length() {
|
|
95646
|
+
return this.baseCache.length();
|
|
95647
|
+
}
|
|
95648
|
+
keys() {
|
|
95649
|
+
return this.baseCache.keys();
|
|
95650
|
+
}
|
|
95651
|
+
entries() {
|
|
95652
|
+
return this.baseCache.entries();
|
|
95653
|
+
}
|
|
95654
|
+
record() {
|
|
95655
|
+
return new DefaultRecordableCache(this);
|
|
95656
|
+
}
|
|
95657
|
+
filter(predicate) {
|
|
95658
|
+
return new DefaultFilteredCache(this, predicate);
|
|
95659
|
+
}
|
|
95660
|
+
buildFixedTimeWritableCache(generatedTime) {
|
|
95661
|
+
return new FixedTimeWritableCache(this, generatedTime);
|
|
95662
|
+
}
|
|
95663
|
+
}
|
|
95664
|
+
class DefaultFilteredCache {
|
|
95665
|
+
constructor(baseCache, predicate) {
|
|
95666
|
+
this.baseCache = baseCache;
|
|
95667
|
+
this.predicate = predicate;
|
|
95668
|
+
}
|
|
95669
|
+
delete(key) {
|
|
95670
|
+
this.baseCache.delete(key);
|
|
95671
|
+
}
|
|
95672
|
+
get(key, options) {
|
|
95673
|
+
const result = this.baseCache.get(key);
|
|
95674
|
+
if (result && this.predicate(key, result)) {
|
|
95675
|
+
if (options == null ? void 0 : options.copy) {
|
|
95676
|
+
return deepCopy(result);
|
|
95677
|
+
}
|
|
95678
|
+
return result;
|
|
95679
|
+
}
|
|
95680
|
+
return void 0;
|
|
95681
|
+
}
|
|
95682
|
+
set(key, value) {
|
|
95683
|
+
this.baseCache.set(key, value);
|
|
95684
|
+
}
|
|
95685
|
+
setMetadata(key, cacheControlMetadata) {
|
|
95686
|
+
this.baseCache.setMetadata(key, cacheControlMetadata);
|
|
95687
|
+
}
|
|
95688
|
+
length() {
|
|
95689
|
+
return this.getFilteredKeys().size;
|
|
95690
|
+
}
|
|
95691
|
+
keys() {
|
|
95692
|
+
return this.getFilteredKeys();
|
|
95693
|
+
}
|
|
95694
|
+
entries() {
|
|
95695
|
+
return this.getFilteredEntries();
|
|
95696
|
+
}
|
|
95697
|
+
record() {
|
|
95698
|
+
return new DefaultRecordableCache(this);
|
|
95699
|
+
}
|
|
95700
|
+
filter(predicate) {
|
|
95701
|
+
return new DefaultFilteredCache(this, predicate);
|
|
95702
|
+
}
|
|
95703
|
+
getFilteredEntries() {
|
|
95704
|
+
return this.baseCache.entries().filter(([key, _value]) => {
|
|
95705
|
+
return this.get(key);
|
|
95706
|
+
});
|
|
95707
|
+
}
|
|
95708
|
+
getFilteredKeys() {
|
|
95709
|
+
const filteredKeySet = /* @__PURE__ */ new Set();
|
|
95710
|
+
this.baseCache.keys().forEach((key) => {
|
|
95711
|
+
if (this.get(key)) {
|
|
95712
|
+
filteredKeySet.add(key);
|
|
95713
|
+
}
|
|
95714
|
+
});
|
|
95715
|
+
return filteredKeySet;
|
|
95716
|
+
}
|
|
95717
|
+
buildFixedTimeWritableCache(generatedTime) {
|
|
95718
|
+
return new FixedTimeWritableCache(this, generatedTime);
|
|
95719
|
+
}
|
|
95720
|
+
}
|
|
95721
|
+
class FixedTimeWritableCache {
|
|
95722
|
+
constructor(baseCache, generatedTime) {
|
|
95723
|
+
this.baseCache = baseCache;
|
|
95724
|
+
this.generatedTime = generatedTime;
|
|
95725
|
+
}
|
|
95726
|
+
delete(key) {
|
|
95727
|
+
this.baseCache.delete(key);
|
|
95728
|
+
}
|
|
95729
|
+
get(key, options) {
|
|
95730
|
+
return this.baseCache.get(key, options);
|
|
95731
|
+
}
|
|
95732
|
+
set(key, value) {
|
|
95733
|
+
this.baseCache.set(key, {
|
|
95734
|
+
...value,
|
|
95735
|
+
metadata: {
|
|
95736
|
+
...value.metadata,
|
|
95737
|
+
cacheControl: { ...value.metadata.cacheControl, generatedTime: this.generatedTime }
|
|
95738
|
+
}
|
|
95739
|
+
});
|
|
95740
|
+
}
|
|
95741
|
+
setMetadata(key, cacheControlMetadata) {
|
|
95742
|
+
this.baseCache.setMetadata(key, {
|
|
95743
|
+
...cacheControlMetadata,
|
|
95744
|
+
generatedTime: this.generatedTime
|
|
95745
|
+
});
|
|
95746
|
+
}
|
|
95747
|
+
length() {
|
|
95748
|
+
return this.baseCache.length();
|
|
95749
|
+
}
|
|
95750
|
+
keys() {
|
|
95751
|
+
return this.baseCache.keys();
|
|
95752
|
+
}
|
|
95753
|
+
entries() {
|
|
95754
|
+
return this.baseCache.entries();
|
|
95755
|
+
}
|
|
95756
|
+
record() {
|
|
95757
|
+
return new DefaultRecordableCache(this);
|
|
95758
|
+
}
|
|
95759
|
+
filter(predicate) {
|
|
95760
|
+
return new DefaultFilteredCache(this, predicate);
|
|
95761
|
+
}
|
|
95762
|
+
buildFixedTimeWritableCache(generatedTime) {
|
|
95763
|
+
return new FixedTimeWritableCache(this, generatedTime);
|
|
95764
|
+
}
|
|
95765
|
+
}
|
|
95766
|
+
class DefaultCache {
|
|
95767
|
+
constructor() {
|
|
95768
|
+
this.data = {};
|
|
95769
|
+
}
|
|
95770
|
+
get(key, options) {
|
|
95771
|
+
if (options == null ? void 0 : options.copy) {
|
|
95772
|
+
return deepCopy(this.data[key]);
|
|
95773
|
+
}
|
|
95774
|
+
return this.data[key];
|
|
95775
|
+
}
|
|
95776
|
+
/**
|
|
95777
|
+
* Adds the specified key/value to the cache.
|
|
95778
|
+
*
|
|
95779
|
+
* @param key key at which to store value
|
|
95780
|
+
* @param entry value to be stored
|
|
95781
|
+
*/
|
|
95782
|
+
set(key, entry) {
|
|
95783
|
+
if (entry.metadata.cacheControl.type === "no-store") {
|
|
95784
|
+
return;
|
|
95785
|
+
}
|
|
95786
|
+
this.data[key] = {
|
|
95787
|
+
...entry,
|
|
95788
|
+
metadata: {
|
|
95789
|
+
...entry.metadata,
|
|
95790
|
+
type: entry.metadata.type || {
|
|
95791
|
+
namespace: "OneStore:Internal",
|
|
95792
|
+
name: "UnknownType"
|
|
95793
|
+
},
|
|
95794
|
+
cacheControl: {
|
|
95795
|
+
generatedTime: Date.now() / 1e3,
|
|
95796
|
+
...entry.metadata.cacheControl
|
|
95797
|
+
}
|
|
95798
|
+
}
|
|
95799
|
+
};
|
|
95800
|
+
}
|
|
95801
|
+
/**
|
|
95802
|
+
* Removes the cache entry associated with the specified key.
|
|
95803
|
+
*
|
|
95804
|
+
* @param key key to be removed from the store
|
|
95805
|
+
*/
|
|
95806
|
+
delete(key) {
|
|
95807
|
+
delete this.data[key];
|
|
95808
|
+
}
|
|
95809
|
+
/**
|
|
95810
|
+
* Sets the metadata for the specified key if the key is in cache.
|
|
95811
|
+
* If the key doesn't exist, it does nothing.
|
|
95812
|
+
*
|
|
95813
|
+
* @param key key at which to store metadata
|
|
95814
|
+
* @param cacheControlMetadata metadata to be stored
|
|
95815
|
+
*/
|
|
95816
|
+
setMetadata(key, cacheControlMetadata) {
|
|
95817
|
+
if (key in this.data) {
|
|
95818
|
+
this.data[key].metadata.cacheControl = {
|
|
95819
|
+
generatedTime: Date.now() / 1e3,
|
|
95820
|
+
...cacheControlMetadata
|
|
95821
|
+
};
|
|
95822
|
+
}
|
|
95823
|
+
}
|
|
95824
|
+
length() {
|
|
95825
|
+
return this.keys().size;
|
|
95826
|
+
}
|
|
95827
|
+
keys() {
|
|
95828
|
+
return new Set(Object.keys(this.data));
|
|
95829
|
+
}
|
|
95830
|
+
entries() {
|
|
95831
|
+
return Object.entries(this.data);
|
|
95832
|
+
}
|
|
95833
|
+
record() {
|
|
95834
|
+
return new DefaultRecordableCache(this);
|
|
95835
|
+
}
|
|
95836
|
+
filter(predicate) {
|
|
95837
|
+
return new DefaultFilteredCache(this, predicate);
|
|
95838
|
+
}
|
|
95839
|
+
buildFixedTimeWritableCache(generatedTime) {
|
|
95840
|
+
return new FixedTimeWritableCache(this, generatedTime);
|
|
95841
|
+
}
|
|
95842
|
+
}
|
|
95843
|
+
function buildServiceDescriptor() {
|
|
95844
|
+
return {
|
|
95845
|
+
type: "cache",
|
|
95846
|
+
version: "1.0",
|
|
95847
|
+
service: new DefaultCache()
|
|
95848
|
+
};
|
|
95849
|
+
}
|
|
95850
|
+
class DurableCacheInclusionPolicy extends CacheInclusionPolicyService {
|
|
95851
|
+
/**
|
|
95852
|
+
* Reads data out of a 2 level inclusive store.
|
|
95853
|
+
*/
|
|
95854
|
+
read(options) {
|
|
95855
|
+
const { l1, readFromL1, alreadyRevivedKeys } = options;
|
|
95856
|
+
const recordableCache = l1.record();
|
|
95857
|
+
return readFromL1(recordableCache).then((readResult) => {
|
|
95858
|
+
if (readResult.isOk()) {
|
|
95859
|
+
return readResult;
|
|
95860
|
+
}
|
|
95861
|
+
const keysToRevive = recordableCache.keysRead;
|
|
95862
|
+
if (alreadyRevivedKeys && setDifference(keysToRevive, alreadyRevivedKeys).size === 0) {
|
|
95863
|
+
return readResult;
|
|
95864
|
+
}
|
|
95865
|
+
return this.revive(keysToRevive, l1).then((revivedKeys) => {
|
|
95866
|
+
if (setDifference(keysToRevive, revivedKeys).size > 0) {
|
|
95867
|
+
return readResult;
|
|
95868
|
+
}
|
|
95869
|
+
return this.read({ l1, readFromL1, alreadyRevivedKeys: revivedKeys });
|
|
95870
|
+
});
|
|
95871
|
+
});
|
|
95872
|
+
}
|
|
95873
|
+
/**
|
|
95874
|
+
* Writes data to a 2 level inclusive store.
|
|
95875
|
+
*/
|
|
95876
|
+
write(options) {
|
|
95877
|
+
const { l1, writeToL1 } = options;
|
|
95878
|
+
const tempL1 = buildServiceDescriptor().service.record();
|
|
95879
|
+
return writeToL1(tempL1).then(() => {
|
|
95880
|
+
const keysToReviveRecordableCache = l1.record();
|
|
95881
|
+
tempL1.keysUpdated.forEach((key) => keysToReviveRecordableCache.get(key));
|
|
95882
|
+
tempL1.missingKeysRead.forEach((key) => keysToReviveRecordableCache.get(key));
|
|
95883
|
+
const missingKeys = keysToReviveRecordableCache.missingKeysRead;
|
|
95884
|
+
const revivePromiseLike = missingKeys.size > 0 ? this.revive(missingKeys, l1).then(() => void 0) : resolvedPromiseLike(void 0);
|
|
95885
|
+
return revivePromiseLike.then(() => {
|
|
95886
|
+
const recordableCache = l1.record();
|
|
95887
|
+
return writeToL1(recordableCache).then((result) => {
|
|
95888
|
+
this.syncToL2Cache(recordableCache.keysUpdated, l1);
|
|
95889
|
+
return result;
|
|
95890
|
+
});
|
|
95891
|
+
});
|
|
95892
|
+
});
|
|
95893
|
+
}
|
|
95894
|
+
}
|
|
95895
|
+
|
|
95896
|
+
class NimbusDurableCacheInclusionPolicy extends DurableCacheInclusionPolicy {
|
|
95897
|
+
constructor(services, store) {
|
|
95898
|
+
super();
|
|
95899
|
+
this.services = services;
|
|
95900
|
+
this.store = store;
|
|
95901
|
+
this.registerListener();
|
|
95902
|
+
}
|
|
95903
|
+
revive(keys, l1) {
|
|
95904
|
+
if (keys.size === 0)
|
|
95905
|
+
return Promise.resolve(new Set());
|
|
95906
|
+
return this.store.getEntries(keys).then((entries) => {
|
|
95907
|
+
const keysRevived = new Set();
|
|
95908
|
+
if (!entries)
|
|
95909
|
+
return keysRevived;
|
|
95910
|
+
entries.forEach(({ key, entry }) => {
|
|
95911
|
+
l1.set(key, entry);
|
|
95912
|
+
keysRevived.add(key);
|
|
95913
|
+
});
|
|
95914
|
+
return keysRevived;
|
|
95915
|
+
});
|
|
95916
|
+
}
|
|
95917
|
+
syncToL2Cache(changedKeys, l1) {
|
|
95918
|
+
if (changedKeys.size === 0)
|
|
95919
|
+
return Promise.resolve();
|
|
95920
|
+
const entries = [];
|
|
95921
|
+
for (const key of changedKeys) {
|
|
95922
|
+
const entry = l1.get(key);
|
|
95923
|
+
if (entry) {
|
|
95924
|
+
entries.push({ key, entry });
|
|
95925
|
+
}
|
|
95926
|
+
}
|
|
95927
|
+
return entries.length > 0 ? this.store.setEntries(entries) : Promise.resolve();
|
|
95928
|
+
}
|
|
95929
|
+
find(_query) {
|
|
95930
|
+
throw new Error('find not supported on the NimbusDurableCacheInclusionPolicy');
|
|
95931
|
+
}
|
|
95932
|
+
findAndModify(_query, _cacheUpdate) {
|
|
95933
|
+
throw new Error('findAndModify not supported on the NimbusDurableCacheInclusionPolicy');
|
|
95934
|
+
}
|
|
95935
|
+
registerListener() {
|
|
95936
|
+
this.store.registerOnChangedListener(async (changes) => {
|
|
95937
|
+
changes.forEach((change) => {
|
|
95938
|
+
const upsertKeys = new Set();
|
|
95939
|
+
const evictKeys = new Set();
|
|
95940
|
+
for (const key of change.keys) {
|
|
95941
|
+
if (change.type === 'upsert') {
|
|
95942
|
+
upsertKeys.add(key);
|
|
95943
|
+
}
|
|
95944
|
+
else {
|
|
95945
|
+
evictKeys.add(key);
|
|
95946
|
+
}
|
|
95947
|
+
}
|
|
95948
|
+
if (upsertKeys.size > 0) {
|
|
95949
|
+
this.store.getEntries(upsertKeys).then((entries) => {
|
|
95950
|
+
if (entries === undefined)
|
|
95951
|
+
return;
|
|
95952
|
+
entries.forEach(({ key, entry }) => {
|
|
95953
|
+
this.services.cache.set(key, entry);
|
|
95954
|
+
return resolvedPromiseLike$3(ok$1(undefined));
|
|
95955
|
+
});
|
|
95956
|
+
});
|
|
95957
|
+
}
|
|
95958
|
+
// TODO: onestore doesnt support cache eviction yet
|
|
95959
|
+
// if (evictKeys.size > 0) {
|
|
95960
|
+
// evictKeys.forEach((key) => {
|
|
95961
|
+
// this.services.cache.evict(key);
|
|
95962
|
+
// });
|
|
95963
|
+
// }
|
|
95964
|
+
});
|
|
95965
|
+
});
|
|
95966
|
+
}
|
|
95967
|
+
}
|
|
95968
|
+
function buildNimbusDurableCacheInclusionPolicyService(cache, store) {
|
|
95969
|
+
return {
|
|
95970
|
+
service: new NimbusDurableCacheInclusionPolicy({ cache }, store),
|
|
95971
|
+
type: 'cacheInclusionPolicy',
|
|
95972
|
+
version: '1.0',
|
|
95973
|
+
};
|
|
95974
|
+
}
|
|
95975
|
+
|
|
95976
|
+
const TABLE_NAME = 'lds_one_store_data';
|
|
95977
|
+
class NimbusSqliteOneStoreCache {
|
|
95978
|
+
constructor(sqlStore) {
|
|
95979
|
+
this.sqlStore = sqlStore;
|
|
95980
|
+
}
|
|
95981
|
+
async getEntry(key) {
|
|
95982
|
+
const result = await this.query(`SELECT key, data, metadata FROM ${TABLE_NAME} WHERE key = ?`, [key]);
|
|
95983
|
+
if (result.rows.length === 0)
|
|
95984
|
+
return undefined;
|
|
95985
|
+
const [_key, data, metadata] = result.rows[0];
|
|
95986
|
+
return {
|
|
95987
|
+
key,
|
|
95988
|
+
entry: {
|
|
95989
|
+
value: JSON.parse(data),
|
|
95990
|
+
metadata: metadata ? JSON.parse(metadata) : undefined,
|
|
95991
|
+
},
|
|
95992
|
+
};
|
|
95993
|
+
}
|
|
95994
|
+
async getEntries(keys) {
|
|
95995
|
+
if (keys.size === 0)
|
|
95996
|
+
return undefined;
|
|
95997
|
+
const placeholders = Array(keys.size).fill('?').join(', ');
|
|
95998
|
+
const result = await this.query(`SELECT key, data, metadata FROM ${TABLE_NAME} WHERE key IN (${placeholders})`, [...keys]);
|
|
95999
|
+
if (result.rows.length === 0)
|
|
96000
|
+
return undefined;
|
|
96001
|
+
return result.rows.map((row) => {
|
|
96002
|
+
const [key, data, metadata] = row;
|
|
96003
|
+
return {
|
|
96004
|
+
key: key,
|
|
96005
|
+
entry: {
|
|
96006
|
+
value: JSON.parse(data),
|
|
96007
|
+
metadata: metadata ? JSON.parse(metadata) : undefined,
|
|
96008
|
+
},
|
|
96009
|
+
};
|
|
96010
|
+
});
|
|
96011
|
+
}
|
|
96012
|
+
async setEntry(key, entry) {
|
|
96013
|
+
return this.setEntries([{ key, entry }]);
|
|
96014
|
+
}
|
|
96015
|
+
async setEntries(entries) {
|
|
96016
|
+
if (entries.length === 0)
|
|
96017
|
+
return;
|
|
96018
|
+
const rows = entries.map(({ key, entry: { value, metadata } }) => [
|
|
96019
|
+
key,
|
|
96020
|
+
JSON.stringify(value),
|
|
96021
|
+
JSON.stringify(metadata),
|
|
96022
|
+
]);
|
|
96023
|
+
const operation = {
|
|
96024
|
+
type: 'upsert',
|
|
96025
|
+
table: TABLE_NAME,
|
|
96026
|
+
keyColumn: 'key',
|
|
96027
|
+
conflictColumns: ['key'],
|
|
96028
|
+
columns: ['key', 'data', 'metadata'],
|
|
96029
|
+
rows,
|
|
96030
|
+
context: {},
|
|
96031
|
+
};
|
|
96032
|
+
return this.batchQuery([operation]);
|
|
96033
|
+
}
|
|
96034
|
+
registerOnChangedListener(listener) {
|
|
96035
|
+
let unsubscribeId = undefined;
|
|
96036
|
+
this.sqlStore
|
|
96037
|
+
.registerOnChangedListener((changes) => {
|
|
96038
|
+
const onestoreChanges = changes.filter((change) => change.table === TABLE_NAME);
|
|
96039
|
+
return listener(onestoreChanges);
|
|
96040
|
+
})
|
|
96041
|
+
.then((id) => {
|
|
96042
|
+
unsubscribeId = id;
|
|
96043
|
+
});
|
|
96044
|
+
return () => {
|
|
96045
|
+
if (unsubscribeId === undefined)
|
|
96046
|
+
return Promise.resolve();
|
|
96047
|
+
return this.sqlStore.unsubscribeOnChangedListener(unsubscribeId);
|
|
96048
|
+
};
|
|
96049
|
+
}
|
|
96050
|
+
batchQuery(operations) {
|
|
96051
|
+
return new Promise((resolve, reject) => {
|
|
96052
|
+
this.sqlStore.batchOperations(operations, (error) => {
|
|
96053
|
+
error ? reject(error) : resolve();
|
|
96054
|
+
});
|
|
96055
|
+
});
|
|
96056
|
+
}
|
|
96057
|
+
query(sql, params) {
|
|
96058
|
+
return new Promise((resolve, reject) => {
|
|
96059
|
+
this.sqlStore.query(sql, params, resolve, reject);
|
|
96060
|
+
});
|
|
96061
|
+
}
|
|
96062
|
+
}
|
|
96063
|
+
|
|
95563
96064
|
// TODO[@W-18753648]: These services depend on WebApis that aren't available in the worker.
|
|
95564
96065
|
// import { buildServiceDescriptor as buildNdJsonServiceDescriptor } from '@luvio/command-ndjson/v1';
|
|
95565
96066
|
// import { buildServiceDescriptor as buildStreamingCommandServiceDescriptor } from '@luvio/command-streaming/v1';
|
|
95566
96067
|
// import { buildServiceDescriptor as buildSseCommandServiceDescriptor } from '@luvio/command-sse/v1';
|
|
95567
|
-
function initializeOneStore() {
|
|
96068
|
+
function initializeOneStore(sqliteStore) {
|
|
95568
96069
|
if (!useOneStore.isOpen({ fallback: true })) {
|
|
95569
96070
|
return;
|
|
95570
96071
|
}
|
|
95571
96072
|
const loggerService = new ConsoleLogger('ERROR');
|
|
95572
|
-
const cacheServiceDescriptor = buildServiceDescriptor$
|
|
95573
|
-
const instrumentationServiceDescriptor = buildServiceDescriptor$
|
|
95574
|
-
const
|
|
96073
|
+
const cacheServiceDescriptor = buildServiceDescriptor$6();
|
|
96074
|
+
const instrumentationServiceDescriptor = buildServiceDescriptor$3(loggerService);
|
|
96075
|
+
const nimbusSqliteOneStoreCacheServiceDescriptor = buildNimbusDurableCacheInclusionPolicyService(cacheServiceDescriptor.service, new NimbusSqliteOneStoreCache(sqliteStore));
|
|
95575
96076
|
const services = [
|
|
95576
96077
|
instrumentationServiceDescriptor,
|
|
95577
96078
|
buildNimbusFetchServiceDescriptor(),
|
|
95578
|
-
buildServiceDescriptor$
|
|
96079
|
+
buildServiceDescriptor$4(instrumentationServiceDescriptor.service),
|
|
95579
96080
|
// NOTE: These do not directly depend on Aura, and are necessary for HTTP fallback support.
|
|
96081
|
+
buildServiceDescriptor$b(),
|
|
95580
96082
|
buildServiceDescriptor$a(),
|
|
95581
96083
|
buildServiceDescriptor$9(),
|
|
96084
|
+
buildServiceDescriptor$5(cacheServiceDescriptor.service, nimbusSqliteOneStoreCacheServiceDescriptor.service),
|
|
95582
96085
|
buildServiceDescriptor$8(),
|
|
95583
|
-
buildServiceDescriptor$
|
|
96086
|
+
buildServiceDescriptor$c(),
|
|
95584
96087
|
buildServiceDescriptor$7(),
|
|
95585
|
-
buildServiceDescriptor$
|
|
95586
|
-
buildServiceDescriptor$6(),
|
|
95587
|
-
buildServiceDescriptor$1(),
|
|
96088
|
+
buildServiceDescriptor$2(),
|
|
95588
96089
|
// TODO[@W-18753648]: See note above.
|
|
95589
96090
|
// buildStreamingCommandServiceDescriptor(),
|
|
95590
96091
|
// buildNdJsonServiceDescriptor(),
|
|
@@ -95763,7 +96264,7 @@ function getRuntime({ primeUser = false } = {}) {
|
|
|
95763
96264
|
withRegistration('@salesforce/lds-adapters-uiapi/graphql', configureUIAPIGraphQL);
|
|
95764
96265
|
}
|
|
95765
96266
|
// onestore initialization
|
|
95766
|
-
initializeOneStore();
|
|
96267
|
+
initializeOneStore(lazyDurableStore['plugin']);
|
|
95767
96268
|
return {
|
|
95768
96269
|
luvio: lazyLuvio,
|
|
95769
96270
|
internalLuvio: lazyInternalLuvio,
|
|
@@ -95795,7 +96296,7 @@ register$1({
|
|
|
95795
96296
|
id: '@salesforce/lds-network-adapter',
|
|
95796
96297
|
instrument: instrument$2,
|
|
95797
96298
|
});
|
|
95798
|
-
// version: 1.
|
|
96299
|
+
// version: 1.370.0-3ec6ffba72
|
|
95799
96300
|
|
|
95800
96301
|
const { create: create$2, keys: keys$2 } = Object;
|
|
95801
96302
|
const { stringify, parse } = JSON;
|
|
@@ -96449,6 +96950,267 @@ function buildAdapterValidationConfig$1(displayName, paramsMeta) {
|
|
|
96449
96950
|
}
|
|
96450
96951
|
const keyPrefix$1 = 'UiApi';
|
|
96451
96952
|
|
|
96953
|
+
/**
|
|
96954
|
+
* Defines configuration for the module with a default value which can be overridden by the runtime environment.
|
|
96955
|
+
*/
|
|
96956
|
+
// A holder for a configurable adapter override
|
|
96957
|
+
let Configurable$1 = class Configurable {
|
|
96958
|
+
constructor() {
|
|
96959
|
+
this.getAdapter = () => {
|
|
96960
|
+
return this.adapter;
|
|
96961
|
+
};
|
|
96962
|
+
this.setAdapter = (value) => {
|
|
96963
|
+
this.adapter = value;
|
|
96964
|
+
};
|
|
96965
|
+
this.adapter = undefined;
|
|
96966
|
+
}
|
|
96967
|
+
};
|
|
96968
|
+
// Configurable adapters that can have environmental overrides
|
|
96969
|
+
let configurableCreateRecordAdapter$1 = new Configurable$1();
|
|
96970
|
+
let configurableUpdateRecordAdapter$1 = new Configurable$1();
|
|
96971
|
+
let configurableDeleteRecordAdapter$1 = new Configurable$1();
|
|
96972
|
+
let configurablePerformQuickActionAdapter$1 = new Configurable$1();
|
|
96973
|
+
let configurablePerformUpdateRecordQuickActionAdapter$1 = new Configurable$1();
|
|
96974
|
+
let configurableCreateContentDocumentAndVersion$1 = new Configurable$1();
|
|
96975
|
+
let configurableCreateContentVersion$1 = new Configurable$1();
|
|
96976
|
+
/**
|
|
96977
|
+
* Depth to which tracked fields will be added to a request that results from a cache miss.
|
|
96978
|
+
* A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
|
|
96979
|
+
* be reached by following 1 relationship from the root record, etc.
|
|
96980
|
+
* @defaultValue '5', replicates the current behavior
|
|
96981
|
+
*/
|
|
96982
|
+
let trackedFieldDepthOnCacheMiss$1 = 5;
|
|
96983
|
+
/**
|
|
96984
|
+
* Depth to which tracked fields will be added to a request that results from a merge conflict
|
|
96985
|
+
* A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
|
|
96986
|
+
* be reached by following 1 relationship from the root record, etc.
|
|
96987
|
+
* @defaultValue '5', replicates the current behavior
|
|
96988
|
+
*/
|
|
96989
|
+
let trackedFieldDepthOnCacheMergeConflict$1 = 5;
|
|
96990
|
+
/**
|
|
96991
|
+
* Depth to which tracked fields will be added to a request that results from a notify change invocation by the consumer
|
|
96992
|
+
* A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
|
|
96993
|
+
* be reached by following 1 relationship from the root record, etc.
|
|
96994
|
+
* @defaultValue '5', replicates the current behavior
|
|
96995
|
+
*/
|
|
96996
|
+
let trackedFieldDepthOnNotifyChange$1 = 5;
|
|
96997
|
+
/**
|
|
96998
|
+
* Determines if we will only fetch the 'Id' field for the leaf relationship record
|
|
96999
|
+
* @defaultValue 'false', replicates the current behavior and fetches all fields in the store for the leaf relationship record
|
|
97000
|
+
*/
|
|
97001
|
+
let trackedFieldLeafNodeIdAndNameOnly$1 = false;
|
|
97002
|
+
/**
|
|
97003
|
+
* One store enabled Get Object Info adapter
|
|
97004
|
+
*/
|
|
97005
|
+
let oneStoreGetObjectInfoAdapter$1 = undefined;
|
|
97006
|
+
/**
|
|
97007
|
+
* One store enabled Get Object Infos adapter
|
|
97008
|
+
*/
|
|
97009
|
+
let oneStoreGetObjectInfosAdapter$1 = undefined;
|
|
97010
|
+
/**
|
|
97011
|
+
* One store enabled GraphQL adapter
|
|
97012
|
+
*/
|
|
97013
|
+
let oneStoreGraphQLWireAdapter$1 = undefined;
|
|
97014
|
+
/**
|
|
97015
|
+
* One store enabled GraphQL imperative query adapter
|
|
97016
|
+
*/
|
|
97017
|
+
let oneStoreGraphQLImperativeQueryAdapter$1 = undefined;
|
|
97018
|
+
/**
|
|
97019
|
+
* Determines when to include PDL strategies for Related Lists
|
|
97020
|
+
*/
|
|
97021
|
+
let relatedListsPredictionsEnabled$1 = false;
|
|
97022
|
+
/**
|
|
97023
|
+
* Determines whether to include additional PDL strategies for Related Lists
|
|
97024
|
+
*/
|
|
97025
|
+
let relatedListsPlusPredictionsEnabled$1 = false;
|
|
97026
|
+
let recordRepresentationIngestionOverride$1 = undefined;
|
|
97027
|
+
/**
|
|
97028
|
+
* Defines the configuration API and is exposed internally as well as externally.
|
|
97029
|
+
* Configuration for one store enabled REST adapters only.
|
|
97030
|
+
*/
|
|
97031
|
+
const configurationForOneStoreEnabledAdapters$1 = {
|
|
97032
|
+
setGetObjectInfoAdapter: function (adapter) {
|
|
97033
|
+
oneStoreGetObjectInfoAdapter$1 = adapter;
|
|
97034
|
+
},
|
|
97035
|
+
getGetObjectInfoAdapter: function () {
|
|
97036
|
+
return oneStoreGetObjectInfoAdapter$1;
|
|
97037
|
+
},
|
|
97038
|
+
setGetObjectInfosAdapter: function (adapter) {
|
|
97039
|
+
oneStoreGetObjectInfosAdapter$1 = adapter;
|
|
97040
|
+
},
|
|
97041
|
+
getGetObjectInfosAdapter: function () {
|
|
97042
|
+
return oneStoreGetObjectInfosAdapter$1;
|
|
97043
|
+
},
|
|
97044
|
+
setGraphQLWireAdapter: function (adapter) {
|
|
97045
|
+
oneStoreGraphQLWireAdapter$1 = adapter;
|
|
97046
|
+
},
|
|
97047
|
+
getGraphQLWireAdapter: function () {
|
|
97048
|
+
return oneStoreGraphQLWireAdapter$1;
|
|
97049
|
+
},
|
|
97050
|
+
setGraphQLImperativeQueryAdapter: function (adapter) {
|
|
97051
|
+
oneStoreGraphQLImperativeQueryAdapter$1 = adapter;
|
|
97052
|
+
},
|
|
97053
|
+
getGraphQLImperativeQueryAdapter: function () {
|
|
97054
|
+
return oneStoreGraphQLImperativeQueryAdapter$1;
|
|
97055
|
+
},
|
|
97056
|
+
};
|
|
97057
|
+
/**
|
|
97058
|
+
* Helper function to return the one store adapter if it's defined, otherwise return the luvio adapter.
|
|
97059
|
+
* @param luvioAdapter - The luvio bound adapter.
|
|
97060
|
+
* @param oneStoreAdapter - The one store bound adapter.
|
|
97061
|
+
* @returns Luvio or one store wire adapter constructor.
|
|
97062
|
+
*/
|
|
97063
|
+
function getLuvioOrOneStoreAdapter(luvioAdapter, oneStoreAdapter) {
|
|
97064
|
+
return oneStoreAdapter ?? luvioAdapter;
|
|
97065
|
+
}
|
|
97066
|
+
const getKeywordSearchResultsFactory$1 = new Configurable$1();
|
|
97067
|
+
const getListRecordsByNameFactory$1 = new Configurable$1();
|
|
97068
|
+
const getListUiFactory$1 = new Configurable$1();
|
|
97069
|
+
const getLookupRecordsFactory$1 = new Configurable$1();
|
|
97070
|
+
const getQuickActionDefaultsFactory$1 = new Configurable$1();
|
|
97071
|
+
const getRecordCreateDefaultsFactory$1 = new Configurable$1();
|
|
97072
|
+
const getRecordTemplateCloneFactory$1 = new Configurable$1();
|
|
97073
|
+
const getRecordTemplateCreateFactory$1 = new Configurable$1();
|
|
97074
|
+
const getRecordUiFactory$1 = new Configurable$1();
|
|
97075
|
+
const getRecordFactory$1 = new Configurable$1();
|
|
97076
|
+
const getRecordsFactory$1 = new Configurable$1();
|
|
97077
|
+
const getRelatedListRecordsFactory$1 = new Configurable$1();
|
|
97078
|
+
const getRelatedListRecordsBatchFactory$1 = new Configurable$1();
|
|
97079
|
+
const getSearchResultsFactory$1 = new Configurable$1();
|
|
97080
|
+
// The following set of adapters all touch RecordRepresentation directly or indirectly,
|
|
97081
|
+
// so they need to support having a custom factory provided by the mobile environment.
|
|
97082
|
+
const configurationForEnvironmentFactoryOverrides$1 = {
|
|
97083
|
+
getKeywordSearchResultsAdapterFactory: getKeywordSearchResultsFactory$1.getAdapter,
|
|
97084
|
+
setGetKeywordSearchResultsAdapterFactory: getKeywordSearchResultsFactory$1.setAdapter,
|
|
97085
|
+
getListRecordsByNameAdapterFactory: getListRecordsByNameFactory$1.getAdapter,
|
|
97086
|
+
setGetListRecordsByNameAdapterFactory: getListRecordsByNameFactory$1.setAdapter,
|
|
97087
|
+
getListUiAdapterFactory: getListUiFactory$1.getAdapter,
|
|
97088
|
+
setGetListUiAdapterFactory: getListUiFactory$1.setAdapter,
|
|
97089
|
+
getLookupRecordsAdapterFactory: getLookupRecordsFactory$1.getAdapter,
|
|
97090
|
+
setGetLookupRecordsAdapterFactory: getLookupRecordsFactory$1.setAdapter,
|
|
97091
|
+
getQuickActionDefaultsAdapterFactory: getQuickActionDefaultsFactory$1.getAdapter,
|
|
97092
|
+
setGetQuickActionDefaultsAdapterFactory: getQuickActionDefaultsFactory$1.setAdapter,
|
|
97093
|
+
getRecordCreateDefaultsAdapterFactory: getRecordCreateDefaultsFactory$1.getAdapter,
|
|
97094
|
+
setGetRecordCreateDefaultsAdapterFactory: getRecordCreateDefaultsFactory$1.setAdapter,
|
|
97095
|
+
getRecordTemplateCloneAdapterFactory: getRecordTemplateCloneFactory$1.getAdapter,
|
|
97096
|
+
setGetRecordTemplateCloneAdapterFactory: getRecordTemplateCloneFactory$1.setAdapter,
|
|
97097
|
+
getRecordTemplateCreateAdapterFactory: getRecordTemplateCreateFactory$1.getAdapter,
|
|
97098
|
+
setGetRecordTemplateCreateAdapterFactory: getRecordTemplateCreateFactory$1.setAdapter,
|
|
97099
|
+
getRecordUiAdapterFactory: getRecordUiFactory$1.getAdapter,
|
|
97100
|
+
setGetRecordUiAdapterFactory: getRecordUiFactory$1.setAdapter,
|
|
97101
|
+
getRecordAdapterFactory: getRecordFactory$1.getAdapter,
|
|
97102
|
+
setGetRecordAdapterFactory: getRecordFactory$1.setAdapter,
|
|
97103
|
+
getRecordsAdapterFactory: getRecordsFactory$1.getAdapter,
|
|
97104
|
+
setGetRecordsAdapterFactory: getRecordsFactory$1.setAdapter,
|
|
97105
|
+
getRelatedListRecordsAdapterFactory: getRelatedListRecordsFactory$1.getAdapter,
|
|
97106
|
+
setGetRelatedListRecordsAdapterFactory: getRelatedListRecordsFactory$1.setAdapter,
|
|
97107
|
+
getRelatedListRecordsBatchAdapterFactory: getRelatedListRecordsBatchFactory$1.getAdapter,
|
|
97108
|
+
setGetRelatedListRecordsBatchAdapterFactory: getRelatedListRecordsBatchFactory$1.setAdapter,
|
|
97109
|
+
getSearchResultsAdapterFactory: getSearchResultsFactory$1.getAdapter,
|
|
97110
|
+
setGetSearchResultsAdapterFactory: getSearchResultsFactory$1.setAdapter,
|
|
97111
|
+
};
|
|
97112
|
+
/**
|
|
97113
|
+
* Defines the configuration API and is exposed internally as well as externally.
|
|
97114
|
+
* Configuration for REST adapters only.
|
|
97115
|
+
*/
|
|
97116
|
+
const configurationForRestAdapters$1 = {
|
|
97117
|
+
setTrackedFieldDepthOnCacheMiss: function (trackedFieldDepthOnCacheMissParam) {
|
|
97118
|
+
trackedFieldDepthOnCacheMiss$1 = trackedFieldDepthOnCacheMissParam;
|
|
97119
|
+
},
|
|
97120
|
+
getTrackedFieldDepthOnCacheMiss: function () {
|
|
97121
|
+
return trackedFieldDepthOnCacheMiss$1;
|
|
97122
|
+
},
|
|
97123
|
+
setTrackedFieldDepthOnCacheMergeConflict: function (trackedFieldDepthOnCacheMergeConflictParam) {
|
|
97124
|
+
trackedFieldDepthOnCacheMergeConflict$1 = trackedFieldDepthOnCacheMergeConflictParam;
|
|
97125
|
+
},
|
|
97126
|
+
getTrackedFieldDepthOnCacheMergeConflict: function () {
|
|
97127
|
+
return trackedFieldDepthOnCacheMergeConflict$1;
|
|
97128
|
+
},
|
|
97129
|
+
setTrackedFieldDepthOnNotifyChange: function (trackedFieldDepthOnNotifyChangeParam) {
|
|
97130
|
+
trackedFieldDepthOnNotifyChange$1 = trackedFieldDepthOnNotifyChangeParam;
|
|
97131
|
+
},
|
|
97132
|
+
getTrackedFieldDepthOnNotifyChange: function () {
|
|
97133
|
+
return trackedFieldDepthOnNotifyChange$1;
|
|
97134
|
+
},
|
|
97135
|
+
setTrackedFieldLeafNodeIdAndNameOnly: function (trackedFieldLeafNodeIdAndNameOnlyParam) {
|
|
97136
|
+
trackedFieldLeafNodeIdAndNameOnly$1 = trackedFieldLeafNodeIdAndNameOnlyParam;
|
|
97137
|
+
},
|
|
97138
|
+
getTrackedFieldLeafNodeIdAndNameOnly: function () {
|
|
97139
|
+
return trackedFieldLeafNodeIdAndNameOnly$1;
|
|
97140
|
+
},
|
|
97141
|
+
setRelatedListsPredictionsEnabled: function (f) {
|
|
97142
|
+
relatedListsPredictionsEnabled$1 = f;
|
|
97143
|
+
},
|
|
97144
|
+
areRelatedListsPredictionsEnabled: function () {
|
|
97145
|
+
return relatedListsPredictionsEnabled$1 === true;
|
|
97146
|
+
},
|
|
97147
|
+
setRelatedListsPlusPredictionsEnabled: function (f) {
|
|
97148
|
+
relatedListsPlusPredictionsEnabled$1 = f;
|
|
97149
|
+
},
|
|
97150
|
+
areRelatedListsPlusPredictionsEnabled: function () {
|
|
97151
|
+
return relatedListsPlusPredictionsEnabled$1 === true;
|
|
97152
|
+
},
|
|
97153
|
+
setRecordRepresentationIngestionOverride: function (ingest) {
|
|
97154
|
+
recordRepresentationIngestionOverride$1 = ingest;
|
|
97155
|
+
},
|
|
97156
|
+
getRecordRepresentationIngestionOverride: function () {
|
|
97157
|
+
return recordRepresentationIngestionOverride$1;
|
|
97158
|
+
},
|
|
97159
|
+
// createRecord
|
|
97160
|
+
getDraftAwareCreateRecordAdapter: configurableCreateRecordAdapter$1.getAdapter,
|
|
97161
|
+
setDraftAwareCreateRecordAdapter: configurableCreateRecordAdapter$1.setAdapter,
|
|
97162
|
+
// updateRecord
|
|
97163
|
+
getDraftAwareUpdateRecordAdapter: configurableUpdateRecordAdapter$1.getAdapter,
|
|
97164
|
+
setDraftAwareUpdateRecordAdapter: configurableUpdateRecordAdapter$1.setAdapter,
|
|
97165
|
+
// deleteRecord
|
|
97166
|
+
getDraftAwareDeleteRecordAdapter: configurableDeleteRecordAdapter$1.getAdapter,
|
|
97167
|
+
setDraftAwareDeleteRecordAdapter: configurableDeleteRecordAdapter$1.setAdapter,
|
|
97168
|
+
// performQuickAction
|
|
97169
|
+
getDraftAwarePerformQuickActionAdapter: configurablePerformQuickActionAdapter$1.getAdapter,
|
|
97170
|
+
setDraftAwarePerformQuickActionAdapter: configurablePerformQuickActionAdapter$1.setAdapter,
|
|
97171
|
+
// performRecordUpdateQuickAction
|
|
97172
|
+
getDraftAwarePerformUpdateRecordQuickActionAdapter: configurablePerformUpdateRecordQuickActionAdapter$1.getAdapter,
|
|
97173
|
+
setDraftAwarePerformUpdateRecordQuickActionAdapter: configurablePerformUpdateRecordQuickActionAdapter$1.setAdapter,
|
|
97174
|
+
// createContentDocumentAndVersion
|
|
97175
|
+
getDraftAwareCreateContentDocumentAndVersionAdapter: configurableCreateContentDocumentAndVersion$1.getAdapter,
|
|
97176
|
+
setDraftAwareCreateContentDocumentAndVersionAdapter: configurableCreateContentDocumentAndVersion$1.setAdapter,
|
|
97177
|
+
// createContentVersion
|
|
97178
|
+
getDraftAwareCreateContentVersionAdapter: configurableCreateContentVersion$1.getAdapter,
|
|
97179
|
+
setDraftAwareCreateContentVersionAdapter: configurableCreateContentVersion$1.setAdapter,
|
|
97180
|
+
...configurationForOneStoreEnabledAdapters$1,
|
|
97181
|
+
...configurationForEnvironmentFactoryOverrides$1,
|
|
97182
|
+
};
|
|
97183
|
+
let configurableGraphQLAdapter$1 = new Configurable$1();
|
|
97184
|
+
let configurableGraphQLBatchAdapter$1 = new Configurable$1();
|
|
97185
|
+
/**
|
|
97186
|
+
* Defines the configuration API and is exposed internally as well as externally.
|
|
97187
|
+
* Configuration for GraphQL adapters only.
|
|
97188
|
+
*/
|
|
97189
|
+
const configurationForGraphQLAdapters$1 = {
|
|
97190
|
+
getDraftAwareGraphQLAdapter: configurableGraphQLAdapter$1.getAdapter,
|
|
97191
|
+
setDraftAwareGraphQLAdapter: configurableGraphQLAdapter$1.setAdapter,
|
|
97192
|
+
getEnvironmentAwareGraphQLBatchAdapter: configurableGraphQLBatchAdapter$1.getAdapter,
|
|
97193
|
+
setEnvironmentAwareGraphQLBatchAdapter: configurableGraphQLBatchAdapter$1.setAdapter,
|
|
97194
|
+
};
|
|
97195
|
+
const registrations$1 = new Set();
|
|
97196
|
+
/**
|
|
97197
|
+
* lds-adapter-uiapi is special. The non-SFDC bundle combines REST and GQL adapters,
|
|
97198
|
+
* yet for SFDC those are separate bundles. So non-SFDC bundle (./main.ts) registers
|
|
97199
|
+
* both REST and GQL configs. We want each SFDC bundle to register (we don't want one
|
|
97200
|
+
* SFDC bundle to assume the other is being loaded and therefore the other one will
|
|
97201
|
+
* take care of registration) but we don't want to double register either.
|
|
97202
|
+
*
|
|
97203
|
+
* So we make this function that memoizes if it's been called before and only
|
|
97204
|
+
* actually registers once.
|
|
97205
|
+
*/
|
|
97206
|
+
function ensureRegisteredOnce$1(registration) {
|
|
97207
|
+
const { id } = registration;
|
|
97208
|
+
if (!registrations$1.has(id)) {
|
|
97209
|
+
register$1(registration);
|
|
97210
|
+
registrations$1.add(id);
|
|
97211
|
+
}
|
|
97212
|
+
}
|
|
97213
|
+
|
|
96452
97214
|
const { keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
|
|
96453
97215
|
function equalsObject(a, b, equalsProp) {
|
|
96454
97216
|
const aKeys = ObjectKeys(a).sort();
|
|
@@ -120682,7 +121444,7 @@ function transformConfiguration$1(config) {
|
|
|
120682
121444
|
// Make a copy of the config before running transform to avoid mutating the original config
|
|
120683
121445
|
const adapterConfigCopy = {
|
|
120684
121446
|
...config,
|
|
120685
|
-
query: parse$
|
|
121447
|
+
query: parse$9(print(config.query))
|
|
120686
121448
|
};
|
|
120687
121449
|
return {
|
|
120688
121450
|
...adapterConfigCopy,
|
|
@@ -120745,238 +121507,6 @@ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
|
120745
121507
|
return cacheSnapshot;
|
|
120746
121508
|
}
|
|
120747
121509
|
|
|
120748
|
-
/**
|
|
120749
|
-
* Defines configuration for the module with a default value which can be overridden by the runtime environment.
|
|
120750
|
-
*/
|
|
120751
|
-
// A holder for a configurable adapter override
|
|
120752
|
-
let Configurable$1 = class Configurable {
|
|
120753
|
-
constructor() {
|
|
120754
|
-
this.getAdapter = () => {
|
|
120755
|
-
return this.adapter;
|
|
120756
|
-
};
|
|
120757
|
-
this.setAdapter = (value) => {
|
|
120758
|
-
this.adapter = value;
|
|
120759
|
-
};
|
|
120760
|
-
this.adapter = undefined;
|
|
120761
|
-
}
|
|
120762
|
-
};
|
|
120763
|
-
// Configurable adapters that can have environmental overrides
|
|
120764
|
-
let configurableCreateRecordAdapter$1 = new Configurable$1();
|
|
120765
|
-
let configurableUpdateRecordAdapter$1 = new Configurable$1();
|
|
120766
|
-
let configurableDeleteRecordAdapter$1 = new Configurable$1();
|
|
120767
|
-
let configurablePerformQuickActionAdapter$1 = new Configurable$1();
|
|
120768
|
-
let configurablePerformUpdateRecordQuickActionAdapter$1 = new Configurable$1();
|
|
120769
|
-
let configurableCreateContentDocumentAndVersion$1 = new Configurable$1();
|
|
120770
|
-
let configurableCreateContentVersion$1 = new Configurable$1();
|
|
120771
|
-
/**
|
|
120772
|
-
* Depth to which tracked fields will be added to a request that results from a cache miss.
|
|
120773
|
-
* A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
|
|
120774
|
-
* be reached by following 1 relationship from the root record, etc.
|
|
120775
|
-
* @defaultValue '5', replicates the current behavior
|
|
120776
|
-
*/
|
|
120777
|
-
let trackedFieldDepthOnCacheMiss$1 = 5;
|
|
120778
|
-
/**
|
|
120779
|
-
* Depth to which tracked fields will be added to a request that results from a merge conflict
|
|
120780
|
-
* A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
|
|
120781
|
-
* be reached by following 1 relationship from the root record, etc.
|
|
120782
|
-
* @defaultValue '5', replicates the current behavior
|
|
120783
|
-
*/
|
|
120784
|
-
let trackedFieldDepthOnCacheMergeConflict$1 = 5;
|
|
120785
|
-
/**
|
|
120786
|
-
* Depth to which tracked fields will be added to a request that results from a notify change invocation by the consumer
|
|
120787
|
-
* A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
|
|
120788
|
-
* be reached by following 1 relationship from the root record, etc.
|
|
120789
|
-
* @defaultValue '5', replicates the current behavior
|
|
120790
|
-
*/
|
|
120791
|
-
let trackedFieldDepthOnNotifyChange$1 = 5;
|
|
120792
|
-
/**
|
|
120793
|
-
* Determines if we will only fetch the 'Id' field for the leaf relationship record
|
|
120794
|
-
* @defaultValue 'false', replicates the current behavior and fetches all fields in the store for the leaf relationship record
|
|
120795
|
-
*/
|
|
120796
|
-
let trackedFieldLeafNodeIdAndNameOnly$1 = false;
|
|
120797
|
-
/**
|
|
120798
|
-
* One store enabled Get Object Info adapter
|
|
120799
|
-
*/
|
|
120800
|
-
let oneStoreGetObjectInfoAdapter$1 = undefined;
|
|
120801
|
-
/**
|
|
120802
|
-
* One store enabled Get Object Infos adapter
|
|
120803
|
-
*/
|
|
120804
|
-
let oneStoreGetObjectInfosAdapter$1 = undefined;
|
|
120805
|
-
/**
|
|
120806
|
-
* Determines when to include PDL strategies for Related Lists
|
|
120807
|
-
*/
|
|
120808
|
-
let relatedListsPredictionsEnabled$1 = false;
|
|
120809
|
-
/**
|
|
120810
|
-
* Determines whether to include additional PDL strategies for Related Lists
|
|
120811
|
-
*/
|
|
120812
|
-
let relatedListsPlusPredictionsEnabled$1 = false;
|
|
120813
|
-
let recordRepresentationIngestionOverride$1 = undefined;
|
|
120814
|
-
/**
|
|
120815
|
-
* Defines the configuration API and is exposed internally as well as externally.
|
|
120816
|
-
* Configuration for one store enabled REST adapters only.
|
|
120817
|
-
*/
|
|
120818
|
-
const configurationForOneStoreEnabledAdapters$1 = {
|
|
120819
|
-
setGetObjectInfoAdapter: function (adapter) {
|
|
120820
|
-
oneStoreGetObjectInfoAdapter$1 = adapter;
|
|
120821
|
-
},
|
|
120822
|
-
getGetObjectInfoAdapter: function () {
|
|
120823
|
-
return oneStoreGetObjectInfoAdapter$1;
|
|
120824
|
-
},
|
|
120825
|
-
setGetObjectInfosAdapter: function (adapter) {
|
|
120826
|
-
oneStoreGetObjectInfosAdapter$1 = adapter;
|
|
120827
|
-
},
|
|
120828
|
-
getGetObjectInfosAdapter: function () {
|
|
120829
|
-
return oneStoreGetObjectInfosAdapter$1;
|
|
120830
|
-
},
|
|
120831
|
-
};
|
|
120832
|
-
const getKeywordSearchResultsFactory$1 = new Configurable$1();
|
|
120833
|
-
const getListRecordsByNameFactory$1 = new Configurable$1();
|
|
120834
|
-
const getListUiFactory$1 = new Configurable$1();
|
|
120835
|
-
const getLookupRecordsFactory$1 = new Configurable$1();
|
|
120836
|
-
const getQuickActionDefaultsFactory$1 = new Configurable$1();
|
|
120837
|
-
const getRecordCreateDefaultsFactory$1 = new Configurable$1();
|
|
120838
|
-
const getRecordTemplateCloneFactory$1 = new Configurable$1();
|
|
120839
|
-
const getRecordTemplateCreateFactory$1 = new Configurable$1();
|
|
120840
|
-
const getRecordUiFactory$1 = new Configurable$1();
|
|
120841
|
-
const getRecordFactory$1 = new Configurable$1();
|
|
120842
|
-
const getRecordsFactory$1 = new Configurable$1();
|
|
120843
|
-
const getRelatedListRecordsFactory$1 = new Configurable$1();
|
|
120844
|
-
const getRelatedListRecordsBatchFactory$1 = new Configurable$1();
|
|
120845
|
-
const getSearchResultsFactory$1 = new Configurable$1();
|
|
120846
|
-
// The following set of adapters all touch RecordRepresentation directly or indirectly,
|
|
120847
|
-
// so they need to support having a custom factory provided by the mobile environment.
|
|
120848
|
-
const configurationForEnvironmentFactoryOverrides$1 = {
|
|
120849
|
-
getKeywordSearchResultsAdapterFactory: getKeywordSearchResultsFactory$1.getAdapter,
|
|
120850
|
-
setGetKeywordSearchResultsAdapterFactory: getKeywordSearchResultsFactory$1.setAdapter,
|
|
120851
|
-
getListRecordsByNameAdapterFactory: getListRecordsByNameFactory$1.getAdapter,
|
|
120852
|
-
setGetListRecordsByNameAdapterFactory: getListRecordsByNameFactory$1.setAdapter,
|
|
120853
|
-
getListUiAdapterFactory: getListUiFactory$1.getAdapter,
|
|
120854
|
-
setGetListUiAdapterFactory: getListUiFactory$1.setAdapter,
|
|
120855
|
-
getLookupRecordsAdapterFactory: getLookupRecordsFactory$1.getAdapter,
|
|
120856
|
-
setGetLookupRecordsAdapterFactory: getLookupRecordsFactory$1.setAdapter,
|
|
120857
|
-
getQuickActionDefaultsAdapterFactory: getQuickActionDefaultsFactory$1.getAdapter,
|
|
120858
|
-
setGetQuickActionDefaultsAdapterFactory: getQuickActionDefaultsFactory$1.setAdapter,
|
|
120859
|
-
getRecordCreateDefaultsAdapterFactory: getRecordCreateDefaultsFactory$1.getAdapter,
|
|
120860
|
-
setGetRecordCreateDefaultsAdapterFactory: getRecordCreateDefaultsFactory$1.setAdapter,
|
|
120861
|
-
getRecordTemplateCloneAdapterFactory: getRecordTemplateCloneFactory$1.getAdapter,
|
|
120862
|
-
setGetRecordTemplateCloneAdapterFactory: getRecordTemplateCloneFactory$1.setAdapter,
|
|
120863
|
-
getRecordTemplateCreateAdapterFactory: getRecordTemplateCreateFactory$1.getAdapter,
|
|
120864
|
-
setGetRecordTemplateCreateAdapterFactory: getRecordTemplateCreateFactory$1.setAdapter,
|
|
120865
|
-
getRecordUiAdapterFactory: getRecordUiFactory$1.getAdapter,
|
|
120866
|
-
setGetRecordUiAdapterFactory: getRecordUiFactory$1.setAdapter,
|
|
120867
|
-
getRecordAdapterFactory: getRecordFactory$1.getAdapter,
|
|
120868
|
-
setGetRecordAdapterFactory: getRecordFactory$1.setAdapter,
|
|
120869
|
-
getRecordsAdapterFactory: getRecordsFactory$1.getAdapter,
|
|
120870
|
-
setGetRecordsAdapterFactory: getRecordsFactory$1.setAdapter,
|
|
120871
|
-
getRelatedListRecordsAdapterFactory: getRelatedListRecordsFactory$1.getAdapter,
|
|
120872
|
-
setGetRelatedListRecordsAdapterFactory: getRelatedListRecordsFactory$1.setAdapter,
|
|
120873
|
-
getRelatedListRecordsBatchAdapterFactory: getRelatedListRecordsBatchFactory$1.getAdapter,
|
|
120874
|
-
setGetRelatedListRecordsBatchAdapterFactory: getRelatedListRecordsBatchFactory$1.setAdapter,
|
|
120875
|
-
getSearchResultsAdapterFactory: getSearchResultsFactory$1.getAdapter,
|
|
120876
|
-
setGetSearchResultsAdapterFactory: getSearchResultsFactory$1.setAdapter,
|
|
120877
|
-
};
|
|
120878
|
-
/**
|
|
120879
|
-
* Defines the configuration API and is exposed internally as well as externally.
|
|
120880
|
-
* Configuration for REST adapters only.
|
|
120881
|
-
*/
|
|
120882
|
-
const configurationForRestAdapters$1 = {
|
|
120883
|
-
setTrackedFieldDepthOnCacheMiss: function (trackedFieldDepthOnCacheMissParam) {
|
|
120884
|
-
trackedFieldDepthOnCacheMiss$1 = trackedFieldDepthOnCacheMissParam;
|
|
120885
|
-
},
|
|
120886
|
-
getTrackedFieldDepthOnCacheMiss: function () {
|
|
120887
|
-
return trackedFieldDepthOnCacheMiss$1;
|
|
120888
|
-
},
|
|
120889
|
-
setTrackedFieldDepthOnCacheMergeConflict: function (trackedFieldDepthOnCacheMergeConflictParam) {
|
|
120890
|
-
trackedFieldDepthOnCacheMergeConflict$1 = trackedFieldDepthOnCacheMergeConflictParam;
|
|
120891
|
-
},
|
|
120892
|
-
getTrackedFieldDepthOnCacheMergeConflict: function () {
|
|
120893
|
-
return trackedFieldDepthOnCacheMergeConflict$1;
|
|
120894
|
-
},
|
|
120895
|
-
setTrackedFieldDepthOnNotifyChange: function (trackedFieldDepthOnNotifyChangeParam) {
|
|
120896
|
-
trackedFieldDepthOnNotifyChange$1 = trackedFieldDepthOnNotifyChangeParam;
|
|
120897
|
-
},
|
|
120898
|
-
getTrackedFieldDepthOnNotifyChange: function () {
|
|
120899
|
-
return trackedFieldDepthOnNotifyChange$1;
|
|
120900
|
-
},
|
|
120901
|
-
setTrackedFieldLeafNodeIdAndNameOnly: function (trackedFieldLeafNodeIdAndNameOnlyParam) {
|
|
120902
|
-
trackedFieldLeafNodeIdAndNameOnly$1 = trackedFieldLeafNodeIdAndNameOnlyParam;
|
|
120903
|
-
},
|
|
120904
|
-
getTrackedFieldLeafNodeIdAndNameOnly: function () {
|
|
120905
|
-
return trackedFieldLeafNodeIdAndNameOnly$1;
|
|
120906
|
-
},
|
|
120907
|
-
setRelatedListsPredictionsEnabled: function (f) {
|
|
120908
|
-
relatedListsPredictionsEnabled$1 = f;
|
|
120909
|
-
},
|
|
120910
|
-
areRelatedListsPredictionsEnabled: function () {
|
|
120911
|
-
return relatedListsPredictionsEnabled$1 === true;
|
|
120912
|
-
},
|
|
120913
|
-
setRelatedListsPlusPredictionsEnabled: function (f) {
|
|
120914
|
-
relatedListsPlusPredictionsEnabled$1 = f;
|
|
120915
|
-
},
|
|
120916
|
-
areRelatedListsPlusPredictionsEnabled: function () {
|
|
120917
|
-
return relatedListsPlusPredictionsEnabled$1 === true;
|
|
120918
|
-
},
|
|
120919
|
-
setRecordRepresentationIngestionOverride: function (ingest) {
|
|
120920
|
-
recordRepresentationIngestionOverride$1 = ingest;
|
|
120921
|
-
},
|
|
120922
|
-
getRecordRepresentationIngestionOverride: function () {
|
|
120923
|
-
return recordRepresentationIngestionOverride$1;
|
|
120924
|
-
},
|
|
120925
|
-
// createRecord
|
|
120926
|
-
getDraftAwareCreateRecordAdapter: configurableCreateRecordAdapter$1.getAdapter,
|
|
120927
|
-
setDraftAwareCreateRecordAdapter: configurableCreateRecordAdapter$1.setAdapter,
|
|
120928
|
-
// updateRecord
|
|
120929
|
-
getDraftAwareUpdateRecordAdapter: configurableUpdateRecordAdapter$1.getAdapter,
|
|
120930
|
-
setDraftAwareUpdateRecordAdapter: configurableUpdateRecordAdapter$1.setAdapter,
|
|
120931
|
-
// deleteRecord
|
|
120932
|
-
getDraftAwareDeleteRecordAdapter: configurableDeleteRecordAdapter$1.getAdapter,
|
|
120933
|
-
setDraftAwareDeleteRecordAdapter: configurableDeleteRecordAdapter$1.setAdapter,
|
|
120934
|
-
// performQuickAction
|
|
120935
|
-
getDraftAwarePerformQuickActionAdapter: configurablePerformQuickActionAdapter$1.getAdapter,
|
|
120936
|
-
setDraftAwarePerformQuickActionAdapter: configurablePerformQuickActionAdapter$1.setAdapter,
|
|
120937
|
-
// performRecordUpdateQuickAction
|
|
120938
|
-
getDraftAwarePerformUpdateRecordQuickActionAdapter: configurablePerformUpdateRecordQuickActionAdapter$1.getAdapter,
|
|
120939
|
-
setDraftAwarePerformUpdateRecordQuickActionAdapter: configurablePerformUpdateRecordQuickActionAdapter$1.setAdapter,
|
|
120940
|
-
// createContentDocumentAndVersion
|
|
120941
|
-
getDraftAwareCreateContentDocumentAndVersionAdapter: configurableCreateContentDocumentAndVersion$1.getAdapter,
|
|
120942
|
-
setDraftAwareCreateContentDocumentAndVersionAdapter: configurableCreateContentDocumentAndVersion$1.setAdapter,
|
|
120943
|
-
// createContentVersion
|
|
120944
|
-
getDraftAwareCreateContentVersionAdapter: configurableCreateContentVersion$1.getAdapter,
|
|
120945
|
-
setDraftAwareCreateContentVersionAdapter: configurableCreateContentVersion$1.setAdapter,
|
|
120946
|
-
...configurationForOneStoreEnabledAdapters$1,
|
|
120947
|
-
...configurationForEnvironmentFactoryOverrides$1,
|
|
120948
|
-
};
|
|
120949
|
-
let configurableGraphQLAdapter$1 = new Configurable$1();
|
|
120950
|
-
let configurableGraphQLBatchAdapter$1 = new Configurable$1();
|
|
120951
|
-
/**
|
|
120952
|
-
* Defines the configuration API and is exposed internally as well as externally.
|
|
120953
|
-
* Configuration for GraphQL adapters only.
|
|
120954
|
-
*/
|
|
120955
|
-
const configurationForGraphQLAdapters$1 = {
|
|
120956
|
-
getDraftAwareGraphQLAdapter: configurableGraphQLAdapter$1.getAdapter,
|
|
120957
|
-
setDraftAwareGraphQLAdapter: configurableGraphQLAdapter$1.setAdapter,
|
|
120958
|
-
getEnvironmentAwareGraphQLBatchAdapter: configurableGraphQLBatchAdapter$1.getAdapter,
|
|
120959
|
-
setEnvironmentAwareGraphQLBatchAdapter: configurableGraphQLBatchAdapter$1.setAdapter,
|
|
120960
|
-
};
|
|
120961
|
-
const registrations$1 = new Set();
|
|
120962
|
-
/**
|
|
120963
|
-
* lds-adapter-uiapi is special. The non-SFDC bundle combines REST and GQL adapters,
|
|
120964
|
-
* yet for SFDC those are separate bundles. So non-SFDC bundle (./main.ts) registers
|
|
120965
|
-
* both REST and GQL configs. We want each SFDC bundle to register (we don't want one
|
|
120966
|
-
* SFDC bundle to assume the other is being loaded and therefore the other one will
|
|
120967
|
-
* take care of registration) but we don't want to double register either.
|
|
120968
|
-
*
|
|
120969
|
-
* So we make this function that memoizes if it's been called before and only
|
|
120970
|
-
* actually registers once.
|
|
120971
|
-
*/
|
|
120972
|
-
function ensureRegisteredOnce$1(registration) {
|
|
120973
|
-
const { id } = registration;
|
|
120974
|
-
if (!registrations$1.has(id)) {
|
|
120975
|
-
register$1(registration);
|
|
120976
|
-
registrations$1.add(id);
|
|
120977
|
-
}
|
|
120978
|
-
}
|
|
120979
|
-
|
|
120980
121510
|
function validateAdapterConfig$1(untrustedConfig, _configPropertyNames) {
|
|
120981
121511
|
if (untrustedConfig !== null && typeof untrustedConfig === 'object') {
|
|
120982
121512
|
const operationNameIsDefinedAsUndefined = ObjectPrototypeHasOwnProperty.call(untrustedConfig, 'operationName') &&
|
|
@@ -121303,7 +121833,7 @@ function transformConfiguration(config) {
|
|
|
121303
121833
|
const batchQueryTransformed = config.batchQuery.map((singleConfig) => {
|
|
121304
121834
|
return {
|
|
121305
121835
|
...singleConfig,
|
|
121306
|
-
query: applyMinimumFieldsToDocument(parse$
|
|
121836
|
+
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?
|
|
121307
121837
|
};
|
|
121308
121838
|
});
|
|
121309
121839
|
return {
|
|
@@ -121445,11 +121975,11 @@ function bindExportsTo(luvio) {
|
|
|
121445
121975
|
const graphqlBatch_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'graphqlBatch', factory), graphqlBatchMetadata);
|
|
121446
121976
|
return {
|
|
121447
121977
|
// Wire Adapters
|
|
121448
|
-
graphql: createGraphQLWireAdapterConstructor(luvio, graphql_ldsAdapter, graphqlMetadata, astResolver),
|
|
121449
121978
|
graphqlBatch: createGraphQLWireAdapterConstructor(luvio, graphqlBatch_ldsAdapter, graphqlBatchMetadata, astResolver),
|
|
121450
121979
|
// One Store Enabled Adapters
|
|
121980
|
+
graphql: getLuvioOrOneStoreAdapter(createGraphQLWireAdapterConstructor(luvio, graphql_ldsAdapter, graphqlMetadata, astResolver), configurationForOneStoreEnabledAdapters$1.getGraphQLWireAdapter()),
|
|
121981
|
+
graphql_imperative: getLuvioOrOneStoreAdapter(createGraphQLImperativeAdapter(luvio, graphql_ldsAdapter, graphqlMetadata, astResolver), configurationForOneStoreEnabledAdapters$1.getGraphQLImperativeQueryAdapter()),
|
|
121451
121982
|
// Imperative Adapters
|
|
121452
|
-
graphql_imperative: createGraphQLImperativeAdapter(luvio, graphql_ldsAdapter, graphqlMetadata, astResolver),
|
|
121453
121983
|
graphqlBatch_imperative: createGraphQLImperativeAdapter(luvio, graphqlBatch_ldsAdapter, graphqlBatchMetadata, astResolver),
|
|
121454
121984
|
};
|
|
121455
121985
|
}
|
|
@@ -121964,7 +122494,14 @@ register$1({
|
|
|
121964
122494
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
121965
122495
|
instrument: instrument$1,
|
|
121966
122496
|
});
|
|
121967
|
-
|
|
122497
|
+
function refreshGraphQL(data) {
|
|
122498
|
+
// If OneStore data, call its refresh instead
|
|
122499
|
+
if (typeof data.refresh === 'function') {
|
|
122500
|
+
return data.refresh();
|
|
122501
|
+
}
|
|
122502
|
+
return refresh$3(data, 'refreshUiApi');
|
|
122503
|
+
}
|
|
122504
|
+
// version: 1.370.0-7c1df2520b
|
|
121968
122505
|
|
|
121969
122506
|
// On core the unstable adapters are re-exported with different names,
|
|
121970
122507
|
// we want to match them here.
|
|
@@ -121976,7 +122513,7 @@ var unstableLightningRelatedListApi = /*#__PURE__*/Object.freeze({
|
|
|
121976
122513
|
gql: gql,
|
|
121977
122514
|
get graphql () { return graphql; },
|
|
121978
122515
|
get graphqlBatch () { return graphqlBatch; },
|
|
121979
|
-
|
|
122516
|
+
refreshGraphQL: refreshGraphQL,
|
|
121980
122517
|
get unstable_getActionOverrides_imperative () { return unstable_getActionOverrides_imperative; },
|
|
121981
122518
|
get unstable_getFlexipageFormulaOverrides_imperative () { return unstable_getFlexipageFormulaOverrides_imperative; },
|
|
121982
122519
|
get unstable_getGlobalActions_imperative () { return unstable_getGlobalActions_imperative; },
|
|
@@ -122116,7 +122653,7 @@ withDefaultLuvio((luvio) => {
|
|
|
122116
122653
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
122117
122654
|
graphQLImperative = ldsAdapter;
|
|
122118
122655
|
});
|
|
122119
|
-
// version: 1.
|
|
122656
|
+
// version: 1.370.0-7c1df2520b
|
|
122120
122657
|
|
|
122121
122658
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
122122
122659
|
__proto__: null,
|
|
@@ -122915,7 +123452,7 @@ const callbacks$1 = [];
|
|
|
122915
123452
|
function register(r) {
|
|
122916
123453
|
callbacks$1.forEach((callback) => callback(r));
|
|
122917
123454
|
}
|
|
122918
|
-
// version: 1.
|
|
123455
|
+
// version: 1.370.0-3ec6ffba72
|
|
122919
123456
|
|
|
122920
123457
|
/**
|
|
122921
123458
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -122981,6 +123518,14 @@ let oneStoreGetObjectInfoAdapter = undefined;
|
|
|
122981
123518
|
* One store enabled Get Object Infos adapter
|
|
122982
123519
|
*/
|
|
122983
123520
|
let oneStoreGetObjectInfosAdapter = undefined;
|
|
123521
|
+
/**
|
|
123522
|
+
* One store enabled GraphQL adapter
|
|
123523
|
+
*/
|
|
123524
|
+
let oneStoreGraphQLWireAdapter = undefined;
|
|
123525
|
+
/**
|
|
123526
|
+
* One store enabled GraphQL imperative query adapter
|
|
123527
|
+
*/
|
|
123528
|
+
let oneStoreGraphQLImperativeQueryAdapter = undefined;
|
|
122984
123529
|
/**
|
|
122985
123530
|
* Determines when to include PDL strategies for Related Lists
|
|
122986
123531
|
*/
|
|
@@ -123007,6 +123552,18 @@ const configurationForOneStoreEnabledAdapters = {
|
|
|
123007
123552
|
getGetObjectInfosAdapter: function () {
|
|
123008
123553
|
return oneStoreGetObjectInfosAdapter;
|
|
123009
123554
|
},
|
|
123555
|
+
setGraphQLWireAdapter: function (adapter) {
|
|
123556
|
+
oneStoreGraphQLWireAdapter = adapter;
|
|
123557
|
+
},
|
|
123558
|
+
getGraphQLWireAdapter: function () {
|
|
123559
|
+
return oneStoreGraphQLWireAdapter;
|
|
123560
|
+
},
|
|
123561
|
+
setGraphQLImperativeQueryAdapter: function (adapter) {
|
|
123562
|
+
oneStoreGraphQLImperativeQueryAdapter = adapter;
|
|
123563
|
+
},
|
|
123564
|
+
getGraphQLImperativeQueryAdapter: function () {
|
|
123565
|
+
return oneStoreGraphQLImperativeQueryAdapter;
|
|
123566
|
+
},
|
|
123010
123567
|
};
|
|
123011
123568
|
const getKeywordSearchResultsFactory = new Configurable();
|
|
123012
123569
|
const getListRecordsByNameFactory = new Configurable();
|
|
@@ -124082,4 +124639,4 @@ const { luvio } = getRuntime();
|
|
|
124082
124639
|
setDefaultLuvio({ luvio });
|
|
124083
124640
|
|
|
124084
124641
|
export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, importLuvioAdapterModule, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
|
|
124085
|
-
// version: 1.
|
|
124642
|
+
// version: 1.370.0-3ec6ffba72
|