@salesforce/lds-worker-api 1.369.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 +1113 -658
- package/dist/standalone/umd/lds-worker-api.js +1113 -658
- package/package.json +9 -9
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
const { hasOwnProperty: hasOwnProperty$4 } = Object.prototype;
|
|
31
31
|
const { isArray: isArray$9 } = Array;
|
|
32
32
|
const { push: push$5, indexOf, slice: slice$2 } = Array.prototype;
|
|
33
|
-
const { parse: parse$
|
|
33
|
+
const { parse: parse$b, stringify: stringify$b } = JSON;
|
|
34
34
|
const WeakSetCtor = WeakSet;
|
|
35
35
|
|
|
36
36
|
const deeplyFrozen = new WeakSetCtor();
|
|
@@ -308,7 +308,7 @@
|
|
|
308
308
|
return isFinite(node) ? '' + node : 'null';
|
|
309
309
|
}
|
|
310
310
|
if (typeof node !== 'object') {
|
|
311
|
-
return stringify$
|
|
311
|
+
return stringify$b(node);
|
|
312
312
|
}
|
|
313
313
|
let i;
|
|
314
314
|
let out;
|
|
@@ -336,7 +336,7 @@
|
|
|
336
336
|
if (out) {
|
|
337
337
|
out += ',';
|
|
338
338
|
}
|
|
339
|
-
out += stringify$
|
|
339
|
+
out += stringify$b(key) + ':' + value;
|
|
340
340
|
}
|
|
341
341
|
return '{' + out + '}';
|
|
342
342
|
}
|
|
@@ -2320,7 +2320,7 @@
|
|
|
2320
2320
|
if (hasOwnProperty$4.call(argValues, _argName)) {
|
|
2321
2321
|
var value = argValues[_argName];
|
|
2322
2322
|
if (value !== null || value !== undefined) {
|
|
2323
|
-
values.push(_argName + ':' + stringify$
|
|
2323
|
+
values.push(_argName + ':' + stringify$b(value));
|
|
2324
2324
|
}
|
|
2325
2325
|
}
|
|
2326
2326
|
}
|
|
@@ -2635,7 +2635,7 @@
|
|
|
2635
2635
|
}
|
|
2636
2636
|
// Only works for non-complex values.. No Date or Functions.
|
|
2637
2637
|
opaqueCopy(value) {
|
|
2638
|
-
return parse$
|
|
2638
|
+
return parse$b(stringify$b(value));
|
|
2639
2639
|
}
|
|
2640
2640
|
deepCopy(record, data, key, visitedKeys) {
|
|
2641
2641
|
const value = record[key];
|
|
@@ -2781,7 +2781,7 @@
|
|
|
2781
2781
|
this.readScalar(propertyName, source, sink);
|
|
2782
2782
|
return;
|
|
2783
2783
|
}
|
|
2784
|
-
throw new Error(`Invalid Link State. Link on "${this.currentPath.fullPath}" is null but selection is not nullable: \n${stringify$
|
|
2784
|
+
throw new Error(`Invalid Link State. Link on "${this.currentPath.fullPath}" is null but selection is not nullable: \n${stringify$b(selection, null, 2)}`);
|
|
2785
2785
|
case StoreLinkStateValues$2.Pending:
|
|
2786
2786
|
this.markPending();
|
|
2787
2787
|
return;
|
|
@@ -2903,7 +2903,7 @@
|
|
|
2903
2903
|
}
|
|
2904
2904
|
if ((options === null || options === void 0 ? void 0 : options.useDeepEquals) === true) {
|
|
2905
2905
|
this.snapshotChanged =
|
|
2906
|
-
stringify$
|
|
2906
|
+
stringify$b(this.currentPath.baseSnapshotValue) !== stringify$b(value);
|
|
2907
2907
|
}
|
|
2908
2908
|
else {
|
|
2909
2909
|
this.snapshotChanged = this.currentPath.baseSnapshotValue !== value;
|
|
@@ -3304,7 +3304,7 @@
|
|
|
3304
3304
|
return error;
|
|
3305
3305
|
}
|
|
3306
3306
|
// anything else should get turned into an Error with the errorType set
|
|
3307
|
-
const normalizedError = new Error(`NetworkAdapter rejected with non-Error object: ${typeof error === 'undefined' ? 'undefined' : stringify$
|
|
3307
|
+
const normalizedError = new Error(`NetworkAdapter rejected with non-Error object: ${typeof error === 'undefined' ? 'undefined' : stringify$b(error)}`);
|
|
3308
3308
|
normalizedError.errorType = 'networkAdapterError';
|
|
3309
3309
|
return normalizedError;
|
|
3310
3310
|
}
|
|
@@ -4280,7 +4280,7 @@
|
|
|
4280
4280
|
}
|
|
4281
4281
|
callbacks.push(callback);
|
|
4282
4282
|
}
|
|
4283
|
-
// version: 1.
|
|
4283
|
+
// version: 1.370.0-3ec6ffba72
|
|
4284
4284
|
|
|
4285
4285
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
4286
4286
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -4396,7 +4396,7 @@
|
|
|
4396
4396
|
}
|
|
4397
4397
|
|
|
4398
4398
|
const { isArray: isArray$8 } = Array;
|
|
4399
|
-
const { stringify: stringify$
|
|
4399
|
+
const { stringify: stringify$a } = JSON;
|
|
4400
4400
|
|
|
4401
4401
|
/**
|
|
4402
4402
|
* (Re)throws an error after adding a prefix to the message.
|
|
@@ -4409,7 +4409,7 @@
|
|
|
4409
4409
|
error.message = `${messagePrefix}\n[${error.message}]`;
|
|
4410
4410
|
throw error;
|
|
4411
4411
|
}
|
|
4412
|
-
throw new Error(`${messagePrefix}\n[${stringify$
|
|
4412
|
+
throw new Error(`${messagePrefix}\n[${stringify$a(error)}]`);
|
|
4413
4413
|
}
|
|
4414
4414
|
|
|
4415
4415
|
class Sanitizer {
|
|
@@ -4425,7 +4425,7 @@
|
|
|
4425
4425
|
}
|
|
4426
4426
|
sanitize() {
|
|
4427
4427
|
const sanitizer = this;
|
|
4428
|
-
stringify$
|
|
4428
|
+
stringify$a(this.obj, function (key, value) {
|
|
4429
4429
|
if (key === '') {
|
|
4430
4430
|
return value;
|
|
4431
4431
|
}
|
|
@@ -5296,7 +5296,7 @@
|
|
|
5296
5296
|
const { apiFamily, name } = metadata;
|
|
5297
5297
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
5298
5298
|
}
|
|
5299
|
-
// version: 1.
|
|
5299
|
+
// version: 1.370.0-3ec6ffba72
|
|
5300
5300
|
|
|
5301
5301
|
/**
|
|
5302
5302
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -5458,6 +5458,14 @@
|
|
|
5458
5458
|
* One store enabled Get Object Infos adapter
|
|
5459
5459
|
*/
|
|
5460
5460
|
let oneStoreGetObjectInfosAdapter$3 = undefined;
|
|
5461
|
+
/**
|
|
5462
|
+
* One store enabled GraphQL adapter
|
|
5463
|
+
*/
|
|
5464
|
+
let oneStoreGraphQLWireAdapter$3 = undefined;
|
|
5465
|
+
/**
|
|
5466
|
+
* One store enabled GraphQL imperative query adapter
|
|
5467
|
+
*/
|
|
5468
|
+
let oneStoreGraphQLImperativeQueryAdapter$3 = undefined;
|
|
5461
5469
|
/**
|
|
5462
5470
|
* Determines when to include PDL strategies for Related Lists
|
|
5463
5471
|
*/
|
|
@@ -5484,6 +5492,18 @@
|
|
|
5484
5492
|
getGetObjectInfosAdapter: function () {
|
|
5485
5493
|
return oneStoreGetObjectInfosAdapter$3;
|
|
5486
5494
|
},
|
|
5495
|
+
setGraphQLWireAdapter: function (adapter) {
|
|
5496
|
+
oneStoreGraphQLWireAdapter$3 = adapter;
|
|
5497
|
+
},
|
|
5498
|
+
getGraphQLWireAdapter: function () {
|
|
5499
|
+
return oneStoreGraphQLWireAdapter$3;
|
|
5500
|
+
},
|
|
5501
|
+
setGraphQLImperativeQueryAdapter: function (adapter) {
|
|
5502
|
+
oneStoreGraphQLImperativeQueryAdapter$3 = adapter;
|
|
5503
|
+
},
|
|
5504
|
+
getGraphQLImperativeQueryAdapter: function () {
|
|
5505
|
+
return oneStoreGraphQLImperativeQueryAdapter$3;
|
|
5506
|
+
},
|
|
5487
5507
|
};
|
|
5488
5508
|
const getKeywordSearchResultsFactory$3 = new Configurable$3();
|
|
5489
5509
|
const getListRecordsByNameFactory$3 = new Configurable$3();
|
|
@@ -5723,6 +5743,14 @@
|
|
|
5723
5743
|
* One store enabled Get Object Infos adapter
|
|
5724
5744
|
*/
|
|
5725
5745
|
let oneStoreGetObjectInfosAdapter$2 = undefined;
|
|
5746
|
+
/**
|
|
5747
|
+
* One store enabled GraphQL adapter
|
|
5748
|
+
*/
|
|
5749
|
+
let oneStoreGraphQLWireAdapter$2 = undefined;
|
|
5750
|
+
/**
|
|
5751
|
+
* One store enabled GraphQL imperative query adapter
|
|
5752
|
+
*/
|
|
5753
|
+
let oneStoreGraphQLImperativeQueryAdapter$2 = undefined;
|
|
5726
5754
|
/**
|
|
5727
5755
|
* Determines when to include PDL strategies for Related Lists
|
|
5728
5756
|
*/
|
|
@@ -5749,6 +5777,18 @@
|
|
|
5749
5777
|
getGetObjectInfosAdapter: function () {
|
|
5750
5778
|
return oneStoreGetObjectInfosAdapter$2;
|
|
5751
5779
|
},
|
|
5780
|
+
setGraphQLWireAdapter: function (adapter) {
|
|
5781
|
+
oneStoreGraphQLWireAdapter$2 = adapter;
|
|
5782
|
+
},
|
|
5783
|
+
getGraphQLWireAdapter: function () {
|
|
5784
|
+
return oneStoreGraphQLWireAdapter$2;
|
|
5785
|
+
},
|
|
5786
|
+
setGraphQLImperativeQueryAdapter: function (adapter) {
|
|
5787
|
+
oneStoreGraphQLImperativeQueryAdapter$2 = adapter;
|
|
5788
|
+
},
|
|
5789
|
+
getGraphQLImperativeQueryAdapter: function () {
|
|
5790
|
+
return oneStoreGraphQLImperativeQueryAdapter$2;
|
|
5791
|
+
},
|
|
5752
5792
|
};
|
|
5753
5793
|
/**
|
|
5754
5794
|
* Helper function to return the one store adapter if it's defined, otherwise return the luvio adapter.
|
|
@@ -5756,7 +5796,7 @@
|
|
|
5756
5796
|
* @param oneStoreAdapter - The one store bound adapter.
|
|
5757
5797
|
* @returns Luvio or one store wire adapter constructor.
|
|
5758
5798
|
*/
|
|
5759
|
-
function getLuvioOrOneStoreAdapter(luvioAdapter, oneStoreAdapter) {
|
|
5799
|
+
function getLuvioOrOneStoreAdapter$1(luvioAdapter, oneStoreAdapter) {
|
|
5760
5800
|
return oneStoreAdapter ?? luvioAdapter;
|
|
5761
5801
|
}
|
|
5762
5802
|
const getKeywordSearchResultsFactory$2 = new Configurable$2();
|
|
@@ -6121,7 +6161,7 @@
|
|
|
6121
6161
|
const { split: split$1, endsWith: endsWith$1 } = String.prototype;
|
|
6122
6162
|
const { isArray: isArray$7 } = Array;
|
|
6123
6163
|
const { concat: concat$3, filter: filter$3, includes: includes$3, push: push$4, reduce: reduce$3 } = Array.prototype;
|
|
6124
|
-
const { parse: parse$
|
|
6164
|
+
const { parse: parse$a, stringify: stringify$9 } = JSON;
|
|
6125
6165
|
|
|
6126
6166
|
function isString$3(value) {
|
|
6127
6167
|
return typeof value === 'string';
|
|
@@ -14820,7 +14860,7 @@
|
|
|
14820
14860
|
// we have to run ingest code and look at the resulting snapshot's seenRecords.
|
|
14821
14861
|
function getCacheKeys$1(keySet, luvio, config, key, originalResponseBody) {
|
|
14822
14862
|
const { recordIds, layoutTypes, modes } = config;
|
|
14823
|
-
const responseBody = parse$
|
|
14863
|
+
const responseBody = parse$a(stringify$9(originalResponseBody));
|
|
14824
14864
|
eachLayout$1(responseBody, (apiName, recordTypeId, layout) => {
|
|
14825
14865
|
if (layout.id === null) {
|
|
14826
14866
|
return;
|
|
@@ -30525,7 +30565,7 @@
|
|
|
30525
30565
|
});
|
|
30526
30566
|
}
|
|
30527
30567
|
function clone$2(userLayoutState) {
|
|
30528
|
-
return parse$
|
|
30568
|
+
return parse$a(stringify$9(userLayoutState));
|
|
30529
30569
|
}
|
|
30530
30570
|
// Applies optimisticUpdate to layoutUserState
|
|
30531
30571
|
// If the optimistic update can be applied, returns RecordLayoutUserStateRepresentation
|
|
@@ -30560,7 +30600,7 @@
|
|
|
30560
30600
|
const config = validateAdapterConfig$L(untrusted, getLayoutUserState_ConfigPropertyNames);
|
|
30561
30601
|
if (config === null) {
|
|
30562
30602
|
// eslint-disable-next-line @salesforce/lds/no-error-in-production
|
|
30563
|
-
throw new Error(`@wire(updateLayoutUserState) invalid configuration ${stringify$
|
|
30603
|
+
throw new Error(`@wire(updateLayoutUserState) invalid configuration ${stringify$9(untrusted)}`);
|
|
30564
30604
|
}
|
|
30565
30605
|
// This will throw if layoutUserStateInput is not a valid input
|
|
30566
30606
|
validate$8(layoutUserStateInput, 'layoutUserStateInput');
|
|
@@ -33902,8 +33942,8 @@
|
|
|
33902
33942
|
updateRecord: unwrapSnapshotData(factory$2$1),
|
|
33903
33943
|
updateRecordAvatar: unwrapSnapshotData(factory$8$1),
|
|
33904
33944
|
// One Store Enabled Adapters
|
|
33905
|
-
getObjectInfo: getLuvioOrOneStoreAdapter(createWireAdapterConstructor(luvio, getObjectInfo_ldsAdapter, getObjectInfoMetadata), configurationForOneStoreEnabledAdapters$2.getGetObjectInfoAdapter()),
|
|
33906
|
-
getObjectInfos: getLuvioOrOneStoreAdapter(createWireAdapterConstructor(luvio, getObjectInfos_ldsAdapter, getObjectInfosMetadata), configurationForOneStoreEnabledAdapters$2.getGetObjectInfosAdapter()),
|
|
33945
|
+
getObjectInfo: getLuvioOrOneStoreAdapter$1(createWireAdapterConstructor(luvio, getObjectInfo_ldsAdapter, getObjectInfoMetadata), configurationForOneStoreEnabledAdapters$2.getGetObjectInfoAdapter()),
|
|
33946
|
+
getObjectInfos: getLuvioOrOneStoreAdapter$1(createWireAdapterConstructor(luvio, getObjectInfos_ldsAdapter, getObjectInfosMetadata), configurationForOneStoreEnabledAdapters$2.getGetObjectInfosAdapter()),
|
|
33907
33947
|
// Imperative Adapters
|
|
33908
33948
|
unstable_getActionOverrides_imperative: createImperativeAdapter(luvio, getActionOverrides_ldsAdapter, getActionOverridesMetadata),
|
|
33909
33949
|
getAllApps_imperative: createImperativeAdapter(luvio, getAllApps_ldsAdapter, getAllAppsMetadata),
|
|
@@ -34132,7 +34172,7 @@
|
|
|
34132
34172
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
34133
34173
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
34134
34174
|
});
|
|
34135
|
-
// version: 1.
|
|
34175
|
+
// version: 1.370.0-7c1df2520b
|
|
34136
34176
|
|
|
34137
34177
|
function requestIdleDetectedCallback(_callback) { }
|
|
34138
34178
|
function declareNotifierTaskSingle(_name) {
|
|
@@ -35798,7 +35838,7 @@
|
|
|
35798
35838
|
* Given a GraphQL source, parses it into a Document.
|
|
35799
35839
|
* Throws GraphQLError if a syntax error is encountered.
|
|
35800
35840
|
*/
|
|
35801
|
-
function parse$
|
|
35841
|
+
function parse$9(source, options) {
|
|
35802
35842
|
var parser = new Parser(source, options);
|
|
35803
35843
|
return parser.parseDocument();
|
|
35804
35844
|
}
|
|
@@ -44807,7 +44847,7 @@
|
|
|
44807
44847
|
*/
|
|
44808
44848
|
|
|
44809
44849
|
function buildSchema(source, options) {
|
|
44810
|
-
var document = parse$
|
|
44850
|
+
var document = parse$9(source, {
|
|
44811
44851
|
noLocation: options === null || options === void 0 ? void 0 : options.noLocation,
|
|
44812
44852
|
allowLegacySDLEmptyFields: options === null || options === void 0 ? void 0 : options.allowLegacySDLEmptyFields,
|
|
44813
44853
|
allowLegacySDLImplementsInterfaces: options === null || options === void 0 ? void 0 : options.allowLegacySDLImplementsInterfaces,
|
|
@@ -45358,7 +45398,7 @@
|
|
|
45358
45398
|
return cachedDoc;
|
|
45359
45399
|
}
|
|
45360
45400
|
// parse throws an GraphQLError in case of invalid query, should this be in try/catch?
|
|
45361
|
-
const parsedDoc = parse$
|
|
45401
|
+
const parsedDoc = parse$9(inputString, { noLocation: true });
|
|
45362
45402
|
if (!parsedDoc || parsedDoc.kind !== 'Document') {
|
|
45363
45403
|
return null;
|
|
45364
45404
|
}
|
|
@@ -45616,7 +45656,7 @@
|
|
|
45616
45656
|
* @deprecated In favor of gql tagged template literal
|
|
45617
45657
|
*/
|
|
45618
45658
|
function parseAndVisit(source) {
|
|
45619
|
-
const ast = parse$
|
|
45659
|
+
const ast = parse$9(source, { noLocation: true });
|
|
45620
45660
|
const luvioDocumentNode = transform(ast);
|
|
45621
45661
|
// In-place substitution of metaschema annotations
|
|
45622
45662
|
metaschemaMapper(ast);
|
|
@@ -45822,7 +45862,7 @@
|
|
|
45822
45862
|
*/
|
|
45823
45863
|
|
|
45824
45864
|
|
|
45825
|
-
const { parse: parse$
|
|
45865
|
+
const { parse: parse$7, stringify: stringify$7 } = JSON;
|
|
45826
45866
|
const { join: join$1, push: push$2, unshift } = Array.prototype;
|
|
45827
45867
|
const { isArray: isArray$5 } = Array;
|
|
45828
45868
|
const { entries: entries$4, keys: keys$6 } = Object;
|
|
@@ -46120,10 +46160,10 @@
|
|
|
46120
46160
|
const { resourceRequest } = req;
|
|
46121
46161
|
const { baseUri, basePath, queryParams, headers } = resourceRequest;
|
|
46122
46162
|
const path = `${baseUri}${basePath}`;
|
|
46123
|
-
const queryParamsString = queryParams ? stringify$
|
|
46124
|
-
const headersString = stringify$
|
|
46163
|
+
const queryParamsString = queryParams ? stringify$7(queryParams) : EMPTY_STRING;
|
|
46164
|
+
const headersString = stringify$7(headers);
|
|
46125
46165
|
const bodyString = resourceRequest.body && isResourceRequestDedupable(req)
|
|
46126
|
-
? stringify$
|
|
46166
|
+
? stringify$7(resourceRequest.body)
|
|
46127
46167
|
: EMPTY_STRING;
|
|
46128
46168
|
return `${path}${TRANSACTION_KEY_SEP}${headersString}${TRANSACTION_KEY_SEP}${queryParamsString}${bodyString}`;
|
|
46129
46169
|
}
|
|
@@ -46189,7 +46229,7 @@
|
|
|
46189
46229
|
// extra clone (particularly when there's only 1 handler).
|
|
46190
46230
|
for (let i = 1, len = handlers.length; i < len; i++) {
|
|
46191
46231
|
const handler = handlers[i];
|
|
46192
|
-
handler.resolve(parse$
|
|
46232
|
+
handler.resolve(parse$7(stringify$7(response)));
|
|
46193
46233
|
}
|
|
46194
46234
|
handlers[0].resolve(response);
|
|
46195
46235
|
}, (error) => {
|
|
@@ -47601,7 +47641,7 @@
|
|
|
47601
47641
|
})(QueueOperationType || (QueueOperationType = {}));
|
|
47602
47642
|
|
|
47603
47643
|
const { keys: keys$4, create: create$4, assign: assign$3, values: values$2 } = Object;
|
|
47604
|
-
const { stringify: stringify$
|
|
47644
|
+
const { stringify: stringify$6, parse: parse$6 } = JSON;
|
|
47605
47645
|
const { isArray: isArray$4 } = Array;
|
|
47606
47646
|
|
|
47607
47647
|
class DraftSynthesisError extends Error {
|
|
@@ -48303,7 +48343,7 @@
|
|
|
48303
48343
|
}
|
|
48304
48344
|
|
|
48305
48345
|
function clone$1(obj) {
|
|
48306
|
-
return parse$
|
|
48346
|
+
return parse$6(stringify$6(obj));
|
|
48307
48347
|
}
|
|
48308
48348
|
|
|
48309
48349
|
const DRAFT_ACTION_KEY_JUNCTION = '__DraftAction__';
|
|
@@ -48762,7 +48802,7 @@
|
|
|
48762
48802
|
// We should always return an array, if the body is just a dictionary,
|
|
48763
48803
|
// stick it in an array
|
|
48764
48804
|
const body = isArray$4(action.error.body) ? action.error.body : [action.error.body];
|
|
48765
|
-
const bodyString = stringify$
|
|
48805
|
+
const bodyString = stringify$6(body);
|
|
48766
48806
|
item.error = {
|
|
48767
48807
|
status: action.error.status || 0,
|
|
48768
48808
|
ok: action.error.ok || false,
|
|
@@ -48983,7 +49023,7 @@
|
|
|
48983
49023
|
const { split, endsWith } = String.prototype;
|
|
48984
49024
|
const { from: from$1, isArray: isArray$3$1 } = Array;
|
|
48985
49025
|
const { concat: concat$2, filter: filter$2, includes: includes$2, push: push$1$1, reduce: reduce$2, shift, slice: slice$1 } = Array.prototype;
|
|
48986
|
-
const { parse: parse$
|
|
49026
|
+
const { parse: parse$5, stringify: stringify$5 } = JSON;
|
|
48987
49027
|
|
|
48988
49028
|
function isString$2(value) {
|
|
48989
49029
|
return typeof value === 'string';
|
|
@@ -55359,7 +55399,7 @@
|
|
|
55359
55399
|
// we have to run ingest code and look at the resulting snapshot's seenRecords.
|
|
55360
55400
|
function getCacheKeys(keySet, luvio, config, key, originalResponseBody) {
|
|
55361
55401
|
const { recordIds, layoutTypes, modes } = config;
|
|
55362
|
-
const responseBody = parse$
|
|
55402
|
+
const responseBody = parse$5(stringify$5(originalResponseBody));
|
|
55363
55403
|
eachLayout(responseBody, (apiName, recordTypeId, layout) => {
|
|
55364
55404
|
if (layout.id === null) {
|
|
55365
55405
|
return;
|
|
@@ -79775,7 +79815,7 @@
|
|
|
79775
79815
|
let updatedActionTargetId = undefined;
|
|
79776
79816
|
const { tag: queueActionTag, data: queueActionRequest, id: queueActionId, } = queueAction;
|
|
79777
79817
|
let { basePath, body } = queueActionRequest;
|
|
79778
|
-
let stringifiedBody = stringify$
|
|
79818
|
+
let stringifiedBody = stringify$5(body);
|
|
79779
79819
|
// for each redirected ID/key we loop over the operation to see if it needs
|
|
79780
79820
|
// to be updated
|
|
79781
79821
|
for (const { draftId, draftKey, canonicalId, canonicalKey } of redirects) {
|
|
@@ -79800,7 +79840,7 @@
|
|
|
79800
79840
|
data: {
|
|
79801
79841
|
...queueActionRequest,
|
|
79802
79842
|
basePath: basePath,
|
|
79803
|
-
body: parse$
|
|
79843
|
+
body: parse$5(stringifiedBody),
|
|
79804
79844
|
},
|
|
79805
79845
|
};
|
|
79806
79846
|
// item needs to be replaced with a new item at the new record key
|
|
@@ -79819,7 +79859,7 @@
|
|
|
79819
79859
|
data: {
|
|
79820
79860
|
...queueActionRequest,
|
|
79821
79861
|
basePath: basePath,
|
|
79822
|
-
body: parse$
|
|
79862
|
+
body: parse$5(stringifiedBody),
|
|
79823
79863
|
},
|
|
79824
79864
|
};
|
|
79825
79865
|
// item needs to be updated
|
|
@@ -80535,7 +80575,7 @@
|
|
|
80535
80575
|
else if (typeof err === 'string') {
|
|
80536
80576
|
return new Error(err);
|
|
80537
80577
|
}
|
|
80538
|
-
return new Error(stringify$
|
|
80578
|
+
return new Error(stringify$5(err));
|
|
80539
80579
|
}
|
|
80540
80580
|
// metrics
|
|
80541
80581
|
/** GraphQL */
|
|
@@ -81648,7 +81688,7 @@
|
|
|
81648
81688
|
rows.forEach((row) => {
|
|
81649
81689
|
if (!row[0])
|
|
81650
81690
|
return null;
|
|
81651
|
-
const record = parse$
|
|
81691
|
+
const record = parse$5(row[0]);
|
|
81652
81692
|
if (record.id === id) {
|
|
81653
81693
|
foundRow = record;
|
|
81654
81694
|
}
|
|
@@ -82007,7 +82047,7 @@
|
|
|
82007
82047
|
return dateTimeRange(range, operator, field, alias);
|
|
82008
82048
|
}
|
|
82009
82049
|
// eslint-disable-next-line @salesforce/lds/no-error-in-production
|
|
82010
|
-
throw new Error(`Where filter ${stringify$
|
|
82050
|
+
throw new Error(`Where filter ${stringify$5(input)} is not supported`);
|
|
82011
82051
|
}
|
|
82012
82052
|
function dateTimeRange(input, op, field, alias) {
|
|
82013
82053
|
const dateFunction = field.dataType === 'DateTime' ? 'datetime' : 'date';
|
|
@@ -84651,14 +84691,14 @@
|
|
|
84651
84691
|
typeof maybeCursor.i === 'number');
|
|
84652
84692
|
}
|
|
84653
84693
|
function encodeV1Cursor(cursor) {
|
|
84654
|
-
return base64encode(stringify$
|
|
84694
|
+
return base64encode(stringify$5(cursor));
|
|
84655
84695
|
}
|
|
84656
84696
|
const CURSOR_PARSE_ERROR = 'Unable to parse cursor';
|
|
84657
84697
|
function decodeV1Cursor(base64cursor) {
|
|
84658
84698
|
let maybeCursor;
|
|
84659
84699
|
try {
|
|
84660
84700
|
const cursorString = base64decode(base64cursor);
|
|
84661
|
-
maybeCursor = parse$
|
|
84701
|
+
maybeCursor = parse$5(cursorString);
|
|
84662
84702
|
}
|
|
84663
84703
|
catch (error) {
|
|
84664
84704
|
let message = CURSOR_PARSE_ERROR;
|
|
@@ -84862,7 +84902,7 @@
|
|
|
84862
84902
|
const results = await query(sql, keys.map((k) => k + '__pagination'));
|
|
84863
84903
|
for (let row of results.rows) {
|
|
84864
84904
|
let key = row[0].replace(/__pagination$/, '');
|
|
84865
|
-
let metadata = parse$
|
|
84905
|
+
let metadata = parse$5(row[1]);
|
|
84866
84906
|
metadataMap.set(key, metadata);
|
|
84867
84907
|
}
|
|
84868
84908
|
return metadataMap;
|
|
@@ -84968,8 +85008,8 @@
|
|
|
84968
85008
|
//map each sql result with the ingestion timestamp to pass it down a level
|
|
84969
85009
|
let records = results.rows.map((row, index) => {
|
|
84970
85010
|
const recordMetadataResult = {
|
|
84971
|
-
recordRepresentation: parse$
|
|
84972
|
-
metadata: parse$
|
|
85011
|
+
recordRepresentation: parse$5(row[0]),
|
|
85012
|
+
metadata: parse$5(row[1]),
|
|
84973
85013
|
};
|
|
84974
85014
|
const { recordRepresentation, metadata } = recordMetadataResult;
|
|
84975
85015
|
context.seenRecordIds.add(recordRepresentation.id);
|
|
@@ -85420,7 +85460,7 @@
|
|
|
85420
85460
|
return cache;
|
|
85421
85461
|
}
|
|
85422
85462
|
// parse extensions into DocumentNode to extend the schema
|
|
85423
|
-
const extensions = parse$
|
|
85463
|
+
const extensions = parse$9(typeDefs);
|
|
85424
85464
|
const polymorphicFieldTypeNames = [
|
|
85425
85465
|
...polyFieldTypeNameArr,
|
|
85426
85466
|
...cache.getPolymorphicFieldTypeNames(),
|
|
@@ -87963,7 +88003,7 @@
|
|
|
87963
88003
|
const getCanonicalId = getCanonicalIdFunction(luvio);
|
|
87964
88004
|
return async function draftAwareGraphQLAdapter(config, requestContext = {}) {
|
|
87965
88005
|
//create a copy to not accidentally modify the AST in the astResolver map of luvio
|
|
87966
|
-
const copy = parse$
|
|
88006
|
+
const copy = parse$5(stringify$5(config.query));
|
|
87967
88007
|
// the injected ast has extra fields needed for eval in it
|
|
87968
88008
|
let injectedAST;
|
|
87969
88009
|
// the cursor mapped ast is passed upstream so it won't reject on our local cursors
|
|
@@ -88056,7 +88096,7 @@
|
|
|
88056
88096
|
} = await evaluate({
|
|
88057
88097
|
...config,
|
|
88058
88098
|
//need to create another copy of the ast for future writes
|
|
88059
|
-
query: parse$
|
|
88099
|
+
query: parse$5(stringify$5(injectedAST)),
|
|
88060
88100
|
}, observers, { userId }, objectInfoNeeded, store, nonEvaluatedSnapshot, graphqlSchemaCache, draftFunctions, mappedCursors));
|
|
88061
88101
|
}
|
|
88062
88102
|
catch (throwable) {
|
|
@@ -88182,7 +88222,7 @@
|
|
|
88182
88222
|
|
|
88183
88223
|
function environmentAwareGraphQLBatchAdapterFactory(objectInfoService, luvio, isDraftId, buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy) {
|
|
88184
88224
|
return async function environmentAwareGraphQLBatchAdapter(config, requestContext = {}) {
|
|
88185
|
-
const batchQueryCopy = config.batchQuery.map((query) => parse$
|
|
88225
|
+
const batchQueryCopy = config.batchQuery.map((query) => parse$5(stringify$5(query)));
|
|
88186
88226
|
let injectedBatchQuery = [];
|
|
88187
88227
|
const getCanonicalId = getCanonicalIdFunction(luvio);
|
|
88188
88228
|
const draftFunctions = {
|
|
@@ -88407,7 +88447,7 @@
|
|
|
88407
88447
|
|
|
88408
88448
|
|
|
88409
88449
|
const { keys: keys$2$1, create: create$2$1, assign: assign$1$1, entries: entries$2 } = Object;
|
|
88410
|
-
const { stringify: stringify$
|
|
88450
|
+
const { stringify: stringify$4, parse: parse$4 } = JSON;
|
|
88411
88451
|
const { push: push$3, join, slice } = Array.prototype;
|
|
88412
88452
|
const { isArray: isArray$2$1, from } = Array;
|
|
88413
88453
|
|
|
@@ -88431,7 +88471,7 @@
|
|
|
88431
88471
|
returnParams[key] = `${value}`;
|
|
88432
88472
|
}
|
|
88433
88473
|
if (isObject(value) === true && keys$2$1(value).length > 0) {
|
|
88434
|
-
returnParams[key] = stringify$
|
|
88474
|
+
returnParams[key] = stringify$4(value);
|
|
88435
88475
|
}
|
|
88436
88476
|
}
|
|
88437
88477
|
return returnParams;
|
|
@@ -88493,13 +88533,13 @@
|
|
|
88493
88533
|
if (typeof value === 'string') {
|
|
88494
88534
|
return value;
|
|
88495
88535
|
}
|
|
88496
|
-
return stringify$
|
|
88536
|
+
return stringify$4(value);
|
|
88497
88537
|
}
|
|
88498
88538
|
function parseIfPresent(value) {
|
|
88499
88539
|
if (value === undefined || value === null || value === '') {
|
|
88500
88540
|
return null;
|
|
88501
88541
|
}
|
|
88502
|
-
return parse$
|
|
88542
|
+
return parse$4(value);
|
|
88503
88543
|
}
|
|
88504
88544
|
function buildNimbusNetworkPluginRequest(resourceRequest, resourceRequestContext) {
|
|
88505
88545
|
const { basePath, baseUri, method, headers, queryParams, body } = resourceRequest;
|
|
@@ -88998,8 +89038,8 @@
|
|
|
88998
89038
|
// Too much work to get exact length of the final url, so use stringified json to get the rough length.
|
|
88999
89039
|
const roughUrlLengthWithoutFieldsAndOptionFields = request.basePath.length +
|
|
89000
89040
|
request.baseUri.length +
|
|
89001
|
-
(request.urlParams ? stringify$
|
|
89002
|
-
stringify$
|
|
89041
|
+
(request.urlParams ? stringify$4(request.urlParams).length : 0) +
|
|
89042
|
+
stringify$4({ ...request.queryParams, fields: {}, optionalFields: {} }).length;
|
|
89003
89043
|
return MAX_URL_LENGTH - roughUrlLengthWithoutFieldsAndOptionFields;
|
|
89004
89044
|
}
|
|
89005
89045
|
// we don't have access to the host so we cannot calculate the exact length of the url
|
|
@@ -89105,10 +89145,10 @@
|
|
|
89105
89145
|
if (callProxyMethod === undefined) {
|
|
89106
89146
|
return Promise.reject(new Error('callProxyMethod not defined on the nimbus plugin'));
|
|
89107
89147
|
}
|
|
89108
|
-
const serializedAction = stringify$
|
|
89148
|
+
const serializedAction = stringify$5([handlerId, data]);
|
|
89109
89149
|
return new Promise((resolve, reject) => {
|
|
89110
89150
|
callProxyMethod('enqueue', serializedAction, (serializedActionResponse) => {
|
|
89111
|
-
const response = parse$
|
|
89151
|
+
const response = parse$5(serializedActionResponse);
|
|
89112
89152
|
resolve(response);
|
|
89113
89153
|
}, (errorMessage) => {
|
|
89114
89154
|
reject(new Error(errorMessage));
|
|
@@ -89129,8 +89169,8 @@
|
|
|
89129
89169
|
return Promise.reject(new Error('callProxyMethod not defined on the nimbus plugin'));
|
|
89130
89170
|
}
|
|
89131
89171
|
return new Promise((resolve, reject) => {
|
|
89132
|
-
callProxyMethod('getQueueActions', stringify$
|
|
89133
|
-
resolve(parse$
|
|
89172
|
+
callProxyMethod('getQueueActions', stringify$5([]), (serializedQueue) => {
|
|
89173
|
+
resolve(parse$5(serializedQueue));
|
|
89134
89174
|
}, (errorMessage) => {
|
|
89135
89175
|
reject(new Error(errorMessage));
|
|
89136
89176
|
});
|
|
@@ -89141,17 +89181,17 @@
|
|
|
89141
89181
|
if (callProxyMethod === undefined) {
|
|
89142
89182
|
return Promise.reject('callProxyMethod not defined on the nimbus plugin');
|
|
89143
89183
|
}
|
|
89144
|
-
const stringifiedArgs = stringify$
|
|
89184
|
+
const stringifiedArgs = stringify$5([action]);
|
|
89145
89185
|
return new Promise((resolve, reject) => {
|
|
89146
89186
|
callProxyMethod('getDataForAction', stringifiedArgs, (data) => {
|
|
89147
89187
|
if (data === undefined) {
|
|
89148
89188
|
resolve(undefined);
|
|
89149
89189
|
}
|
|
89150
89190
|
else {
|
|
89151
|
-
resolve(parse$
|
|
89191
|
+
resolve(parse$5(data));
|
|
89152
89192
|
}
|
|
89153
89193
|
}, (serializedError) => {
|
|
89154
|
-
reject(parse$
|
|
89194
|
+
reject(parse$5(serializedError));
|
|
89155
89195
|
});
|
|
89156
89196
|
});
|
|
89157
89197
|
}
|
|
@@ -89633,7 +89673,7 @@
|
|
|
89633
89673
|
}
|
|
89634
89674
|
|
|
89635
89675
|
const { keys: keys$1$1, create: create$1$1, assign: assign$5, entries: entries$1, values } = Object;
|
|
89636
|
-
const { stringify: stringify$
|
|
89676
|
+
const { stringify: stringify$3, parse: parse$3 } = JSON;
|
|
89637
89677
|
|
|
89638
89678
|
function selectColumnsFromTableWhereKeyIn(columnNames, table, keyColumnName, whereIn) {
|
|
89639
89679
|
const paramList = whereIn.map(() => '?').join(',');
|
|
@@ -89646,13 +89686,13 @@
|
|
|
89646
89686
|
|
|
89647
89687
|
// These const values must be in sync with the latest
|
|
89648
89688
|
// @salesforce/nimbus-plugin-lds/sql schema file
|
|
89649
|
-
const TABLE_NAME$1 = 'lds_data';
|
|
89689
|
+
const TABLE_NAME$1$1 = 'lds_data';
|
|
89650
89690
|
const COLUMN_NAME_KEY$2 = 'key';
|
|
89651
89691
|
const COLUMN_NAME_DATA$2 = 'data';
|
|
89652
89692
|
const COLUMN_NAME_METADATA$1 = 'metadata';
|
|
89653
89693
|
class LdsDataTable {
|
|
89654
89694
|
constructor(plugin) {
|
|
89655
|
-
this.tableName = TABLE_NAME$1;
|
|
89695
|
+
this.tableName = TABLE_NAME$1$1;
|
|
89656
89696
|
this.columnNames = [COLUMN_NAME_KEY$2, COLUMN_NAME_DATA$2, COLUMN_NAME_METADATA$1];
|
|
89657
89697
|
this.conflictColumnNames = [COLUMN_NAME_KEY$2];
|
|
89658
89698
|
this.getAllQuery = `SELECT ${this.columnNames.join(',')} FROM ${this.tableName}`;
|
|
@@ -89674,7 +89714,7 @@
|
|
|
89674
89714
|
const [key, stringifiedMetadata] = row;
|
|
89675
89715
|
if (stringifiedMetadata !== undefined) {
|
|
89676
89716
|
entries[key] = {
|
|
89677
|
-
metadata: parse$
|
|
89717
|
+
metadata: parse$3(stringifiedMetadata),
|
|
89678
89718
|
};
|
|
89679
89719
|
}
|
|
89680
89720
|
return entries;
|
|
@@ -89702,7 +89742,7 @@
|
|
|
89702
89742
|
rows: keys$1$1(entries).reduce((rows, key) => {
|
|
89703
89743
|
const entry = entries[key];
|
|
89704
89744
|
const { data, metadata } = entry;
|
|
89705
|
-
const row = [key, stringify$
|
|
89745
|
+
const row = [key, stringify$3(data), metadata ? stringify$3(metadata) : null];
|
|
89706
89746
|
rows.push(row);
|
|
89707
89747
|
return rows;
|
|
89708
89748
|
}, []),
|
|
@@ -89720,7 +89760,7 @@
|
|
|
89720
89760
|
columns: [COLUMN_NAME_METADATA$1],
|
|
89721
89761
|
values: keys$1$1(entries).reduce((values, key) => {
|
|
89722
89762
|
const { metadata } = entries[key];
|
|
89723
|
-
const row = [metadata ? stringify$
|
|
89763
|
+
const row = [metadata ? stringify$3(metadata) : null];
|
|
89724
89764
|
values[key] = row;
|
|
89725
89765
|
return values;
|
|
89726
89766
|
}, {}),
|
|
@@ -89730,10 +89770,10 @@
|
|
|
89730
89770
|
return sqliteResult.rows.reduce((entries, row) => {
|
|
89731
89771
|
const [key, stringifiedData, stringifiedMetadata] = row;
|
|
89732
89772
|
const durableStoreEntry = {
|
|
89733
|
-
data: parse$
|
|
89773
|
+
data: parse$3(stringifiedData),
|
|
89734
89774
|
};
|
|
89735
89775
|
if (stringifiedMetadata !== null) {
|
|
89736
|
-
durableStoreEntry.metadata = parse$
|
|
89776
|
+
durableStoreEntry.metadata = parse$3(stringifiedMetadata);
|
|
89737
89777
|
}
|
|
89738
89778
|
entries[key] = durableStoreEntry;
|
|
89739
89779
|
return entries;
|
|
@@ -89783,7 +89823,7 @@
|
|
|
89783
89823
|
const [key, stringifiedMetadata] = row;
|
|
89784
89824
|
if (stringifiedMetadata !== undefined) {
|
|
89785
89825
|
entries[key] = {
|
|
89786
|
-
metadata: parse$
|
|
89826
|
+
metadata: parse$3(stringifiedMetadata),
|
|
89787
89827
|
};
|
|
89788
89828
|
}
|
|
89789
89829
|
return entries;
|
|
@@ -89811,9 +89851,9 @@
|
|
|
89811
89851
|
rows: keys$1$1(entries).reduce((rows, key) => {
|
|
89812
89852
|
const entry = entries[key];
|
|
89813
89853
|
const { data, metadata } = entry;
|
|
89814
|
-
const row = [key, stringify$
|
|
89854
|
+
const row = [key, stringify$3(data)];
|
|
89815
89855
|
if (metadata) {
|
|
89816
|
-
row.push(stringify$
|
|
89856
|
+
row.push(stringify$3(metadata));
|
|
89817
89857
|
}
|
|
89818
89858
|
else {
|
|
89819
89859
|
row.push(null);
|
|
@@ -89836,7 +89876,7 @@
|
|
|
89836
89876
|
columns: [COLUMN_NAME_METADATA],
|
|
89837
89877
|
values: keys$1$1(entries).reduce((values, key) => {
|
|
89838
89878
|
const { metadata } = entries[key];
|
|
89839
|
-
const row = [metadata ? stringify$
|
|
89879
|
+
const row = [metadata ? stringify$3(metadata) : null];
|
|
89840
89880
|
values[key] = row;
|
|
89841
89881
|
return values;
|
|
89842
89882
|
}, {}),
|
|
@@ -89848,7 +89888,7 @@
|
|
|
89848
89888
|
if (metadata !== undefined) {
|
|
89849
89889
|
accu.push({
|
|
89850
89890
|
sql: `UPDATE ${this.tableName} SET ${COLUMN_NAME_METADATA} = ? WHERE (${COLUMN_NAME_KEY$1} IS ? AND ${COLUMN_NAME_NAMESPACE} IS ?)`,
|
|
89851
|
-
params: [stringify$
|
|
89891
|
+
params: [stringify$3(metadata), key, segment],
|
|
89852
89892
|
change: {
|
|
89853
89893
|
ids: [key],
|
|
89854
89894
|
segment,
|
|
@@ -89864,10 +89904,10 @@
|
|
|
89864
89904
|
return sqliteResult.rows.reduce((entries, row) => {
|
|
89865
89905
|
const [key, stringifiedData, stringifiedMetadata] = row;
|
|
89866
89906
|
const durableStoreEntry = {
|
|
89867
|
-
data: parse$
|
|
89907
|
+
data: parse$3(stringifiedData),
|
|
89868
89908
|
};
|
|
89869
89909
|
if (stringifiedMetadata !== null) {
|
|
89870
|
-
durableStoreEntry.metadata = parse$
|
|
89910
|
+
durableStoreEntry.metadata = parse$3(stringifiedMetadata);
|
|
89871
89911
|
}
|
|
89872
89912
|
entries[key] = durableStoreEntry;
|
|
89873
89913
|
return entries;
|
|
@@ -90089,7 +90129,7 @@
|
|
|
90089
90129
|
columns: this.columnNames,
|
|
90090
90130
|
rows: keys$1$1(entries).reduce((rows, key) => {
|
|
90091
90131
|
const entry = entries[key];
|
|
90092
|
-
rows.push([key, stringify$
|
|
90132
|
+
rows.push([key, stringify$3(entry.data)]);
|
|
90093
90133
|
return rows;
|
|
90094
90134
|
}, []),
|
|
90095
90135
|
};
|
|
@@ -90102,7 +90142,7 @@
|
|
|
90102
90142
|
return sqliteResult.rows.reduce((entries, row) => {
|
|
90103
90143
|
const [key, stringifiedData] = row;
|
|
90104
90144
|
const durableStoreEntry = {
|
|
90105
|
-
data: parse$
|
|
90145
|
+
data: parse$3(stringifiedData),
|
|
90106
90146
|
};
|
|
90107
90147
|
entries[key] = durableStoreEntry;
|
|
90108
90148
|
return entries;
|
|
@@ -90112,10 +90152,10 @@
|
|
|
90112
90152
|
|
|
90113
90153
|
// These const values must be in sync with the latest
|
|
90114
90154
|
// @salesforce/nimbus-plugin-lds/sql schema file
|
|
90115
|
-
const TABLE_NAME = 'lds_env_drafts';
|
|
90155
|
+
const TABLE_NAME$1 = 'lds_env_drafts';
|
|
90116
90156
|
class LdsDraftsDataTable extends AbstractKeyValueDataTable {
|
|
90117
90157
|
constructor(plugin) {
|
|
90118
|
-
super(plugin, TABLE_NAME);
|
|
90158
|
+
super(plugin, TABLE_NAME$1);
|
|
90119
90159
|
}
|
|
90120
90160
|
}
|
|
90121
90161
|
|
|
@@ -91977,7 +92017,7 @@
|
|
|
91977
92017
|
registerReportObserver((report) => {
|
|
91978
92018
|
__nimbus.plugins.LdsObserverPlugin.logAdapterExecution({
|
|
91979
92019
|
name: report.adapterName,
|
|
91980
|
-
serializedConfig: stringify$
|
|
92020
|
+
serializedConfig: stringify$5(report.config),
|
|
91981
92021
|
status: report.result,
|
|
91982
92022
|
duration: report.executionTime,
|
|
91983
92023
|
});
|
|
@@ -92093,7 +92133,7 @@
|
|
|
92093
92133
|
// Make a copy of the config before running transform to avoid mutating the original config
|
|
92094
92134
|
const adapterConfigCopy = {
|
|
92095
92135
|
...config,
|
|
92096
|
-
query: parse$
|
|
92136
|
+
query: parse$9(print(config.query))
|
|
92097
92137
|
};
|
|
92098
92138
|
return {
|
|
92099
92139
|
...adapterConfigCopy,
|
|
@@ -92455,7 +92495,7 @@
|
|
|
92455
92495
|
const batchQueryTransformed = config.batchQuery.map((singleConfig) => {
|
|
92456
92496
|
return {
|
|
92457
92497
|
...singleConfig,
|
|
92458
|
-
query: applyMinimumFieldsToQuery(parse$
|
|
92498
|
+
query: applyMinimumFieldsToQuery(parse$9(print(singleConfig.query))), // Stringifies and parses again to avoid mutating original. Should we just JSON.stringify to avoid the dependency on the parser?
|
|
92459
92499
|
};
|
|
92460
92500
|
});
|
|
92461
92501
|
return {
|
|
@@ -92920,7 +92960,7 @@
|
|
|
92920
92960
|
}
|
|
92921
92961
|
|
|
92922
92962
|
function clone(obj) {
|
|
92923
|
-
return parse$
|
|
92963
|
+
return parse$5(stringify$5(obj));
|
|
92924
92964
|
}
|
|
92925
92965
|
|
|
92926
92966
|
/* global __nimbus */
|
|
@@ -93418,7 +93458,7 @@
|
|
|
93418
93458
|
*/
|
|
93419
93459
|
const { create: create$6, freeze: freeze$3, keys: keys$7, entries } = Object;
|
|
93420
93460
|
const { isArray: isArray$1$1 } = Array;
|
|
93421
|
-
const { stringify: stringify$
|
|
93461
|
+
const { stringify: stringify$2, parse: parse$2 } = JSON;
|
|
93422
93462
|
const LogLevelMap = {
|
|
93423
93463
|
TRACE: 4,
|
|
93424
93464
|
DEBUG: 3,
|
|
@@ -93455,7 +93495,7 @@
|
|
|
93455
93495
|
this.printer(this.formatter(level, message));
|
|
93456
93496
|
}
|
|
93457
93497
|
}
|
|
93458
|
-
let Ok$
|
|
93498
|
+
let Ok$1 = class Ok {
|
|
93459
93499
|
constructor(value) {
|
|
93460
93500
|
this.value = value;
|
|
93461
93501
|
}
|
|
@@ -93477,7 +93517,7 @@
|
|
|
93477
93517
|
return !this.isOk();
|
|
93478
93518
|
}
|
|
93479
93519
|
};
|
|
93480
|
-
const ok$
|
|
93520
|
+
const ok$1 = (value) => new Ok$1(value);
|
|
93481
93521
|
const err$1 = (err2) => new Err$1(err2);
|
|
93482
93522
|
function isSubscribableResult(x) {
|
|
93483
93523
|
if (typeof x !== "object" || x === null) {
|
|
@@ -93540,7 +93580,7 @@
|
|
|
93540
93580
|
return isFinite(node) ? "" + node : "null";
|
|
93541
93581
|
}
|
|
93542
93582
|
if (typeof node !== "object") {
|
|
93543
|
-
return stringify$
|
|
93583
|
+
return stringify$2(node);
|
|
93544
93584
|
}
|
|
93545
93585
|
let i;
|
|
93546
93586
|
let out;
|
|
@@ -93568,7 +93608,7 @@
|
|
|
93568
93608
|
if (out) {
|
|
93569
93609
|
out += ",";
|
|
93570
93610
|
}
|
|
93571
|
-
out += stringify$
|
|
93611
|
+
out += stringify$2(key) + ":" + value;
|
|
93572
93612
|
}
|
|
93573
93613
|
return "{" + out + "}";
|
|
93574
93614
|
}
|
|
@@ -93612,7 +93652,7 @@
|
|
|
93612
93652
|
return err$1(networkResult.error);
|
|
93613
93653
|
} else {
|
|
93614
93654
|
const data = networkResult.value;
|
|
93615
|
-
return ok$
|
|
93655
|
+
return ok$1({
|
|
93616
93656
|
data,
|
|
93617
93657
|
subscribe: (cb) => {
|
|
93618
93658
|
this.subscriptions.push(cb);
|
|
@@ -93631,10 +93671,10 @@
|
|
|
93631
93671
|
if (isSubscribableResult(newResult)) {
|
|
93632
93672
|
const value = newResult.value;
|
|
93633
93673
|
this.subscriptions.forEach((cb) => {
|
|
93634
|
-
cb(ok$
|
|
93674
|
+
cb(ok$1(value.data));
|
|
93635
93675
|
});
|
|
93636
93676
|
}
|
|
93637
|
-
return ok$
|
|
93677
|
+
return ok$1(void 0);
|
|
93638
93678
|
}
|
|
93639
93679
|
return err$1(newResult.error);
|
|
93640
93680
|
});
|
|
@@ -93642,7 +93682,7 @@
|
|
|
93642
93682
|
async afterRequestHooks(_options) {
|
|
93643
93683
|
}
|
|
93644
93684
|
};
|
|
93645
|
-
function buildServiceDescriptor$
|
|
93685
|
+
function buildServiceDescriptor$c() {
|
|
93646
93686
|
return {
|
|
93647
93687
|
type: "networkCommandBaseClass",
|
|
93648
93688
|
version: "1.0",
|
|
@@ -93685,7 +93725,7 @@
|
|
|
93685
93725
|
this.afterRequestHooks({ statusCode: 200 });
|
|
93686
93726
|
} catch (e) {
|
|
93687
93727
|
}
|
|
93688
|
-
return ok$
|
|
93728
|
+
return ok$1(auraReturnValue);
|
|
93689
93729
|
}).catch((error) => {
|
|
93690
93730
|
if (!error || !error.getError) {
|
|
93691
93731
|
return err$1(toError("Failed to get error from response"));
|
|
@@ -93704,7 +93744,7 @@
|
|
|
93704
93744
|
(response2) => {
|
|
93705
93745
|
if (response2.ok) {
|
|
93706
93746
|
return response2.json().then(
|
|
93707
|
-
(json) => ok$
|
|
93747
|
+
(json) => ok$1(json),
|
|
93708
93748
|
(reason) => err$1(toError(reason))
|
|
93709
93749
|
).finally(() => {
|
|
93710
93750
|
try {
|
|
@@ -93744,7 +93784,7 @@
|
|
|
93744
93784
|
return resolvedPromiseLike$3(err$1(toError("Aura/Fetch network services not found")));
|
|
93745
93785
|
}
|
|
93746
93786
|
}
|
|
93747
|
-
function buildServiceDescriptor$
|
|
93787
|
+
function buildServiceDescriptor$b() {
|
|
93748
93788
|
return {
|
|
93749
93789
|
type: "auraNetworkCommandBaseClass",
|
|
93750
93790
|
version: "1.0",
|
|
@@ -93763,7 +93803,7 @@
|
|
|
93763
93803
|
* For full license text, see the LICENSE.txt file
|
|
93764
93804
|
*/
|
|
93765
93805
|
const { isArray: isArray$6 } = Array;
|
|
93766
|
-
|
|
93806
|
+
class Ok {
|
|
93767
93807
|
constructor(value) {
|
|
93768
93808
|
this.value = value;
|
|
93769
93809
|
}
|
|
@@ -93773,7 +93813,7 @@
|
|
|
93773
93813
|
isErr() {
|
|
93774
93814
|
return !this.isOk();
|
|
93775
93815
|
}
|
|
93776
|
-
}
|
|
93816
|
+
}
|
|
93777
93817
|
class Err {
|
|
93778
93818
|
constructor(error) {
|
|
93779
93819
|
this.error = error;
|
|
@@ -93785,7 +93825,7 @@
|
|
|
93785
93825
|
return !this.isOk();
|
|
93786
93826
|
}
|
|
93787
93827
|
}
|
|
93788
|
-
const ok
|
|
93828
|
+
const ok = (value) => new Ok(value);
|
|
93789
93829
|
const err = (err2) => new Err(err2);
|
|
93790
93830
|
function resolvedPromiseLike$2(result) {
|
|
93791
93831
|
if (isPromiseLike$2(result)) {
|
|
@@ -93876,6 +93916,38 @@
|
|
|
93876
93916
|
}
|
|
93877
93917
|
return false;
|
|
93878
93918
|
}
|
|
93919
|
+
class CacheControlRequestRunner {
|
|
93920
|
+
constructor(readFromCache, requestFromNetwork, writeToCache) {
|
|
93921
|
+
this.readFromCacheInternal = readFromCache;
|
|
93922
|
+
this.requestFromNetworkInternal = requestFromNetwork;
|
|
93923
|
+
this.writeToCacheInternal = writeToCache;
|
|
93924
|
+
}
|
|
93925
|
+
readFromCache(cache) {
|
|
93926
|
+
const resultPromise = this.readFromCacheInternal(cache);
|
|
93927
|
+
return resultPromise.then((result) => {
|
|
93928
|
+
if (result.isErr()) {
|
|
93929
|
+
return err(result.error);
|
|
93930
|
+
}
|
|
93931
|
+
this.returnData = result;
|
|
93932
|
+
return ok(void 0);
|
|
93933
|
+
});
|
|
93934
|
+
}
|
|
93935
|
+
requestFromNetwork() {
|
|
93936
|
+
const that = this;
|
|
93937
|
+
return async function* () {
|
|
93938
|
+
const result = await that.requestFromNetworkInternal();
|
|
93939
|
+
if (result.isErr()) {
|
|
93940
|
+
that.networkError = result;
|
|
93941
|
+
} else {
|
|
93942
|
+
that.networkData = result;
|
|
93943
|
+
}
|
|
93944
|
+
yield result;
|
|
93945
|
+
}();
|
|
93946
|
+
}
|
|
93947
|
+
writeToCache(cache, networkResult) {
|
|
93948
|
+
return this.writeToCacheInternal(cache, networkResult);
|
|
93949
|
+
}
|
|
93950
|
+
}
|
|
93879
93951
|
class CacheControlCommand extends BaseCommand {
|
|
93880
93952
|
constructor(services) {
|
|
93881
93953
|
super();
|
|
@@ -93895,57 +93967,48 @@
|
|
|
93895
93967
|
this.cacheControlStrategyConfig,
|
|
93896
93968
|
overrides
|
|
93897
93969
|
);
|
|
93898
|
-
|
|
93899
|
-
let returnError;
|
|
93900
|
-
const requestRunner = {
|
|
93901
|
-
readFromCache: (cache) => {
|
|
93902
|
-
const resultPromise2 = this.buildResultWithSubscribe(cache);
|
|
93903
|
-
return resultPromise2.then((result) => {
|
|
93904
|
-
if (result.isErr()) {
|
|
93905
|
-
return err(result.error);
|
|
93906
|
-
}
|
|
93907
|
-
returnData = result;
|
|
93908
|
-
return ok$1(void 0);
|
|
93909
|
-
});
|
|
93910
|
-
},
|
|
93911
|
-
requestFromNetwork: () => {
|
|
93912
|
-
const that = this;
|
|
93913
|
-
return async function* () {
|
|
93914
|
-
const result = await that.requestFromNetwork();
|
|
93915
|
-
if (result.isErr()) {
|
|
93916
|
-
returnError = result;
|
|
93917
|
-
}
|
|
93918
|
-
yield result;
|
|
93919
|
-
}();
|
|
93920
|
-
},
|
|
93921
|
-
writeToCache: (cache, networkResult) => {
|
|
93922
|
-
return this.writeToCacheAndRecordKeys(cache, networkResult);
|
|
93923
|
-
}
|
|
93924
|
-
};
|
|
93970
|
+
const requestRunner = this.buildRequestRunner();
|
|
93925
93971
|
const resultPromise = this.services.cacheController.execute(mergedCacheControlConfig, requestRunner, {
|
|
93926
93972
|
instrumentationAttributes: this.instrumentationAttributes
|
|
93927
93973
|
});
|
|
93928
93974
|
return resultPromise.then((result) => {
|
|
93929
|
-
return this.
|
|
93930
|
-
|
|
93931
|
-
|
|
93932
|
-
|
|
93933
|
-
|
|
93934
|
-
|
|
93935
|
-
|
|
93936
|
-
|
|
93937
|
-
|
|
93938
|
-
|
|
93939
|
-
if (
|
|
93940
|
-
return
|
|
93975
|
+
return this.handleCacheControllerResult(result, requestRunner);
|
|
93976
|
+
});
|
|
93977
|
+
}
|
|
93978
|
+
handleCacheControllerResult(result, requestRunner) {
|
|
93979
|
+
const { networkError, networkData, returnData } = requestRunner;
|
|
93980
|
+
return this.publishUpdatedKeys().then(() => {
|
|
93981
|
+
if (networkError) {
|
|
93982
|
+
return networkError;
|
|
93983
|
+
}
|
|
93984
|
+
if (result.isErr()) {
|
|
93985
|
+
if (networkData) {
|
|
93986
|
+
return this.constructSubscribableResult(networkData.value);
|
|
93941
93987
|
}
|
|
93942
|
-
|
|
93943
|
-
|
|
93988
|
+
return err(result.error);
|
|
93989
|
+
}
|
|
93990
|
+
if (this.subscriptions.length > 0) {
|
|
93991
|
+
this.subscribeToKeysUsed();
|
|
93992
|
+
}
|
|
93993
|
+
if (returnData === void 0) {
|
|
93994
|
+
if (networkData) {
|
|
93995
|
+
return this.constructSubscribableResult(networkData.value);
|
|
93944
93996
|
}
|
|
93945
|
-
return
|
|
93946
|
-
}
|
|
93997
|
+
return err(new Error("Cache miss after fetching from network"));
|
|
93998
|
+
}
|
|
93999
|
+
if (returnData.isOk() && this.lastEmittedData === void 0) {
|
|
94000
|
+
this.lastEmittedData = returnData.value.data;
|
|
94001
|
+
}
|
|
94002
|
+
return returnData;
|
|
93947
94003
|
});
|
|
93948
94004
|
}
|
|
94005
|
+
buildRequestRunner() {
|
|
94006
|
+
return new CacheControlRequestRunner(
|
|
94007
|
+
(cache) => this.buildResultWithSubscribe(cache),
|
|
94008
|
+
() => this.requestFromNetwork(),
|
|
94009
|
+
(cache, networkResult) => this.writeToCacheAndRecordKeys(cache, networkResult)
|
|
94010
|
+
);
|
|
94011
|
+
}
|
|
93949
94012
|
publishUpdatedKeys() {
|
|
93950
94013
|
if (this.services.pubSub) {
|
|
93951
94014
|
if (this.keysUpdated !== void 0 && this.keysUpdated.size > 0) {
|
|
@@ -93996,7 +94059,7 @@
|
|
|
93996
94059
|
if (result.isErr()) {
|
|
93997
94060
|
return err(result.error);
|
|
93998
94061
|
}
|
|
93999
|
-
return ok
|
|
94062
|
+
return ok(void 0);
|
|
94000
94063
|
});
|
|
94001
94064
|
}
|
|
94002
94065
|
writeToCacheAndRecordKeys(cache, networkResult) {
|
|
@@ -94004,7 +94067,7 @@
|
|
|
94004
94067
|
return this.writeToCache(recordableCache, networkResult).then((result) => {
|
|
94005
94068
|
this.instantiationTime = Date.now() / 1e3;
|
|
94006
94069
|
this.keysUpdated = recordableCache.keysUpdated;
|
|
94007
|
-
return ok
|
|
94070
|
+
return ok(result);
|
|
94008
94071
|
});
|
|
94009
94072
|
}
|
|
94010
94073
|
buildResultWithSubscribe(cache) {
|
|
@@ -94016,14 +94079,18 @@
|
|
|
94016
94079
|
} else {
|
|
94017
94080
|
const data = readResult.value;
|
|
94018
94081
|
this.keysUsed = recordableCache.keysRead;
|
|
94019
|
-
return
|
|
94020
|
-
data,
|
|
94021
|
-
subscribe: this.buildSubscribe(),
|
|
94022
|
-
refresh: () => this.refresh()
|
|
94023
|
-
});
|
|
94082
|
+
return this.constructSubscribableResult(data);
|
|
94024
94083
|
}
|
|
94025
94084
|
});
|
|
94026
94085
|
}
|
|
94086
|
+
constructSubscribableResult(data) {
|
|
94087
|
+
return ok({
|
|
94088
|
+
data,
|
|
94089
|
+
// this cast is in case we need to return Network data as a fallback for caching errors
|
|
94090
|
+
subscribe: this.buildSubscribe(),
|
|
94091
|
+
refresh: () => this.refresh()
|
|
94092
|
+
});
|
|
94093
|
+
}
|
|
94027
94094
|
/**
|
|
94028
94095
|
* Builds a function that subscribes to cache changes via the pubsub service. Whenever
|
|
94029
94096
|
* relevant cache updates occur, it re-reads the data and compares it against
|
|
@@ -94055,7 +94122,7 @@
|
|
|
94055
94122
|
}
|
|
94056
94123
|
if (!this.equals(this.lastEmittedData, result.value.data)) {
|
|
94057
94124
|
this.lastEmittedData = result.value.data;
|
|
94058
|
-
this.invokeConsumerCallbacks(ok
|
|
94125
|
+
this.invokeConsumerCallbacks(ok(result.value.data));
|
|
94059
94126
|
}
|
|
94060
94127
|
return result;
|
|
94061
94128
|
});
|
|
@@ -94143,7 +94210,7 @@
|
|
|
94143
94210
|
this.afterRequestHooks({ statusCode: 200 });
|
|
94144
94211
|
} catch (e) {
|
|
94145
94212
|
}
|
|
94146
|
-
return ok$
|
|
94213
|
+
return ok$1(auraReturnValue);
|
|
94147
94214
|
}).catch((error) => {
|
|
94148
94215
|
if (!error || !error.getError) {
|
|
94149
94216
|
return err$1(toError("Failed to get error from response"));
|
|
@@ -94162,7 +94229,7 @@
|
|
|
94162
94229
|
(response2) => {
|
|
94163
94230
|
if (response2.ok) {
|
|
94164
94231
|
return response2.json().then(
|
|
94165
|
-
(json) => ok$
|
|
94232
|
+
(json) => ok$1(json),
|
|
94166
94233
|
(reason) => err$1(toError(reason))
|
|
94167
94234
|
).finally(() => {
|
|
94168
94235
|
try {
|
|
@@ -94194,10 +94261,10 @@
|
|
|
94194
94261
|
const data = this.buildResultType().query(cache, this.buildQuery());
|
|
94195
94262
|
if (data.isErr()) {
|
|
94196
94263
|
return resolvedPromiseLike$3(
|
|
94197
|
-
err$1(new Error(`Failed to build data from type: ${stringify$
|
|
94264
|
+
err$1(new Error(`Failed to build data from type: ${stringify$2(data.error)}`))
|
|
94198
94265
|
);
|
|
94199
94266
|
}
|
|
94200
|
-
return resolvedPromiseLike$3(ok$
|
|
94267
|
+
return resolvedPromiseLike$3(ok$1(data.value));
|
|
94201
94268
|
}
|
|
94202
94269
|
writeToCache(cache, networkResult) {
|
|
94203
94270
|
if (networkResult.isOk()) {
|
|
@@ -94209,7 +94276,7 @@
|
|
|
94209
94276
|
return resolvedPromiseLike$3(void 0);
|
|
94210
94277
|
}
|
|
94211
94278
|
}
|
|
94212
|
-
function buildServiceDescriptor$
|
|
94279
|
+
function buildServiceDescriptor$a() {
|
|
94213
94280
|
return {
|
|
94214
94281
|
type: "auraNormalizedCacheControlCommand",
|
|
94215
94282
|
version: "1.0",
|
|
@@ -94274,7 +94341,7 @@
|
|
|
94274
94341
|
this.afterRequestHooks({ statusCode: 200 });
|
|
94275
94342
|
} catch (e) {
|
|
94276
94343
|
}
|
|
94277
|
-
return ok$
|
|
94344
|
+
return ok$1(auraReturnValue);
|
|
94278
94345
|
}).catch((error) => {
|
|
94279
94346
|
if (!error || !error.getError) {
|
|
94280
94347
|
return err$1(toError("Failed to get error from response"));
|
|
@@ -94293,7 +94360,7 @@
|
|
|
94293
94360
|
(response2) => {
|
|
94294
94361
|
if (response2.ok) {
|
|
94295
94362
|
return response2.json().then(
|
|
94296
|
-
(json) => ok$
|
|
94363
|
+
(json) => ok$1(json),
|
|
94297
94364
|
(reason) => err$1(toError(reason))
|
|
94298
94365
|
).finally(() => {
|
|
94299
94366
|
try {
|
|
@@ -94330,7 +94397,7 @@
|
|
|
94330
94397
|
if (data === void 0) {
|
|
94331
94398
|
return resolvedPromiseLike$3(err$1(new Error("Failed to find data in cache")));
|
|
94332
94399
|
}
|
|
94333
|
-
return resolvedPromiseLike$3(ok$
|
|
94400
|
+
return resolvedPromiseLike$3(ok$1(data));
|
|
94334
94401
|
}
|
|
94335
94402
|
writeToCache(cache, networkResult) {
|
|
94336
94403
|
if (networkResult.isOk()) {
|
|
@@ -94347,7 +94414,7 @@
|
|
|
94347
94414
|
return `{"endpoint":${this.endpoint},"params":${stableJSONStringify$2(this.auraParams)}}`;
|
|
94348
94415
|
}
|
|
94349
94416
|
}
|
|
94350
|
-
function buildServiceDescriptor$
|
|
94417
|
+
function buildServiceDescriptor$9() {
|
|
94351
94418
|
return {
|
|
94352
94419
|
type: "auraResourceCacheControlCommand",
|
|
94353
94420
|
version: "1.0",
|
|
@@ -94385,7 +94452,7 @@
|
|
|
94385
94452
|
return err$1(networkResult.error);
|
|
94386
94453
|
} else {
|
|
94387
94454
|
const data = networkResult.value;
|
|
94388
|
-
return ok$
|
|
94455
|
+
return ok$1({
|
|
94389
94456
|
data,
|
|
94390
94457
|
subscribe: (cb) => {
|
|
94391
94458
|
this.subscriptions.push(cb);
|
|
@@ -94404,10 +94471,10 @@
|
|
|
94404
94471
|
if (isSubscribableResult(newResult)) {
|
|
94405
94472
|
const value = newResult.value;
|
|
94406
94473
|
this.subscriptions.forEach((cb) => {
|
|
94407
|
-
cb(ok$
|
|
94474
|
+
cb(ok$1(value.data));
|
|
94408
94475
|
});
|
|
94409
94476
|
}
|
|
94410
|
-
return ok$
|
|
94477
|
+
return ok$1(void 0);
|
|
94411
94478
|
}
|
|
94412
94479
|
return err$1(newResult.error);
|
|
94413
94480
|
});
|
|
@@ -94431,7 +94498,7 @@
|
|
|
94431
94498
|
(response2) => {
|
|
94432
94499
|
if (response2.ok) {
|
|
94433
94500
|
return response2.json().then(
|
|
94434
|
-
(json) => ok$
|
|
94501
|
+
(json) => ok$1(json),
|
|
94435
94502
|
(reason) => err$1(toError(reason))
|
|
94436
94503
|
).finally(() => {
|
|
94437
94504
|
try {
|
|
@@ -94454,7 +94521,7 @@
|
|
|
94454
94521
|
);
|
|
94455
94522
|
}
|
|
94456
94523
|
}
|
|
94457
|
-
function buildServiceDescriptor$
|
|
94524
|
+
function buildServiceDescriptor$8() {
|
|
94458
94525
|
return {
|
|
94459
94526
|
type: "fetchNetworkCommandBaseClass",
|
|
94460
94527
|
version: "1.0",
|
|
@@ -94491,7 +94558,7 @@
|
|
|
94491
94558
|
(response2) => {
|
|
94492
94559
|
if (response2.ok) {
|
|
94493
94560
|
return response2.json().then(
|
|
94494
|
-
(json) => ok$
|
|
94561
|
+
(json) => ok$1(json),
|
|
94495
94562
|
(reason) => err$1(toError(reason))
|
|
94496
94563
|
).finally(() => {
|
|
94497
94564
|
try {
|
|
@@ -94523,10 +94590,10 @@
|
|
|
94523
94590
|
const data = this.buildResultType().query(cache, this.buildQuery());
|
|
94524
94591
|
if (data.isErr()) {
|
|
94525
94592
|
return resolvedPromiseLike$3(
|
|
94526
|
-
err$1(new Error(`Failed to build data from type: ${stringify$
|
|
94593
|
+
err$1(new Error(`Failed to build data from type: ${stringify$2(data.error)}`))
|
|
94527
94594
|
);
|
|
94528
94595
|
}
|
|
94529
|
-
return resolvedPromiseLike$3(ok$
|
|
94596
|
+
return resolvedPromiseLike$3(ok$1(data.value));
|
|
94530
94597
|
}
|
|
94531
94598
|
writeToCache(cache, networkResult) {
|
|
94532
94599
|
if (networkResult.isOk()) {
|
|
@@ -94538,7 +94605,7 @@
|
|
|
94538
94605
|
return resolvedPromiseLike$3(void 0);
|
|
94539
94606
|
}
|
|
94540
94607
|
}
|
|
94541
|
-
function buildServiceDescriptor$
|
|
94608
|
+
function buildServiceDescriptor$7() {
|
|
94542
94609
|
return {
|
|
94543
94610
|
type: "httpNormalizedCacheControlCommand",
|
|
94544
94611
|
version: "1.0",
|
|
@@ -94556,12 +94623,12 @@
|
|
|
94556
94623
|
* All rights reserved.
|
|
94557
94624
|
* For full license text, see the LICENSE.txt file
|
|
94558
94625
|
*/
|
|
94559
|
-
const { stringify: stringify$
|
|
94560
|
-
function deepCopy(x) {
|
|
94561
|
-
const stringified = stringify$
|
|
94562
|
-
return stringified ? parse$
|
|
94626
|
+
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
94627
|
+
function deepCopy$1(x) {
|
|
94628
|
+
const stringified = stringify$1(x);
|
|
94629
|
+
return stringified ? parse$1(stringified) : void 0;
|
|
94563
94630
|
}
|
|
94564
|
-
class DefaultRecordableCache {
|
|
94631
|
+
let DefaultRecordableCache$1 = class DefaultRecordableCache {
|
|
94565
94632
|
constructor(baseCache) {
|
|
94566
94633
|
this.baseCache = baseCache;
|
|
94567
94634
|
this.keysRead = /* @__PURE__ */ new Set();
|
|
@@ -94580,7 +94647,7 @@
|
|
|
94580
94647
|
this.missingKeysRead.add(key);
|
|
94581
94648
|
}
|
|
94582
94649
|
if (options == null ? void 0 : options.copy) {
|
|
94583
|
-
return deepCopy(value);
|
|
94650
|
+
return deepCopy$1(value);
|
|
94584
94651
|
}
|
|
94585
94652
|
return value;
|
|
94586
94653
|
}
|
|
@@ -94606,13 +94673,13 @@
|
|
|
94606
94673
|
return new DefaultRecordableCache(this);
|
|
94607
94674
|
}
|
|
94608
94675
|
filter(predicate) {
|
|
94609
|
-
return new DefaultFilteredCache(this, predicate);
|
|
94676
|
+
return new DefaultFilteredCache$1(this, predicate);
|
|
94610
94677
|
}
|
|
94611
94678
|
buildFixedTimeWritableCache(generatedTime) {
|
|
94612
|
-
return new FixedTimeWritableCache(this, generatedTime);
|
|
94679
|
+
return new FixedTimeWritableCache$1(this, generatedTime);
|
|
94613
94680
|
}
|
|
94614
|
-
}
|
|
94615
|
-
class DefaultFilteredCache {
|
|
94681
|
+
};
|
|
94682
|
+
let DefaultFilteredCache$1 = class DefaultFilteredCache {
|
|
94616
94683
|
constructor(baseCache, predicate) {
|
|
94617
94684
|
this.baseCache = baseCache;
|
|
94618
94685
|
this.predicate = predicate;
|
|
@@ -94624,7 +94691,7 @@
|
|
|
94624
94691
|
const result = this.baseCache.get(key);
|
|
94625
94692
|
if (result && this.predicate(key, result)) {
|
|
94626
94693
|
if (options == null ? void 0 : options.copy) {
|
|
94627
|
-
return deepCopy(result);
|
|
94694
|
+
return deepCopy$1(result);
|
|
94628
94695
|
}
|
|
94629
94696
|
return result;
|
|
94630
94697
|
}
|
|
@@ -94646,7 +94713,7 @@
|
|
|
94646
94713
|
return this.getFilteredEntries();
|
|
94647
94714
|
}
|
|
94648
94715
|
record() {
|
|
94649
|
-
return new DefaultRecordableCache(this);
|
|
94716
|
+
return new DefaultRecordableCache$1(this);
|
|
94650
94717
|
}
|
|
94651
94718
|
filter(predicate) {
|
|
94652
94719
|
return new DefaultFilteredCache(this, predicate);
|
|
@@ -94666,10 +94733,10 @@
|
|
|
94666
94733
|
return filteredKeySet;
|
|
94667
94734
|
}
|
|
94668
94735
|
buildFixedTimeWritableCache(generatedTime) {
|
|
94669
|
-
return new FixedTimeWritableCache(this, generatedTime);
|
|
94736
|
+
return new FixedTimeWritableCache$1(this, generatedTime);
|
|
94670
94737
|
}
|
|
94671
|
-
}
|
|
94672
|
-
class FixedTimeWritableCache {
|
|
94738
|
+
};
|
|
94739
|
+
let FixedTimeWritableCache$1 = class FixedTimeWritableCache {
|
|
94673
94740
|
constructor(baseCache, generatedTime) {
|
|
94674
94741
|
this.baseCache = baseCache;
|
|
94675
94742
|
this.generatedTime = generatedTime;
|
|
@@ -94705,22 +94772,22 @@
|
|
|
94705
94772
|
return this.baseCache.entries();
|
|
94706
94773
|
}
|
|
94707
94774
|
record() {
|
|
94708
|
-
return new DefaultRecordableCache(this);
|
|
94775
|
+
return new DefaultRecordableCache$1(this);
|
|
94709
94776
|
}
|
|
94710
94777
|
filter(predicate) {
|
|
94711
|
-
return new DefaultFilteredCache(this, predicate);
|
|
94778
|
+
return new DefaultFilteredCache$1(this, predicate);
|
|
94712
94779
|
}
|
|
94713
94780
|
buildFixedTimeWritableCache(generatedTime) {
|
|
94714
94781
|
return new FixedTimeWritableCache(this, generatedTime);
|
|
94715
94782
|
}
|
|
94716
|
-
}
|
|
94717
|
-
class DefaultCache {
|
|
94783
|
+
};
|
|
94784
|
+
let DefaultCache$1 = class DefaultCache {
|
|
94718
94785
|
constructor() {
|
|
94719
94786
|
this.data = {};
|
|
94720
94787
|
}
|
|
94721
94788
|
get(key, options) {
|
|
94722
94789
|
if (options == null ? void 0 : options.copy) {
|
|
94723
|
-
return deepCopy(this.data[key]);
|
|
94790
|
+
return deepCopy$1(this.data[key]);
|
|
94724
94791
|
}
|
|
94725
94792
|
return this.data[key];
|
|
94726
94793
|
}
|
|
@@ -94782,20 +94849,20 @@
|
|
|
94782
94849
|
return Object.entries(this.data);
|
|
94783
94850
|
}
|
|
94784
94851
|
record() {
|
|
94785
|
-
return new DefaultRecordableCache(this);
|
|
94852
|
+
return new DefaultRecordableCache$1(this);
|
|
94786
94853
|
}
|
|
94787
94854
|
filter(predicate) {
|
|
94788
|
-
return new DefaultFilteredCache(this, predicate);
|
|
94855
|
+
return new DefaultFilteredCache$1(this, predicate);
|
|
94789
94856
|
}
|
|
94790
94857
|
buildFixedTimeWritableCache(generatedTime) {
|
|
94791
|
-
return new FixedTimeWritableCache(this, generatedTime);
|
|
94858
|
+
return new FixedTimeWritableCache$1(this, generatedTime);
|
|
94792
94859
|
}
|
|
94793
|
-
}
|
|
94794
|
-
function buildServiceDescriptor$
|
|
94860
|
+
};
|
|
94861
|
+
function buildServiceDescriptor$6() {
|
|
94795
94862
|
return {
|
|
94796
94863
|
type: "cache",
|
|
94797
94864
|
version: "1.0",
|
|
94798
|
-
service: new DefaultCache()
|
|
94865
|
+
service: new DefaultCache$1()
|
|
94799
94866
|
};
|
|
94800
94867
|
}
|
|
94801
94868
|
|
|
@@ -94828,7 +94895,7 @@
|
|
|
94828
94895
|
const tempCache = this.filteredCache;
|
|
94829
94896
|
return new Promise(async (resolve, reject) => {
|
|
94830
94897
|
try {
|
|
94831
|
-
let readResult = ok$
|
|
94898
|
+
let readResult = ok$1(void 0);
|
|
94832
94899
|
for await (const rfnResult of this.requestRunner.requestFromNetwork()) {
|
|
94833
94900
|
if (rfnResult) {
|
|
94834
94901
|
const result = await this.services.cacheInclusionPolicy.write({
|
|
@@ -94866,13 +94933,13 @@
|
|
|
94866
94933
|
startTime,
|
|
94867
94934
|
options == null ? void 0 : options.instrumentationAttributes
|
|
94868
94935
|
);
|
|
94869
|
-
return ok$
|
|
94936
|
+
return ok$1(void 0);
|
|
94870
94937
|
}
|
|
94871
94938
|
this.collectCacheMissInstrumentation(startTime, options == null ? void 0 : options.instrumentationAttributes);
|
|
94872
94939
|
const tempCache = this.filteredCache;
|
|
94873
94940
|
return new Promise(async (resolve, reject) => {
|
|
94874
94941
|
try {
|
|
94875
|
-
let readResult = ok$
|
|
94942
|
+
let readResult = ok$1(void 0);
|
|
94876
94943
|
for await (const rfnResult of this.requestRunner.requestFromNetwork()) {
|
|
94877
94944
|
if (rfnResult) {
|
|
94878
94945
|
const result = await this.services.cacheInclusionPolicy.write({
|
|
@@ -94888,7 +94955,7 @@
|
|
|
94888
94955
|
readFromL1: (l1) => this.requestRunner.readFromCache(l1)
|
|
94889
94956
|
});
|
|
94890
94957
|
if (readResult.isOk()) {
|
|
94891
|
-
resolve(ok$
|
|
94958
|
+
resolve(ok$1(void 0));
|
|
94892
94959
|
}
|
|
94893
94960
|
}
|
|
94894
94961
|
return resolve(readResult);
|
|
@@ -94959,7 +95026,7 @@
|
|
|
94959
95026
|
yield* this.services.cacheInclusionPolicy.findAndModify(query, cacheUpdate);
|
|
94960
95027
|
}
|
|
94961
95028
|
}
|
|
94962
|
-
function buildServiceDescriptor$
|
|
95029
|
+
function buildServiceDescriptor$5(cache, cacheInclusionPolicy) {
|
|
94963
95030
|
return {
|
|
94964
95031
|
type: "cacheController",
|
|
94965
95032
|
version: "1.0",
|
|
@@ -94967,193 +95034,6 @@
|
|
|
94967
95034
|
};
|
|
94968
95035
|
}
|
|
94969
95036
|
|
|
94970
|
-
/*!
|
|
94971
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
94972
|
-
* All rights reserved.
|
|
94973
|
-
* For full license text, see the LICENSE.txt file
|
|
94974
|
-
*/
|
|
94975
|
-
class CacheInclusionPolicyService {
|
|
94976
|
-
}
|
|
94977
|
-
/*!
|
|
94978
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
94979
|
-
* All rights reserved.
|
|
94980
|
-
* For full license text, see the LICENSE.txt file
|
|
94981
|
-
*/
|
|
94982
|
-
class Ok {
|
|
94983
|
-
constructor(value) {
|
|
94984
|
-
this.value = value;
|
|
94985
|
-
}
|
|
94986
|
-
isOk() {
|
|
94987
|
-
return true;
|
|
94988
|
-
}
|
|
94989
|
-
isErr() {
|
|
94990
|
-
return !this.isOk();
|
|
94991
|
-
}
|
|
94992
|
-
}
|
|
94993
|
-
const ok = (value) => new Ok(value);
|
|
94994
|
-
function resolvedPromiseLike$1(result) {
|
|
94995
|
-
if (isPromiseLike$1(result)) {
|
|
94996
|
-
return result.then((nextResult) => nextResult);
|
|
94997
|
-
}
|
|
94998
|
-
return {
|
|
94999
|
-
then: (onFulfilled, _onRejected) => {
|
|
95000
|
-
try {
|
|
95001
|
-
return resolvedPromiseLike$1(onFulfilled(result));
|
|
95002
|
-
} catch (e) {
|
|
95003
|
-
if (onFulfilled === void 0) {
|
|
95004
|
-
return resolvedPromiseLike$1(result);
|
|
95005
|
-
}
|
|
95006
|
-
return rejectedPromiseLike$1(e);
|
|
95007
|
-
}
|
|
95008
|
-
}
|
|
95009
|
-
};
|
|
95010
|
-
}
|
|
95011
|
-
function rejectedPromiseLike$1(reason) {
|
|
95012
|
-
if (isPromiseLike$1(reason)) {
|
|
95013
|
-
return reason.then((nextResult) => nextResult);
|
|
95014
|
-
}
|
|
95015
|
-
return {
|
|
95016
|
-
then: (_onFulfilled, onRejected) => {
|
|
95017
|
-
if (typeof onRejected === "function") {
|
|
95018
|
-
try {
|
|
95019
|
-
return resolvedPromiseLike$1(onRejected(reason));
|
|
95020
|
-
} catch (e) {
|
|
95021
|
-
return rejectedPromiseLike$1(e);
|
|
95022
|
-
}
|
|
95023
|
-
}
|
|
95024
|
-
return rejectedPromiseLike$1(reason);
|
|
95025
|
-
}
|
|
95026
|
-
};
|
|
95027
|
-
}
|
|
95028
|
-
function isPromiseLike$1(x) {
|
|
95029
|
-
return typeof (x == null ? void 0 : x.then) === "function";
|
|
95030
|
-
}
|
|
95031
|
-
const isAndQuery = (query) => "$and" in query;
|
|
95032
|
-
const isOrQuery = (query) => "$or" in query;
|
|
95033
|
-
const isNotQuery = (query) => "$not" in query;
|
|
95034
|
-
const matchesMetadata = (metadataQuery, cacheControl) => {
|
|
95035
|
-
if ("cacheControlType" in metadataQuery && cacheControl.type !== metadataQuery.cacheControlType.$eq) {
|
|
95036
|
-
return false;
|
|
95037
|
-
}
|
|
95038
|
-
if ("maxAge" in metadataQuery && cacheControl.type === "max-age") {
|
|
95039
|
-
const maxAge = cacheControl.maxAge ?? 0;
|
|
95040
|
-
if (metadataQuery.maxAge.$gte !== void 0 && maxAge < metadataQuery.maxAge.$gte || metadataQuery.maxAge.$lte !== void 0 && maxAge > metadataQuery.maxAge.$lte) {
|
|
95041
|
-
return false;
|
|
95042
|
-
}
|
|
95043
|
-
}
|
|
95044
|
-
return true;
|
|
95045
|
-
};
|
|
95046
|
-
function queryToPredicate(query) {
|
|
95047
|
-
return (key, entry) => {
|
|
95048
|
-
if (!query) return false;
|
|
95049
|
-
if (isAndQuery(query))
|
|
95050
|
-
return query.$and.every((subQuery) => queryToPredicate(subQuery)(key, entry));
|
|
95051
|
-
if (isOrQuery(query))
|
|
95052
|
-
return query.$or.some((subQuery) => queryToPredicate(subQuery)(key, entry));
|
|
95053
|
-
if (isNotQuery(query)) return !queryToPredicate(query.$not)(key, entry);
|
|
95054
|
-
if ("key" in query) return matchesKey(query.key, key);
|
|
95055
|
-
if ("metadata" in query)
|
|
95056
|
-
return matchesMetadata(query.metadata, entry.metadata.cacheControl);
|
|
95057
|
-
if ("value" in query) return false;
|
|
95058
|
-
throw new Error("Unknown Query Operation");
|
|
95059
|
-
};
|
|
95060
|
-
}
|
|
95061
|
-
function matchesKey(keyQuery, key) {
|
|
95062
|
-
if ("$regex" in keyQuery) {
|
|
95063
|
-
return keyQuery.$regex.test(key);
|
|
95064
|
-
}
|
|
95065
|
-
return false;
|
|
95066
|
-
}
|
|
95067
|
-
function buildUpdate(update, existing) {
|
|
95068
|
-
switch (update.type) {
|
|
95069
|
-
case "invalidate":
|
|
95070
|
-
const updatedCacheControl = buildInvalidatedCacheControl(
|
|
95071
|
-
existing.metadata.cacheControl
|
|
95072
|
-
);
|
|
95073
|
-
return updatedCacheControl !== void 0 ? { type: "metadata", metadata: updatedCacheControl } : { type: "no-op" };
|
|
95074
|
-
default:
|
|
95075
|
-
throw new Error(`Invalid update operation: ${update.type}`);
|
|
95076
|
-
}
|
|
95077
|
-
}
|
|
95078
|
-
function buildInvalidatedCacheControl(existingCacheControl) {
|
|
95079
|
-
switch (existingCacheControl.type) {
|
|
95080
|
-
case "max-age":
|
|
95081
|
-
case "stale-while-revalidate":
|
|
95082
|
-
if (existingCacheControl.maxAge !== 0) {
|
|
95083
|
-
return {
|
|
95084
|
-
...existingCacheControl,
|
|
95085
|
-
maxAge: 0
|
|
95086
|
-
};
|
|
95087
|
-
}
|
|
95088
|
-
}
|
|
95089
|
-
return void 0;
|
|
95090
|
-
}
|
|
95091
|
-
class InMemoryCacheInclusionPolicy extends CacheInclusionPolicyService {
|
|
95092
|
-
constructor(services) {
|
|
95093
|
-
super();
|
|
95094
|
-
this.services = services;
|
|
95095
|
-
}
|
|
95096
|
-
/**
|
|
95097
|
-
* Reads data out of a single level in memory store.
|
|
95098
|
-
*/
|
|
95099
|
-
read(options) {
|
|
95100
|
-
const { l1, readFromL1 } = options;
|
|
95101
|
-
return readFromL1(l1);
|
|
95102
|
-
}
|
|
95103
|
-
/**
|
|
95104
|
-
* Writes data to a single level in memory store.
|
|
95105
|
-
*/
|
|
95106
|
-
write(options) {
|
|
95107
|
-
const { l1, writeToL1 } = options;
|
|
95108
|
-
return writeToL1(l1);
|
|
95109
|
-
}
|
|
95110
|
-
/**
|
|
95111
|
-
* Finds cache entries that match the given query.
|
|
95112
|
-
* Returns an async generator that yields `[key, entry]`.
|
|
95113
|
-
*/
|
|
95114
|
-
async *find(query) {
|
|
95115
|
-
const cache = this.services.cache;
|
|
95116
|
-
const predicate = queryToPredicate(query);
|
|
95117
|
-
const filteredEntries = cache.filter(predicate).entries();
|
|
95118
|
-
for (const entry of filteredEntries) {
|
|
95119
|
-
yield entry;
|
|
95120
|
-
}
|
|
95121
|
-
}
|
|
95122
|
-
/**
|
|
95123
|
-
* Finds and modifies cache entries that match the given query.
|
|
95124
|
-
* Extends `find(query)` and returns an async generator of modified keys.
|
|
95125
|
-
*/
|
|
95126
|
-
async *findAndModify(query, cacheUpdate) {
|
|
95127
|
-
const cache = this.services.cache;
|
|
95128
|
-
for await (const [key, value] of this.find(query)) {
|
|
95129
|
-
const update = buildUpdate(cacheUpdate, value);
|
|
95130
|
-
switch (update.type) {
|
|
95131
|
-
case "entry":
|
|
95132
|
-
this.write({
|
|
95133
|
-
l1: cache,
|
|
95134
|
-
writeToL1: (l1) => resolvedPromiseLike$1(ok(l1.set(key, update.entry)))
|
|
95135
|
-
});
|
|
95136
|
-
yield key;
|
|
95137
|
-
break;
|
|
95138
|
-
case "metadata":
|
|
95139
|
-
this.write({
|
|
95140
|
-
l1: cache,
|
|
95141
|
-
writeToL1: (l1) => resolvedPromiseLike$1(ok(l1.setMetadata(key, update.metadata)))
|
|
95142
|
-
});
|
|
95143
|
-
yield key;
|
|
95144
|
-
break;
|
|
95145
|
-
}
|
|
95146
|
-
}
|
|
95147
|
-
}
|
|
95148
|
-
}
|
|
95149
|
-
function buildInMemoryCacheInclusionPolicyService(cache) {
|
|
95150
|
-
return {
|
|
95151
|
-
service: new InMemoryCacheInclusionPolicy({ cache }),
|
|
95152
|
-
type: "cacheInclusionPolicy",
|
|
95153
|
-
version: "1.0"
|
|
95154
|
-
};
|
|
95155
|
-
}
|
|
95156
|
-
|
|
95157
95037
|
/*!
|
|
95158
95038
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
95159
95039
|
* All rights reserved.
|
|
@@ -95192,7 +95072,7 @@
|
|
|
95192
95072
|
};
|
|
95193
95073
|
};
|
|
95194
95074
|
}
|
|
95195
|
-
function buildServiceDescriptor$
|
|
95075
|
+
function buildServiceDescriptor$4(instrumentation) {
|
|
95196
95076
|
return {
|
|
95197
95077
|
type: "instrumentCommand",
|
|
95198
95078
|
version: "1.0",
|
|
@@ -95462,7 +95342,7 @@
|
|
|
95462
95342
|
this.metrics = new O11yOTelMetricsAPI(this.services);
|
|
95463
95343
|
}
|
|
95464
95344
|
}
|
|
95465
|
-
function buildServiceDescriptor$
|
|
95345
|
+
function buildServiceDescriptor$3(logger) {
|
|
95466
95346
|
return {
|
|
95467
95347
|
type: "instrumentation",
|
|
95468
95348
|
version: "1.0",
|
|
@@ -95480,41 +95360,41 @@
|
|
|
95480
95360
|
* All rights reserved.
|
|
95481
95361
|
* For full license text, see the LICENSE.txt file
|
|
95482
95362
|
*/
|
|
95483
|
-
function resolvedPromiseLike(result) {
|
|
95484
|
-
if (isPromiseLike(result)) {
|
|
95363
|
+
function resolvedPromiseLike$1(result) {
|
|
95364
|
+
if (isPromiseLike$1(result)) {
|
|
95485
95365
|
return result.then((nextResult) => nextResult);
|
|
95486
95366
|
}
|
|
95487
95367
|
return {
|
|
95488
95368
|
then: (onFulfilled, _onRejected) => {
|
|
95489
95369
|
try {
|
|
95490
|
-
return resolvedPromiseLike(onFulfilled(result));
|
|
95370
|
+
return resolvedPromiseLike$1(onFulfilled(result));
|
|
95491
95371
|
} catch (e) {
|
|
95492
95372
|
if (onFulfilled === void 0) {
|
|
95493
|
-
return resolvedPromiseLike(result);
|
|
95373
|
+
return resolvedPromiseLike$1(result);
|
|
95494
95374
|
}
|
|
95495
|
-
return rejectedPromiseLike(e);
|
|
95375
|
+
return rejectedPromiseLike$1(e);
|
|
95496
95376
|
}
|
|
95497
95377
|
}
|
|
95498
95378
|
};
|
|
95499
95379
|
}
|
|
95500
|
-
function rejectedPromiseLike(reason) {
|
|
95501
|
-
if (isPromiseLike(reason)) {
|
|
95380
|
+
function rejectedPromiseLike$1(reason) {
|
|
95381
|
+
if (isPromiseLike$1(reason)) {
|
|
95502
95382
|
return reason.then((nextResult) => nextResult);
|
|
95503
95383
|
}
|
|
95504
95384
|
return {
|
|
95505
95385
|
then: (_onFulfilled, onRejected) => {
|
|
95506
95386
|
if (typeof onRejected === "function") {
|
|
95507
95387
|
try {
|
|
95508
|
-
return resolvedPromiseLike(onRejected(reason));
|
|
95388
|
+
return resolvedPromiseLike$1(onRejected(reason));
|
|
95509
95389
|
} catch (e) {
|
|
95510
|
-
return rejectedPromiseLike(e);
|
|
95390
|
+
return rejectedPromiseLike$1(e);
|
|
95511
95391
|
}
|
|
95512
95392
|
}
|
|
95513
|
-
return rejectedPromiseLike(reason);
|
|
95393
|
+
return rejectedPromiseLike$1(reason);
|
|
95514
95394
|
}
|
|
95515
95395
|
};
|
|
95516
95396
|
}
|
|
95517
|
-
function isPromiseLike(x) {
|
|
95397
|
+
function isPromiseLike$1(x) {
|
|
95518
95398
|
return typeof (x == null ? void 0 : x.then) === "function";
|
|
95519
95399
|
}
|
|
95520
95400
|
const EventTypeWildcard = Symbol("EventTypeWildcard");
|
|
@@ -95544,14 +95424,14 @@
|
|
|
95544
95424
|
return;
|
|
95545
95425
|
}
|
|
95546
95426
|
const returnVal = subscription.callback.call(subscription, event);
|
|
95547
|
-
if (isPromiseLike(returnVal)) {
|
|
95427
|
+
if (isPromiseLike$1(returnVal)) {
|
|
95548
95428
|
promises.push(returnVal);
|
|
95549
95429
|
}
|
|
95550
95430
|
});
|
|
95551
95431
|
if (promises.length > 0) {
|
|
95552
95432
|
return Promise.all(promises).then(() => void 0);
|
|
95553
95433
|
}
|
|
95554
|
-
return resolvedPromiseLike(void 0);
|
|
95434
|
+
return resolvedPromiseLike$1(void 0);
|
|
95555
95435
|
}
|
|
95556
95436
|
getSubscriptions(event) {
|
|
95557
95437
|
const eventTypeSubscriptions = this.subscriptions.get(event.type);
|
|
@@ -95572,7 +95452,7 @@
|
|
|
95572
95452
|
return matchingSubscriptions;
|
|
95573
95453
|
}
|
|
95574
95454
|
}
|
|
95575
|
-
function buildServiceDescriptor$
|
|
95455
|
+
function buildServiceDescriptor$2() {
|
|
95576
95456
|
return {
|
|
95577
95457
|
type: "pubSub",
|
|
95578
95458
|
version: "1.0",
|
|
@@ -95585,7 +95465,7 @@
|
|
|
95585
95465
|
* All rights reserved.
|
|
95586
95466
|
* For full license text, see the LICENSE.txt file
|
|
95587
95467
|
*/
|
|
95588
|
-
function buildServiceDescriptor(interceptors = { request: [], response: [] }) {
|
|
95468
|
+
function buildServiceDescriptor$1(interceptors = { request: [], response: [] }) {
|
|
95589
95469
|
return {
|
|
95590
95470
|
type: "fetch",
|
|
95591
95471
|
version: "1.0",
|
|
@@ -95619,7 +95499,7 @@
|
|
|
95619
95499
|
});
|
|
95620
95500
|
};
|
|
95621
95501
|
return {
|
|
95622
|
-
...buildServiceDescriptor(),
|
|
95502
|
+
...buildServiceDescriptor$1(),
|
|
95623
95503
|
service: service,
|
|
95624
95504
|
};
|
|
95625
95505
|
}
|
|
@@ -95668,31 +95548,550 @@
|
|
|
95668
95548
|
};
|
|
95669
95549
|
}
|
|
95670
95550
|
|
|
95551
|
+
/*!
|
|
95552
|
+
* Copyright (c) 2022, Salesforce, Inc.,
|
|
95553
|
+
* All rights reserved.
|
|
95554
|
+
* For full license text, see the LICENSE.txt file
|
|
95555
|
+
*/
|
|
95556
|
+
class CacheInclusionPolicyService {
|
|
95557
|
+
}
|
|
95558
|
+
function setDifference(setA, setB) {
|
|
95559
|
+
const differenceSet = /* @__PURE__ */ new Set();
|
|
95560
|
+
for (const element of setA) {
|
|
95561
|
+
if (!setB.has(element)) {
|
|
95562
|
+
differenceSet.add(element);
|
|
95563
|
+
}
|
|
95564
|
+
}
|
|
95565
|
+
return differenceSet;
|
|
95566
|
+
}
|
|
95567
|
+
function resolvedPromiseLike(result) {
|
|
95568
|
+
if (isPromiseLike(result)) {
|
|
95569
|
+
return result.then((nextResult) => nextResult);
|
|
95570
|
+
}
|
|
95571
|
+
return {
|
|
95572
|
+
then: (onFulfilled, _onRejected) => {
|
|
95573
|
+
try {
|
|
95574
|
+
return resolvedPromiseLike(onFulfilled(result));
|
|
95575
|
+
} catch (e) {
|
|
95576
|
+
if (onFulfilled === void 0) {
|
|
95577
|
+
return resolvedPromiseLike(result);
|
|
95578
|
+
}
|
|
95579
|
+
return rejectedPromiseLike(e);
|
|
95580
|
+
}
|
|
95581
|
+
}
|
|
95582
|
+
};
|
|
95583
|
+
}
|
|
95584
|
+
function rejectedPromiseLike(reason) {
|
|
95585
|
+
if (isPromiseLike(reason)) {
|
|
95586
|
+
return reason.then((nextResult) => nextResult);
|
|
95587
|
+
}
|
|
95588
|
+
return {
|
|
95589
|
+
then: (_onFulfilled, onRejected) => {
|
|
95590
|
+
if (typeof onRejected === "function") {
|
|
95591
|
+
try {
|
|
95592
|
+
return resolvedPromiseLike(onRejected(reason));
|
|
95593
|
+
} catch (e) {
|
|
95594
|
+
return rejectedPromiseLike(e);
|
|
95595
|
+
}
|
|
95596
|
+
}
|
|
95597
|
+
return rejectedPromiseLike(reason);
|
|
95598
|
+
}
|
|
95599
|
+
};
|
|
95600
|
+
}
|
|
95601
|
+
function isPromiseLike(x) {
|
|
95602
|
+
return typeof (x == null ? void 0 : x.then) === "function";
|
|
95603
|
+
}
|
|
95604
|
+
/*!
|
|
95605
|
+
* Copyright (c) 2022, Salesforce, Inc.,
|
|
95606
|
+
* All rights reserved.
|
|
95607
|
+
* For full license text, see the LICENSE.txt file
|
|
95608
|
+
*/
|
|
95609
|
+
/*!
|
|
95610
|
+
* Copyright (c) 2022, Salesforce, Inc.,
|
|
95611
|
+
* All rights reserved.
|
|
95612
|
+
* For full license text, see the LICENSE.txt file
|
|
95613
|
+
*/
|
|
95614
|
+
const { stringify: stringify$8, parse: parse$8 } = JSON;
|
|
95615
|
+
function deepCopy(x) {
|
|
95616
|
+
const stringified = stringify$8(x);
|
|
95617
|
+
return stringified ? parse$8(stringified) : void 0;
|
|
95618
|
+
}
|
|
95619
|
+
class DefaultRecordableCache {
|
|
95620
|
+
constructor(baseCache) {
|
|
95621
|
+
this.baseCache = baseCache;
|
|
95622
|
+
this.keysRead = /* @__PURE__ */ new Set();
|
|
95623
|
+
this.missingKeysRead = /* @__PURE__ */ new Set();
|
|
95624
|
+
this.keysUpdated = /* @__PURE__ */ new Set();
|
|
95625
|
+
this.metadataKeysUpdated = /* @__PURE__ */ new Set();
|
|
95626
|
+
}
|
|
95627
|
+
delete(key) {
|
|
95628
|
+
this.keysUpdated.add(key);
|
|
95629
|
+
this.baseCache.delete(key);
|
|
95630
|
+
}
|
|
95631
|
+
get(key, options) {
|
|
95632
|
+
this.keysRead.add(key);
|
|
95633
|
+
const value = this.baseCache.get(key);
|
|
95634
|
+
if (value === void 0) {
|
|
95635
|
+
this.missingKeysRead.add(key);
|
|
95636
|
+
}
|
|
95637
|
+
if (options == null ? void 0 : options.copy) {
|
|
95638
|
+
return deepCopy(value);
|
|
95639
|
+
}
|
|
95640
|
+
return value;
|
|
95641
|
+
}
|
|
95642
|
+
set(key, value) {
|
|
95643
|
+
this.keysUpdated.add(key);
|
|
95644
|
+
this.metadataKeysUpdated.add(key);
|
|
95645
|
+
this.baseCache.set(key, value);
|
|
95646
|
+
}
|
|
95647
|
+
setMetadata(key, cacheControlMetadata) {
|
|
95648
|
+
this.metadataKeysUpdated.add(key);
|
|
95649
|
+
this.baseCache.setMetadata(key, cacheControlMetadata);
|
|
95650
|
+
}
|
|
95651
|
+
length() {
|
|
95652
|
+
return this.baseCache.length();
|
|
95653
|
+
}
|
|
95654
|
+
keys() {
|
|
95655
|
+
return this.baseCache.keys();
|
|
95656
|
+
}
|
|
95657
|
+
entries() {
|
|
95658
|
+
return this.baseCache.entries();
|
|
95659
|
+
}
|
|
95660
|
+
record() {
|
|
95661
|
+
return new DefaultRecordableCache(this);
|
|
95662
|
+
}
|
|
95663
|
+
filter(predicate) {
|
|
95664
|
+
return new DefaultFilteredCache(this, predicate);
|
|
95665
|
+
}
|
|
95666
|
+
buildFixedTimeWritableCache(generatedTime) {
|
|
95667
|
+
return new FixedTimeWritableCache(this, generatedTime);
|
|
95668
|
+
}
|
|
95669
|
+
}
|
|
95670
|
+
class DefaultFilteredCache {
|
|
95671
|
+
constructor(baseCache, predicate) {
|
|
95672
|
+
this.baseCache = baseCache;
|
|
95673
|
+
this.predicate = predicate;
|
|
95674
|
+
}
|
|
95675
|
+
delete(key) {
|
|
95676
|
+
this.baseCache.delete(key);
|
|
95677
|
+
}
|
|
95678
|
+
get(key, options) {
|
|
95679
|
+
const result = this.baseCache.get(key);
|
|
95680
|
+
if (result && this.predicate(key, result)) {
|
|
95681
|
+
if (options == null ? void 0 : options.copy) {
|
|
95682
|
+
return deepCopy(result);
|
|
95683
|
+
}
|
|
95684
|
+
return result;
|
|
95685
|
+
}
|
|
95686
|
+
return void 0;
|
|
95687
|
+
}
|
|
95688
|
+
set(key, value) {
|
|
95689
|
+
this.baseCache.set(key, value);
|
|
95690
|
+
}
|
|
95691
|
+
setMetadata(key, cacheControlMetadata) {
|
|
95692
|
+
this.baseCache.setMetadata(key, cacheControlMetadata);
|
|
95693
|
+
}
|
|
95694
|
+
length() {
|
|
95695
|
+
return this.getFilteredKeys().size;
|
|
95696
|
+
}
|
|
95697
|
+
keys() {
|
|
95698
|
+
return this.getFilteredKeys();
|
|
95699
|
+
}
|
|
95700
|
+
entries() {
|
|
95701
|
+
return this.getFilteredEntries();
|
|
95702
|
+
}
|
|
95703
|
+
record() {
|
|
95704
|
+
return new DefaultRecordableCache(this);
|
|
95705
|
+
}
|
|
95706
|
+
filter(predicate) {
|
|
95707
|
+
return new DefaultFilteredCache(this, predicate);
|
|
95708
|
+
}
|
|
95709
|
+
getFilteredEntries() {
|
|
95710
|
+
return this.baseCache.entries().filter(([key, _value]) => {
|
|
95711
|
+
return this.get(key);
|
|
95712
|
+
});
|
|
95713
|
+
}
|
|
95714
|
+
getFilteredKeys() {
|
|
95715
|
+
const filteredKeySet = /* @__PURE__ */ new Set();
|
|
95716
|
+
this.baseCache.keys().forEach((key) => {
|
|
95717
|
+
if (this.get(key)) {
|
|
95718
|
+
filteredKeySet.add(key);
|
|
95719
|
+
}
|
|
95720
|
+
});
|
|
95721
|
+
return filteredKeySet;
|
|
95722
|
+
}
|
|
95723
|
+
buildFixedTimeWritableCache(generatedTime) {
|
|
95724
|
+
return new FixedTimeWritableCache(this, generatedTime);
|
|
95725
|
+
}
|
|
95726
|
+
}
|
|
95727
|
+
class FixedTimeWritableCache {
|
|
95728
|
+
constructor(baseCache, generatedTime) {
|
|
95729
|
+
this.baseCache = baseCache;
|
|
95730
|
+
this.generatedTime = generatedTime;
|
|
95731
|
+
}
|
|
95732
|
+
delete(key) {
|
|
95733
|
+
this.baseCache.delete(key);
|
|
95734
|
+
}
|
|
95735
|
+
get(key, options) {
|
|
95736
|
+
return this.baseCache.get(key, options);
|
|
95737
|
+
}
|
|
95738
|
+
set(key, value) {
|
|
95739
|
+
this.baseCache.set(key, {
|
|
95740
|
+
...value,
|
|
95741
|
+
metadata: {
|
|
95742
|
+
...value.metadata,
|
|
95743
|
+
cacheControl: { ...value.metadata.cacheControl, generatedTime: this.generatedTime }
|
|
95744
|
+
}
|
|
95745
|
+
});
|
|
95746
|
+
}
|
|
95747
|
+
setMetadata(key, cacheControlMetadata) {
|
|
95748
|
+
this.baseCache.setMetadata(key, {
|
|
95749
|
+
...cacheControlMetadata,
|
|
95750
|
+
generatedTime: this.generatedTime
|
|
95751
|
+
});
|
|
95752
|
+
}
|
|
95753
|
+
length() {
|
|
95754
|
+
return this.baseCache.length();
|
|
95755
|
+
}
|
|
95756
|
+
keys() {
|
|
95757
|
+
return this.baseCache.keys();
|
|
95758
|
+
}
|
|
95759
|
+
entries() {
|
|
95760
|
+
return this.baseCache.entries();
|
|
95761
|
+
}
|
|
95762
|
+
record() {
|
|
95763
|
+
return new DefaultRecordableCache(this);
|
|
95764
|
+
}
|
|
95765
|
+
filter(predicate) {
|
|
95766
|
+
return new DefaultFilteredCache(this, predicate);
|
|
95767
|
+
}
|
|
95768
|
+
buildFixedTimeWritableCache(generatedTime) {
|
|
95769
|
+
return new FixedTimeWritableCache(this, generatedTime);
|
|
95770
|
+
}
|
|
95771
|
+
}
|
|
95772
|
+
class DefaultCache {
|
|
95773
|
+
constructor() {
|
|
95774
|
+
this.data = {};
|
|
95775
|
+
}
|
|
95776
|
+
get(key, options) {
|
|
95777
|
+
if (options == null ? void 0 : options.copy) {
|
|
95778
|
+
return deepCopy(this.data[key]);
|
|
95779
|
+
}
|
|
95780
|
+
return this.data[key];
|
|
95781
|
+
}
|
|
95782
|
+
/**
|
|
95783
|
+
* Adds the specified key/value to the cache.
|
|
95784
|
+
*
|
|
95785
|
+
* @param key key at which to store value
|
|
95786
|
+
* @param entry value to be stored
|
|
95787
|
+
*/
|
|
95788
|
+
set(key, entry) {
|
|
95789
|
+
if (entry.metadata.cacheControl.type === "no-store") {
|
|
95790
|
+
return;
|
|
95791
|
+
}
|
|
95792
|
+
this.data[key] = {
|
|
95793
|
+
...entry,
|
|
95794
|
+
metadata: {
|
|
95795
|
+
...entry.metadata,
|
|
95796
|
+
type: entry.metadata.type || {
|
|
95797
|
+
namespace: "OneStore:Internal",
|
|
95798
|
+
name: "UnknownType"
|
|
95799
|
+
},
|
|
95800
|
+
cacheControl: {
|
|
95801
|
+
generatedTime: Date.now() / 1e3,
|
|
95802
|
+
...entry.metadata.cacheControl
|
|
95803
|
+
}
|
|
95804
|
+
}
|
|
95805
|
+
};
|
|
95806
|
+
}
|
|
95807
|
+
/**
|
|
95808
|
+
* Removes the cache entry associated with the specified key.
|
|
95809
|
+
*
|
|
95810
|
+
* @param key key to be removed from the store
|
|
95811
|
+
*/
|
|
95812
|
+
delete(key) {
|
|
95813
|
+
delete this.data[key];
|
|
95814
|
+
}
|
|
95815
|
+
/**
|
|
95816
|
+
* Sets the metadata for the specified key if the key is in cache.
|
|
95817
|
+
* If the key doesn't exist, it does nothing.
|
|
95818
|
+
*
|
|
95819
|
+
* @param key key at which to store metadata
|
|
95820
|
+
* @param cacheControlMetadata metadata to be stored
|
|
95821
|
+
*/
|
|
95822
|
+
setMetadata(key, cacheControlMetadata) {
|
|
95823
|
+
if (key in this.data) {
|
|
95824
|
+
this.data[key].metadata.cacheControl = {
|
|
95825
|
+
generatedTime: Date.now() / 1e3,
|
|
95826
|
+
...cacheControlMetadata
|
|
95827
|
+
};
|
|
95828
|
+
}
|
|
95829
|
+
}
|
|
95830
|
+
length() {
|
|
95831
|
+
return this.keys().size;
|
|
95832
|
+
}
|
|
95833
|
+
keys() {
|
|
95834
|
+
return new Set(Object.keys(this.data));
|
|
95835
|
+
}
|
|
95836
|
+
entries() {
|
|
95837
|
+
return Object.entries(this.data);
|
|
95838
|
+
}
|
|
95839
|
+
record() {
|
|
95840
|
+
return new DefaultRecordableCache(this);
|
|
95841
|
+
}
|
|
95842
|
+
filter(predicate) {
|
|
95843
|
+
return new DefaultFilteredCache(this, predicate);
|
|
95844
|
+
}
|
|
95845
|
+
buildFixedTimeWritableCache(generatedTime) {
|
|
95846
|
+
return new FixedTimeWritableCache(this, generatedTime);
|
|
95847
|
+
}
|
|
95848
|
+
}
|
|
95849
|
+
function buildServiceDescriptor() {
|
|
95850
|
+
return {
|
|
95851
|
+
type: "cache",
|
|
95852
|
+
version: "1.0",
|
|
95853
|
+
service: new DefaultCache()
|
|
95854
|
+
};
|
|
95855
|
+
}
|
|
95856
|
+
class DurableCacheInclusionPolicy extends CacheInclusionPolicyService {
|
|
95857
|
+
/**
|
|
95858
|
+
* Reads data out of a 2 level inclusive store.
|
|
95859
|
+
*/
|
|
95860
|
+
read(options) {
|
|
95861
|
+
const { l1, readFromL1, alreadyRevivedKeys } = options;
|
|
95862
|
+
const recordableCache = l1.record();
|
|
95863
|
+
return readFromL1(recordableCache).then((readResult) => {
|
|
95864
|
+
if (readResult.isOk()) {
|
|
95865
|
+
return readResult;
|
|
95866
|
+
}
|
|
95867
|
+
const keysToRevive = recordableCache.keysRead;
|
|
95868
|
+
if (alreadyRevivedKeys && setDifference(keysToRevive, alreadyRevivedKeys).size === 0) {
|
|
95869
|
+
return readResult;
|
|
95870
|
+
}
|
|
95871
|
+
return this.revive(keysToRevive, l1).then((revivedKeys) => {
|
|
95872
|
+
if (setDifference(keysToRevive, revivedKeys).size > 0) {
|
|
95873
|
+
return readResult;
|
|
95874
|
+
}
|
|
95875
|
+
return this.read({ l1, readFromL1, alreadyRevivedKeys: revivedKeys });
|
|
95876
|
+
});
|
|
95877
|
+
});
|
|
95878
|
+
}
|
|
95879
|
+
/**
|
|
95880
|
+
* Writes data to a 2 level inclusive store.
|
|
95881
|
+
*/
|
|
95882
|
+
write(options) {
|
|
95883
|
+
const { l1, writeToL1 } = options;
|
|
95884
|
+
const tempL1 = buildServiceDescriptor().service.record();
|
|
95885
|
+
return writeToL1(tempL1).then(() => {
|
|
95886
|
+
const keysToReviveRecordableCache = l1.record();
|
|
95887
|
+
tempL1.keysUpdated.forEach((key) => keysToReviveRecordableCache.get(key));
|
|
95888
|
+
tempL1.missingKeysRead.forEach((key) => keysToReviveRecordableCache.get(key));
|
|
95889
|
+
const missingKeys = keysToReviveRecordableCache.missingKeysRead;
|
|
95890
|
+
const revivePromiseLike = missingKeys.size > 0 ? this.revive(missingKeys, l1).then(() => void 0) : resolvedPromiseLike(void 0);
|
|
95891
|
+
return revivePromiseLike.then(() => {
|
|
95892
|
+
const recordableCache = l1.record();
|
|
95893
|
+
return writeToL1(recordableCache).then((result) => {
|
|
95894
|
+
this.syncToL2Cache(recordableCache.keysUpdated, l1);
|
|
95895
|
+
return result;
|
|
95896
|
+
});
|
|
95897
|
+
});
|
|
95898
|
+
});
|
|
95899
|
+
}
|
|
95900
|
+
}
|
|
95901
|
+
|
|
95902
|
+
class NimbusDurableCacheInclusionPolicy extends DurableCacheInclusionPolicy {
|
|
95903
|
+
constructor(services, store) {
|
|
95904
|
+
super();
|
|
95905
|
+
this.services = services;
|
|
95906
|
+
this.store = store;
|
|
95907
|
+
this.registerListener();
|
|
95908
|
+
}
|
|
95909
|
+
revive(keys, l1) {
|
|
95910
|
+
if (keys.size === 0)
|
|
95911
|
+
return Promise.resolve(new Set());
|
|
95912
|
+
return this.store.getEntries(keys).then((entries) => {
|
|
95913
|
+
const keysRevived = new Set();
|
|
95914
|
+
if (!entries)
|
|
95915
|
+
return keysRevived;
|
|
95916
|
+
entries.forEach(({ key, entry }) => {
|
|
95917
|
+
l1.set(key, entry);
|
|
95918
|
+
keysRevived.add(key);
|
|
95919
|
+
});
|
|
95920
|
+
return keysRevived;
|
|
95921
|
+
});
|
|
95922
|
+
}
|
|
95923
|
+
syncToL2Cache(changedKeys, l1) {
|
|
95924
|
+
if (changedKeys.size === 0)
|
|
95925
|
+
return Promise.resolve();
|
|
95926
|
+
const entries = [];
|
|
95927
|
+
for (const key of changedKeys) {
|
|
95928
|
+
const entry = l1.get(key);
|
|
95929
|
+
if (entry) {
|
|
95930
|
+
entries.push({ key, entry });
|
|
95931
|
+
}
|
|
95932
|
+
}
|
|
95933
|
+
return entries.length > 0 ? this.store.setEntries(entries) : Promise.resolve();
|
|
95934
|
+
}
|
|
95935
|
+
find(_query) {
|
|
95936
|
+
throw new Error('find not supported on the NimbusDurableCacheInclusionPolicy');
|
|
95937
|
+
}
|
|
95938
|
+
findAndModify(_query, _cacheUpdate) {
|
|
95939
|
+
throw new Error('findAndModify not supported on the NimbusDurableCacheInclusionPolicy');
|
|
95940
|
+
}
|
|
95941
|
+
registerListener() {
|
|
95942
|
+
this.store.registerOnChangedListener(async (changes) => {
|
|
95943
|
+
changes.forEach((change) => {
|
|
95944
|
+
const upsertKeys = new Set();
|
|
95945
|
+
const evictKeys = new Set();
|
|
95946
|
+
for (const key of change.keys) {
|
|
95947
|
+
if (change.type === 'upsert') {
|
|
95948
|
+
upsertKeys.add(key);
|
|
95949
|
+
}
|
|
95950
|
+
else {
|
|
95951
|
+
evictKeys.add(key);
|
|
95952
|
+
}
|
|
95953
|
+
}
|
|
95954
|
+
if (upsertKeys.size > 0) {
|
|
95955
|
+
this.store.getEntries(upsertKeys).then((entries) => {
|
|
95956
|
+
if (entries === undefined)
|
|
95957
|
+
return;
|
|
95958
|
+
entries.forEach(({ key, entry }) => {
|
|
95959
|
+
this.services.cache.set(key, entry);
|
|
95960
|
+
return resolvedPromiseLike$3(ok$1(undefined));
|
|
95961
|
+
});
|
|
95962
|
+
});
|
|
95963
|
+
}
|
|
95964
|
+
// TODO: onestore doesnt support cache eviction yet
|
|
95965
|
+
// if (evictKeys.size > 0) {
|
|
95966
|
+
// evictKeys.forEach((key) => {
|
|
95967
|
+
// this.services.cache.evict(key);
|
|
95968
|
+
// });
|
|
95969
|
+
// }
|
|
95970
|
+
});
|
|
95971
|
+
});
|
|
95972
|
+
}
|
|
95973
|
+
}
|
|
95974
|
+
function buildNimbusDurableCacheInclusionPolicyService(cache, store) {
|
|
95975
|
+
return {
|
|
95976
|
+
service: new NimbusDurableCacheInclusionPolicy({ cache }, store),
|
|
95977
|
+
type: 'cacheInclusionPolicy',
|
|
95978
|
+
version: '1.0',
|
|
95979
|
+
};
|
|
95980
|
+
}
|
|
95981
|
+
|
|
95982
|
+
const TABLE_NAME = 'lds_one_store_data';
|
|
95983
|
+
class NimbusSqliteOneStoreCache {
|
|
95984
|
+
constructor(sqlStore) {
|
|
95985
|
+
this.sqlStore = sqlStore;
|
|
95986
|
+
}
|
|
95987
|
+
async getEntry(key) {
|
|
95988
|
+
const result = await this.query(`SELECT key, data, metadata FROM ${TABLE_NAME} WHERE key = ?`, [key]);
|
|
95989
|
+
if (result.rows.length === 0)
|
|
95990
|
+
return undefined;
|
|
95991
|
+
const [_key, data, metadata] = result.rows[0];
|
|
95992
|
+
return {
|
|
95993
|
+
key,
|
|
95994
|
+
entry: {
|
|
95995
|
+
value: JSON.parse(data),
|
|
95996
|
+
metadata: metadata ? JSON.parse(metadata) : undefined,
|
|
95997
|
+
},
|
|
95998
|
+
};
|
|
95999
|
+
}
|
|
96000
|
+
async getEntries(keys) {
|
|
96001
|
+
if (keys.size === 0)
|
|
96002
|
+
return undefined;
|
|
96003
|
+
const placeholders = Array(keys.size).fill('?').join(', ');
|
|
96004
|
+
const result = await this.query(`SELECT key, data, metadata FROM ${TABLE_NAME} WHERE key IN (${placeholders})`, [...keys]);
|
|
96005
|
+
if (result.rows.length === 0)
|
|
96006
|
+
return undefined;
|
|
96007
|
+
return result.rows.map((row) => {
|
|
96008
|
+
const [key, data, metadata] = row;
|
|
96009
|
+
return {
|
|
96010
|
+
key: key,
|
|
96011
|
+
entry: {
|
|
96012
|
+
value: JSON.parse(data),
|
|
96013
|
+
metadata: metadata ? JSON.parse(metadata) : undefined,
|
|
96014
|
+
},
|
|
96015
|
+
};
|
|
96016
|
+
});
|
|
96017
|
+
}
|
|
96018
|
+
async setEntry(key, entry) {
|
|
96019
|
+
return this.setEntries([{ key, entry }]);
|
|
96020
|
+
}
|
|
96021
|
+
async setEntries(entries) {
|
|
96022
|
+
if (entries.length === 0)
|
|
96023
|
+
return;
|
|
96024
|
+
const rows = entries.map(({ key, entry: { value, metadata } }) => [
|
|
96025
|
+
key,
|
|
96026
|
+
JSON.stringify(value),
|
|
96027
|
+
JSON.stringify(metadata),
|
|
96028
|
+
]);
|
|
96029
|
+
const operation = {
|
|
96030
|
+
type: 'upsert',
|
|
96031
|
+
table: TABLE_NAME,
|
|
96032
|
+
keyColumn: 'key',
|
|
96033
|
+
conflictColumns: ['key'],
|
|
96034
|
+
columns: ['key', 'data', 'metadata'],
|
|
96035
|
+
rows,
|
|
96036
|
+
context: {},
|
|
96037
|
+
};
|
|
96038
|
+
return this.batchQuery([operation]);
|
|
96039
|
+
}
|
|
96040
|
+
registerOnChangedListener(listener) {
|
|
96041
|
+
let unsubscribeId = undefined;
|
|
96042
|
+
this.sqlStore
|
|
96043
|
+
.registerOnChangedListener((changes) => {
|
|
96044
|
+
const onestoreChanges = changes.filter((change) => change.table === TABLE_NAME);
|
|
96045
|
+
return listener(onestoreChanges);
|
|
96046
|
+
})
|
|
96047
|
+
.then((id) => {
|
|
96048
|
+
unsubscribeId = id;
|
|
96049
|
+
});
|
|
96050
|
+
return () => {
|
|
96051
|
+
if (unsubscribeId === undefined)
|
|
96052
|
+
return Promise.resolve();
|
|
96053
|
+
return this.sqlStore.unsubscribeOnChangedListener(unsubscribeId);
|
|
96054
|
+
};
|
|
96055
|
+
}
|
|
96056
|
+
batchQuery(operations) {
|
|
96057
|
+
return new Promise((resolve, reject) => {
|
|
96058
|
+
this.sqlStore.batchOperations(operations, (error) => {
|
|
96059
|
+
error ? reject(error) : resolve();
|
|
96060
|
+
});
|
|
96061
|
+
});
|
|
96062
|
+
}
|
|
96063
|
+
query(sql, params) {
|
|
96064
|
+
return new Promise((resolve, reject) => {
|
|
96065
|
+
this.sqlStore.query(sql, params, resolve, reject);
|
|
96066
|
+
});
|
|
96067
|
+
}
|
|
96068
|
+
}
|
|
96069
|
+
|
|
95671
96070
|
// TODO[@W-18753648]: These services depend on WebApis that aren't available in the worker.
|
|
95672
96071
|
// import { buildServiceDescriptor as buildNdJsonServiceDescriptor } from '@luvio/command-ndjson/v1';
|
|
95673
96072
|
// import { buildServiceDescriptor as buildStreamingCommandServiceDescriptor } from '@luvio/command-streaming/v1';
|
|
95674
96073
|
// import { buildServiceDescriptor as buildSseCommandServiceDescriptor } from '@luvio/command-sse/v1';
|
|
95675
|
-
function initializeOneStore() {
|
|
96074
|
+
function initializeOneStore(sqliteStore) {
|
|
95676
96075
|
if (!useOneStore.isOpen({ fallback: true })) {
|
|
95677
96076
|
return;
|
|
95678
96077
|
}
|
|
95679
96078
|
const loggerService = new ConsoleLogger('ERROR');
|
|
95680
|
-
const cacheServiceDescriptor = buildServiceDescriptor$
|
|
95681
|
-
const instrumentationServiceDescriptor = buildServiceDescriptor$
|
|
95682
|
-
const
|
|
96079
|
+
const cacheServiceDescriptor = buildServiceDescriptor$6();
|
|
96080
|
+
const instrumentationServiceDescriptor = buildServiceDescriptor$3(loggerService);
|
|
96081
|
+
const nimbusSqliteOneStoreCacheServiceDescriptor = buildNimbusDurableCacheInclusionPolicyService(cacheServiceDescriptor.service, new NimbusSqliteOneStoreCache(sqliteStore));
|
|
95683
96082
|
const services = [
|
|
95684
96083
|
instrumentationServiceDescriptor,
|
|
95685
96084
|
buildNimbusFetchServiceDescriptor(),
|
|
95686
|
-
buildServiceDescriptor$
|
|
96085
|
+
buildServiceDescriptor$4(instrumentationServiceDescriptor.service),
|
|
95687
96086
|
// NOTE: These do not directly depend on Aura, and are necessary for HTTP fallback support.
|
|
96087
|
+
buildServiceDescriptor$b(),
|
|
95688
96088
|
buildServiceDescriptor$a(),
|
|
95689
96089
|
buildServiceDescriptor$9(),
|
|
96090
|
+
buildServiceDescriptor$5(cacheServiceDescriptor.service, nimbusSqliteOneStoreCacheServiceDescriptor.service),
|
|
95690
96091
|
buildServiceDescriptor$8(),
|
|
95691
|
-
buildServiceDescriptor$
|
|
96092
|
+
buildServiceDescriptor$c(),
|
|
95692
96093
|
buildServiceDescriptor$7(),
|
|
95693
|
-
buildServiceDescriptor$
|
|
95694
|
-
buildServiceDescriptor$6(),
|
|
95695
|
-
buildServiceDescriptor$1(),
|
|
96094
|
+
buildServiceDescriptor$2(),
|
|
95696
96095
|
// TODO[@W-18753648]: See note above.
|
|
95697
96096
|
// buildStreamingCommandServiceDescriptor(),
|
|
95698
96097
|
// buildNdJsonServiceDescriptor(),
|
|
@@ -95871,7 +96270,7 @@
|
|
|
95871
96270
|
withRegistration('@salesforce/lds-adapters-uiapi/graphql', configureUIAPIGraphQL);
|
|
95872
96271
|
}
|
|
95873
96272
|
// onestore initialization
|
|
95874
|
-
initializeOneStore();
|
|
96273
|
+
initializeOneStore(lazyDurableStore['plugin']);
|
|
95875
96274
|
return {
|
|
95876
96275
|
luvio: lazyLuvio,
|
|
95877
96276
|
internalLuvio: lazyInternalLuvio,
|
|
@@ -95903,7 +96302,7 @@
|
|
|
95903
96302
|
id: '@salesforce/lds-network-adapter',
|
|
95904
96303
|
instrument: instrument$2,
|
|
95905
96304
|
});
|
|
95906
|
-
// version: 1.
|
|
96305
|
+
// version: 1.370.0-3ec6ffba72
|
|
95907
96306
|
|
|
95908
96307
|
const { create: create$2, keys: keys$2 } = Object;
|
|
95909
96308
|
const { stringify, parse } = JSON;
|
|
@@ -96557,6 +96956,267 @@
|
|
|
96557
96956
|
}
|
|
96558
96957
|
const keyPrefix$1 = 'UiApi';
|
|
96559
96958
|
|
|
96959
|
+
/**
|
|
96960
|
+
* Defines configuration for the module with a default value which can be overridden by the runtime environment.
|
|
96961
|
+
*/
|
|
96962
|
+
// A holder for a configurable adapter override
|
|
96963
|
+
let Configurable$1 = class Configurable {
|
|
96964
|
+
constructor() {
|
|
96965
|
+
this.getAdapter = () => {
|
|
96966
|
+
return this.adapter;
|
|
96967
|
+
};
|
|
96968
|
+
this.setAdapter = (value) => {
|
|
96969
|
+
this.adapter = value;
|
|
96970
|
+
};
|
|
96971
|
+
this.adapter = undefined;
|
|
96972
|
+
}
|
|
96973
|
+
};
|
|
96974
|
+
// Configurable adapters that can have environmental overrides
|
|
96975
|
+
let configurableCreateRecordAdapter$1 = new Configurable$1();
|
|
96976
|
+
let configurableUpdateRecordAdapter$1 = new Configurable$1();
|
|
96977
|
+
let configurableDeleteRecordAdapter$1 = new Configurable$1();
|
|
96978
|
+
let configurablePerformQuickActionAdapter$1 = new Configurable$1();
|
|
96979
|
+
let configurablePerformUpdateRecordQuickActionAdapter$1 = new Configurable$1();
|
|
96980
|
+
let configurableCreateContentDocumentAndVersion$1 = new Configurable$1();
|
|
96981
|
+
let configurableCreateContentVersion$1 = new Configurable$1();
|
|
96982
|
+
/**
|
|
96983
|
+
* Depth to which tracked fields will be added to a request that results from a cache miss.
|
|
96984
|
+
* A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
|
|
96985
|
+
* be reached by following 1 relationship from the root record, etc.
|
|
96986
|
+
* @defaultValue '5', replicates the current behavior
|
|
96987
|
+
*/
|
|
96988
|
+
let trackedFieldDepthOnCacheMiss$1 = 5;
|
|
96989
|
+
/**
|
|
96990
|
+
* Depth to which tracked fields will be added to a request that results from a merge conflict
|
|
96991
|
+
* A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
|
|
96992
|
+
* be reached by following 1 relationship from the root record, etc.
|
|
96993
|
+
* @defaultValue '5', replicates the current behavior
|
|
96994
|
+
*/
|
|
96995
|
+
let trackedFieldDepthOnCacheMergeConflict$1 = 5;
|
|
96996
|
+
/**
|
|
96997
|
+
* Depth to which tracked fields will be added to a request that results from a notify change invocation by the consumer
|
|
96998
|
+
* A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
|
|
96999
|
+
* be reached by following 1 relationship from the root record, etc.
|
|
97000
|
+
* @defaultValue '5', replicates the current behavior
|
|
97001
|
+
*/
|
|
97002
|
+
let trackedFieldDepthOnNotifyChange$1 = 5;
|
|
97003
|
+
/**
|
|
97004
|
+
* Determines if we will only fetch the 'Id' field for the leaf relationship record
|
|
97005
|
+
* @defaultValue 'false', replicates the current behavior and fetches all fields in the store for the leaf relationship record
|
|
97006
|
+
*/
|
|
97007
|
+
let trackedFieldLeafNodeIdAndNameOnly$1 = false;
|
|
97008
|
+
/**
|
|
97009
|
+
* One store enabled Get Object Info adapter
|
|
97010
|
+
*/
|
|
97011
|
+
let oneStoreGetObjectInfoAdapter$1 = undefined;
|
|
97012
|
+
/**
|
|
97013
|
+
* One store enabled Get Object Infos adapter
|
|
97014
|
+
*/
|
|
97015
|
+
let oneStoreGetObjectInfosAdapter$1 = undefined;
|
|
97016
|
+
/**
|
|
97017
|
+
* One store enabled GraphQL adapter
|
|
97018
|
+
*/
|
|
97019
|
+
let oneStoreGraphQLWireAdapter$1 = undefined;
|
|
97020
|
+
/**
|
|
97021
|
+
* One store enabled GraphQL imperative query adapter
|
|
97022
|
+
*/
|
|
97023
|
+
let oneStoreGraphQLImperativeQueryAdapter$1 = undefined;
|
|
97024
|
+
/**
|
|
97025
|
+
* Determines when to include PDL strategies for Related Lists
|
|
97026
|
+
*/
|
|
97027
|
+
let relatedListsPredictionsEnabled$1 = false;
|
|
97028
|
+
/**
|
|
97029
|
+
* Determines whether to include additional PDL strategies for Related Lists
|
|
97030
|
+
*/
|
|
97031
|
+
let relatedListsPlusPredictionsEnabled$1 = false;
|
|
97032
|
+
let recordRepresentationIngestionOverride$1 = undefined;
|
|
97033
|
+
/**
|
|
97034
|
+
* Defines the configuration API and is exposed internally as well as externally.
|
|
97035
|
+
* Configuration for one store enabled REST adapters only.
|
|
97036
|
+
*/
|
|
97037
|
+
const configurationForOneStoreEnabledAdapters$1 = {
|
|
97038
|
+
setGetObjectInfoAdapter: function (adapter) {
|
|
97039
|
+
oneStoreGetObjectInfoAdapter$1 = adapter;
|
|
97040
|
+
},
|
|
97041
|
+
getGetObjectInfoAdapter: function () {
|
|
97042
|
+
return oneStoreGetObjectInfoAdapter$1;
|
|
97043
|
+
},
|
|
97044
|
+
setGetObjectInfosAdapter: function (adapter) {
|
|
97045
|
+
oneStoreGetObjectInfosAdapter$1 = adapter;
|
|
97046
|
+
},
|
|
97047
|
+
getGetObjectInfosAdapter: function () {
|
|
97048
|
+
return oneStoreGetObjectInfosAdapter$1;
|
|
97049
|
+
},
|
|
97050
|
+
setGraphQLWireAdapter: function (adapter) {
|
|
97051
|
+
oneStoreGraphQLWireAdapter$1 = adapter;
|
|
97052
|
+
},
|
|
97053
|
+
getGraphQLWireAdapter: function () {
|
|
97054
|
+
return oneStoreGraphQLWireAdapter$1;
|
|
97055
|
+
},
|
|
97056
|
+
setGraphQLImperativeQueryAdapter: function (adapter) {
|
|
97057
|
+
oneStoreGraphQLImperativeQueryAdapter$1 = adapter;
|
|
97058
|
+
},
|
|
97059
|
+
getGraphQLImperativeQueryAdapter: function () {
|
|
97060
|
+
return oneStoreGraphQLImperativeQueryAdapter$1;
|
|
97061
|
+
},
|
|
97062
|
+
};
|
|
97063
|
+
/**
|
|
97064
|
+
* Helper function to return the one store adapter if it's defined, otherwise return the luvio adapter.
|
|
97065
|
+
* @param luvioAdapter - The luvio bound adapter.
|
|
97066
|
+
* @param oneStoreAdapter - The one store bound adapter.
|
|
97067
|
+
* @returns Luvio or one store wire adapter constructor.
|
|
97068
|
+
*/
|
|
97069
|
+
function getLuvioOrOneStoreAdapter(luvioAdapter, oneStoreAdapter) {
|
|
97070
|
+
return oneStoreAdapter ?? luvioAdapter;
|
|
97071
|
+
}
|
|
97072
|
+
const getKeywordSearchResultsFactory$1 = new Configurable$1();
|
|
97073
|
+
const getListRecordsByNameFactory$1 = new Configurable$1();
|
|
97074
|
+
const getListUiFactory$1 = new Configurable$1();
|
|
97075
|
+
const getLookupRecordsFactory$1 = new Configurable$1();
|
|
97076
|
+
const getQuickActionDefaultsFactory$1 = new Configurable$1();
|
|
97077
|
+
const getRecordCreateDefaultsFactory$1 = new Configurable$1();
|
|
97078
|
+
const getRecordTemplateCloneFactory$1 = new Configurable$1();
|
|
97079
|
+
const getRecordTemplateCreateFactory$1 = new Configurable$1();
|
|
97080
|
+
const getRecordUiFactory$1 = new Configurable$1();
|
|
97081
|
+
const getRecordFactory$1 = new Configurable$1();
|
|
97082
|
+
const getRecordsFactory$1 = new Configurable$1();
|
|
97083
|
+
const getRelatedListRecordsFactory$1 = new Configurable$1();
|
|
97084
|
+
const getRelatedListRecordsBatchFactory$1 = new Configurable$1();
|
|
97085
|
+
const getSearchResultsFactory$1 = new Configurable$1();
|
|
97086
|
+
// The following set of adapters all touch RecordRepresentation directly or indirectly,
|
|
97087
|
+
// so they need to support having a custom factory provided by the mobile environment.
|
|
97088
|
+
const configurationForEnvironmentFactoryOverrides$1 = {
|
|
97089
|
+
getKeywordSearchResultsAdapterFactory: getKeywordSearchResultsFactory$1.getAdapter,
|
|
97090
|
+
setGetKeywordSearchResultsAdapterFactory: getKeywordSearchResultsFactory$1.setAdapter,
|
|
97091
|
+
getListRecordsByNameAdapterFactory: getListRecordsByNameFactory$1.getAdapter,
|
|
97092
|
+
setGetListRecordsByNameAdapterFactory: getListRecordsByNameFactory$1.setAdapter,
|
|
97093
|
+
getListUiAdapterFactory: getListUiFactory$1.getAdapter,
|
|
97094
|
+
setGetListUiAdapterFactory: getListUiFactory$1.setAdapter,
|
|
97095
|
+
getLookupRecordsAdapterFactory: getLookupRecordsFactory$1.getAdapter,
|
|
97096
|
+
setGetLookupRecordsAdapterFactory: getLookupRecordsFactory$1.setAdapter,
|
|
97097
|
+
getQuickActionDefaultsAdapterFactory: getQuickActionDefaultsFactory$1.getAdapter,
|
|
97098
|
+
setGetQuickActionDefaultsAdapterFactory: getQuickActionDefaultsFactory$1.setAdapter,
|
|
97099
|
+
getRecordCreateDefaultsAdapterFactory: getRecordCreateDefaultsFactory$1.getAdapter,
|
|
97100
|
+
setGetRecordCreateDefaultsAdapterFactory: getRecordCreateDefaultsFactory$1.setAdapter,
|
|
97101
|
+
getRecordTemplateCloneAdapterFactory: getRecordTemplateCloneFactory$1.getAdapter,
|
|
97102
|
+
setGetRecordTemplateCloneAdapterFactory: getRecordTemplateCloneFactory$1.setAdapter,
|
|
97103
|
+
getRecordTemplateCreateAdapterFactory: getRecordTemplateCreateFactory$1.getAdapter,
|
|
97104
|
+
setGetRecordTemplateCreateAdapterFactory: getRecordTemplateCreateFactory$1.setAdapter,
|
|
97105
|
+
getRecordUiAdapterFactory: getRecordUiFactory$1.getAdapter,
|
|
97106
|
+
setGetRecordUiAdapterFactory: getRecordUiFactory$1.setAdapter,
|
|
97107
|
+
getRecordAdapterFactory: getRecordFactory$1.getAdapter,
|
|
97108
|
+
setGetRecordAdapterFactory: getRecordFactory$1.setAdapter,
|
|
97109
|
+
getRecordsAdapterFactory: getRecordsFactory$1.getAdapter,
|
|
97110
|
+
setGetRecordsAdapterFactory: getRecordsFactory$1.setAdapter,
|
|
97111
|
+
getRelatedListRecordsAdapterFactory: getRelatedListRecordsFactory$1.getAdapter,
|
|
97112
|
+
setGetRelatedListRecordsAdapterFactory: getRelatedListRecordsFactory$1.setAdapter,
|
|
97113
|
+
getRelatedListRecordsBatchAdapterFactory: getRelatedListRecordsBatchFactory$1.getAdapter,
|
|
97114
|
+
setGetRelatedListRecordsBatchAdapterFactory: getRelatedListRecordsBatchFactory$1.setAdapter,
|
|
97115
|
+
getSearchResultsAdapterFactory: getSearchResultsFactory$1.getAdapter,
|
|
97116
|
+
setGetSearchResultsAdapterFactory: getSearchResultsFactory$1.setAdapter,
|
|
97117
|
+
};
|
|
97118
|
+
/**
|
|
97119
|
+
* Defines the configuration API and is exposed internally as well as externally.
|
|
97120
|
+
* Configuration for REST adapters only.
|
|
97121
|
+
*/
|
|
97122
|
+
const configurationForRestAdapters$1 = {
|
|
97123
|
+
setTrackedFieldDepthOnCacheMiss: function (trackedFieldDepthOnCacheMissParam) {
|
|
97124
|
+
trackedFieldDepthOnCacheMiss$1 = trackedFieldDepthOnCacheMissParam;
|
|
97125
|
+
},
|
|
97126
|
+
getTrackedFieldDepthOnCacheMiss: function () {
|
|
97127
|
+
return trackedFieldDepthOnCacheMiss$1;
|
|
97128
|
+
},
|
|
97129
|
+
setTrackedFieldDepthOnCacheMergeConflict: function (trackedFieldDepthOnCacheMergeConflictParam) {
|
|
97130
|
+
trackedFieldDepthOnCacheMergeConflict$1 = trackedFieldDepthOnCacheMergeConflictParam;
|
|
97131
|
+
},
|
|
97132
|
+
getTrackedFieldDepthOnCacheMergeConflict: function () {
|
|
97133
|
+
return trackedFieldDepthOnCacheMergeConflict$1;
|
|
97134
|
+
},
|
|
97135
|
+
setTrackedFieldDepthOnNotifyChange: function (trackedFieldDepthOnNotifyChangeParam) {
|
|
97136
|
+
trackedFieldDepthOnNotifyChange$1 = trackedFieldDepthOnNotifyChangeParam;
|
|
97137
|
+
},
|
|
97138
|
+
getTrackedFieldDepthOnNotifyChange: function () {
|
|
97139
|
+
return trackedFieldDepthOnNotifyChange$1;
|
|
97140
|
+
},
|
|
97141
|
+
setTrackedFieldLeafNodeIdAndNameOnly: function (trackedFieldLeafNodeIdAndNameOnlyParam) {
|
|
97142
|
+
trackedFieldLeafNodeIdAndNameOnly$1 = trackedFieldLeafNodeIdAndNameOnlyParam;
|
|
97143
|
+
},
|
|
97144
|
+
getTrackedFieldLeafNodeIdAndNameOnly: function () {
|
|
97145
|
+
return trackedFieldLeafNodeIdAndNameOnly$1;
|
|
97146
|
+
},
|
|
97147
|
+
setRelatedListsPredictionsEnabled: function (f) {
|
|
97148
|
+
relatedListsPredictionsEnabled$1 = f;
|
|
97149
|
+
},
|
|
97150
|
+
areRelatedListsPredictionsEnabled: function () {
|
|
97151
|
+
return relatedListsPredictionsEnabled$1 === true;
|
|
97152
|
+
},
|
|
97153
|
+
setRelatedListsPlusPredictionsEnabled: function (f) {
|
|
97154
|
+
relatedListsPlusPredictionsEnabled$1 = f;
|
|
97155
|
+
},
|
|
97156
|
+
areRelatedListsPlusPredictionsEnabled: function () {
|
|
97157
|
+
return relatedListsPlusPredictionsEnabled$1 === true;
|
|
97158
|
+
},
|
|
97159
|
+
setRecordRepresentationIngestionOverride: function (ingest) {
|
|
97160
|
+
recordRepresentationIngestionOverride$1 = ingest;
|
|
97161
|
+
},
|
|
97162
|
+
getRecordRepresentationIngestionOverride: function () {
|
|
97163
|
+
return recordRepresentationIngestionOverride$1;
|
|
97164
|
+
},
|
|
97165
|
+
// createRecord
|
|
97166
|
+
getDraftAwareCreateRecordAdapter: configurableCreateRecordAdapter$1.getAdapter,
|
|
97167
|
+
setDraftAwareCreateRecordAdapter: configurableCreateRecordAdapter$1.setAdapter,
|
|
97168
|
+
// updateRecord
|
|
97169
|
+
getDraftAwareUpdateRecordAdapter: configurableUpdateRecordAdapter$1.getAdapter,
|
|
97170
|
+
setDraftAwareUpdateRecordAdapter: configurableUpdateRecordAdapter$1.setAdapter,
|
|
97171
|
+
// deleteRecord
|
|
97172
|
+
getDraftAwareDeleteRecordAdapter: configurableDeleteRecordAdapter$1.getAdapter,
|
|
97173
|
+
setDraftAwareDeleteRecordAdapter: configurableDeleteRecordAdapter$1.setAdapter,
|
|
97174
|
+
// performQuickAction
|
|
97175
|
+
getDraftAwarePerformQuickActionAdapter: configurablePerformQuickActionAdapter$1.getAdapter,
|
|
97176
|
+
setDraftAwarePerformQuickActionAdapter: configurablePerformQuickActionAdapter$1.setAdapter,
|
|
97177
|
+
// performRecordUpdateQuickAction
|
|
97178
|
+
getDraftAwarePerformUpdateRecordQuickActionAdapter: configurablePerformUpdateRecordQuickActionAdapter$1.getAdapter,
|
|
97179
|
+
setDraftAwarePerformUpdateRecordQuickActionAdapter: configurablePerformUpdateRecordQuickActionAdapter$1.setAdapter,
|
|
97180
|
+
// createContentDocumentAndVersion
|
|
97181
|
+
getDraftAwareCreateContentDocumentAndVersionAdapter: configurableCreateContentDocumentAndVersion$1.getAdapter,
|
|
97182
|
+
setDraftAwareCreateContentDocumentAndVersionAdapter: configurableCreateContentDocumentAndVersion$1.setAdapter,
|
|
97183
|
+
// createContentVersion
|
|
97184
|
+
getDraftAwareCreateContentVersionAdapter: configurableCreateContentVersion$1.getAdapter,
|
|
97185
|
+
setDraftAwareCreateContentVersionAdapter: configurableCreateContentVersion$1.setAdapter,
|
|
97186
|
+
...configurationForOneStoreEnabledAdapters$1,
|
|
97187
|
+
...configurationForEnvironmentFactoryOverrides$1,
|
|
97188
|
+
};
|
|
97189
|
+
let configurableGraphQLAdapter$1 = new Configurable$1();
|
|
97190
|
+
let configurableGraphQLBatchAdapter$1 = new Configurable$1();
|
|
97191
|
+
/**
|
|
97192
|
+
* Defines the configuration API and is exposed internally as well as externally.
|
|
97193
|
+
* Configuration for GraphQL adapters only.
|
|
97194
|
+
*/
|
|
97195
|
+
const configurationForGraphQLAdapters$1 = {
|
|
97196
|
+
getDraftAwareGraphQLAdapter: configurableGraphQLAdapter$1.getAdapter,
|
|
97197
|
+
setDraftAwareGraphQLAdapter: configurableGraphQLAdapter$1.setAdapter,
|
|
97198
|
+
getEnvironmentAwareGraphQLBatchAdapter: configurableGraphQLBatchAdapter$1.getAdapter,
|
|
97199
|
+
setEnvironmentAwareGraphQLBatchAdapter: configurableGraphQLBatchAdapter$1.setAdapter,
|
|
97200
|
+
};
|
|
97201
|
+
const registrations$1 = new Set();
|
|
97202
|
+
/**
|
|
97203
|
+
* lds-adapter-uiapi is special. The non-SFDC bundle combines REST and GQL adapters,
|
|
97204
|
+
* yet for SFDC those are separate bundles. So non-SFDC bundle (./main.ts) registers
|
|
97205
|
+
* both REST and GQL configs. We want each SFDC bundle to register (we don't want one
|
|
97206
|
+
* SFDC bundle to assume the other is being loaded and therefore the other one will
|
|
97207
|
+
* take care of registration) but we don't want to double register either.
|
|
97208
|
+
*
|
|
97209
|
+
* So we make this function that memoizes if it's been called before and only
|
|
97210
|
+
* actually registers once.
|
|
97211
|
+
*/
|
|
97212
|
+
function ensureRegisteredOnce$1(registration) {
|
|
97213
|
+
const { id } = registration;
|
|
97214
|
+
if (!registrations$1.has(id)) {
|
|
97215
|
+
register$1(registration);
|
|
97216
|
+
registrations$1.add(id);
|
|
97217
|
+
}
|
|
97218
|
+
}
|
|
97219
|
+
|
|
96560
97220
|
const { keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
|
|
96561
97221
|
function equalsObject(a, b, equalsProp) {
|
|
96562
97222
|
const aKeys = ObjectKeys(a).sort();
|
|
@@ -120790,7 +121450,7 @@
|
|
|
120790
121450
|
// Make a copy of the config before running transform to avoid mutating the original config
|
|
120791
121451
|
const adapterConfigCopy = {
|
|
120792
121452
|
...config,
|
|
120793
|
-
query: parse$
|
|
121453
|
+
query: parse$9(print(config.query))
|
|
120794
121454
|
};
|
|
120795
121455
|
return {
|
|
120796
121456
|
...adapterConfigCopy,
|
|
@@ -120853,238 +121513,6 @@
|
|
|
120853
121513
|
return cacheSnapshot;
|
|
120854
121514
|
}
|
|
120855
121515
|
|
|
120856
|
-
/**
|
|
120857
|
-
* Defines configuration for the module with a default value which can be overridden by the runtime environment.
|
|
120858
|
-
*/
|
|
120859
|
-
// A holder for a configurable adapter override
|
|
120860
|
-
let Configurable$1 = class Configurable {
|
|
120861
|
-
constructor() {
|
|
120862
|
-
this.getAdapter = () => {
|
|
120863
|
-
return this.adapter;
|
|
120864
|
-
};
|
|
120865
|
-
this.setAdapter = (value) => {
|
|
120866
|
-
this.adapter = value;
|
|
120867
|
-
};
|
|
120868
|
-
this.adapter = undefined;
|
|
120869
|
-
}
|
|
120870
|
-
};
|
|
120871
|
-
// Configurable adapters that can have environmental overrides
|
|
120872
|
-
let configurableCreateRecordAdapter$1 = new Configurable$1();
|
|
120873
|
-
let configurableUpdateRecordAdapter$1 = new Configurable$1();
|
|
120874
|
-
let configurableDeleteRecordAdapter$1 = new Configurable$1();
|
|
120875
|
-
let configurablePerformQuickActionAdapter$1 = new Configurable$1();
|
|
120876
|
-
let configurablePerformUpdateRecordQuickActionAdapter$1 = new Configurable$1();
|
|
120877
|
-
let configurableCreateContentDocumentAndVersion$1 = new Configurable$1();
|
|
120878
|
-
let configurableCreateContentVersion$1 = new Configurable$1();
|
|
120879
|
-
/**
|
|
120880
|
-
* Depth to which tracked fields will be added to a request that results from a cache miss.
|
|
120881
|
-
* A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
|
|
120882
|
-
* be reached by following 1 relationship from the root record, etc.
|
|
120883
|
-
* @defaultValue '5', replicates the current behavior
|
|
120884
|
-
*/
|
|
120885
|
-
let trackedFieldDepthOnCacheMiss$1 = 5;
|
|
120886
|
-
/**
|
|
120887
|
-
* Depth to which tracked fields will be added to a request that results from a merge conflict
|
|
120888
|
-
* A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
|
|
120889
|
-
* be reached by following 1 relationship from the root record, etc.
|
|
120890
|
-
* @defaultValue '5', replicates the current behavior
|
|
120891
|
-
*/
|
|
120892
|
-
let trackedFieldDepthOnCacheMergeConflict$1 = 5;
|
|
120893
|
-
/**
|
|
120894
|
-
* Depth to which tracked fields will be added to a request that results from a notify change invocation by the consumer
|
|
120895
|
-
* A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
|
|
120896
|
-
* be reached by following 1 relationship from the root record, etc.
|
|
120897
|
-
* @defaultValue '5', replicates the current behavior
|
|
120898
|
-
*/
|
|
120899
|
-
let trackedFieldDepthOnNotifyChange$1 = 5;
|
|
120900
|
-
/**
|
|
120901
|
-
* Determines if we will only fetch the 'Id' field for the leaf relationship record
|
|
120902
|
-
* @defaultValue 'false', replicates the current behavior and fetches all fields in the store for the leaf relationship record
|
|
120903
|
-
*/
|
|
120904
|
-
let trackedFieldLeafNodeIdAndNameOnly$1 = false;
|
|
120905
|
-
/**
|
|
120906
|
-
* One store enabled Get Object Info adapter
|
|
120907
|
-
*/
|
|
120908
|
-
let oneStoreGetObjectInfoAdapter$1 = undefined;
|
|
120909
|
-
/**
|
|
120910
|
-
* One store enabled Get Object Infos adapter
|
|
120911
|
-
*/
|
|
120912
|
-
let oneStoreGetObjectInfosAdapter$1 = undefined;
|
|
120913
|
-
/**
|
|
120914
|
-
* Determines when to include PDL strategies for Related Lists
|
|
120915
|
-
*/
|
|
120916
|
-
let relatedListsPredictionsEnabled$1 = false;
|
|
120917
|
-
/**
|
|
120918
|
-
* Determines whether to include additional PDL strategies for Related Lists
|
|
120919
|
-
*/
|
|
120920
|
-
let relatedListsPlusPredictionsEnabled$1 = false;
|
|
120921
|
-
let recordRepresentationIngestionOverride$1 = undefined;
|
|
120922
|
-
/**
|
|
120923
|
-
* Defines the configuration API and is exposed internally as well as externally.
|
|
120924
|
-
* Configuration for one store enabled REST adapters only.
|
|
120925
|
-
*/
|
|
120926
|
-
const configurationForOneStoreEnabledAdapters$1 = {
|
|
120927
|
-
setGetObjectInfoAdapter: function (adapter) {
|
|
120928
|
-
oneStoreGetObjectInfoAdapter$1 = adapter;
|
|
120929
|
-
},
|
|
120930
|
-
getGetObjectInfoAdapter: function () {
|
|
120931
|
-
return oneStoreGetObjectInfoAdapter$1;
|
|
120932
|
-
},
|
|
120933
|
-
setGetObjectInfosAdapter: function (adapter) {
|
|
120934
|
-
oneStoreGetObjectInfosAdapter$1 = adapter;
|
|
120935
|
-
},
|
|
120936
|
-
getGetObjectInfosAdapter: function () {
|
|
120937
|
-
return oneStoreGetObjectInfosAdapter$1;
|
|
120938
|
-
},
|
|
120939
|
-
};
|
|
120940
|
-
const getKeywordSearchResultsFactory$1 = new Configurable$1();
|
|
120941
|
-
const getListRecordsByNameFactory$1 = new Configurable$1();
|
|
120942
|
-
const getListUiFactory$1 = new Configurable$1();
|
|
120943
|
-
const getLookupRecordsFactory$1 = new Configurable$1();
|
|
120944
|
-
const getQuickActionDefaultsFactory$1 = new Configurable$1();
|
|
120945
|
-
const getRecordCreateDefaultsFactory$1 = new Configurable$1();
|
|
120946
|
-
const getRecordTemplateCloneFactory$1 = new Configurable$1();
|
|
120947
|
-
const getRecordTemplateCreateFactory$1 = new Configurable$1();
|
|
120948
|
-
const getRecordUiFactory$1 = new Configurable$1();
|
|
120949
|
-
const getRecordFactory$1 = new Configurable$1();
|
|
120950
|
-
const getRecordsFactory$1 = new Configurable$1();
|
|
120951
|
-
const getRelatedListRecordsFactory$1 = new Configurable$1();
|
|
120952
|
-
const getRelatedListRecordsBatchFactory$1 = new Configurable$1();
|
|
120953
|
-
const getSearchResultsFactory$1 = new Configurable$1();
|
|
120954
|
-
// The following set of adapters all touch RecordRepresentation directly or indirectly,
|
|
120955
|
-
// so they need to support having a custom factory provided by the mobile environment.
|
|
120956
|
-
const configurationForEnvironmentFactoryOverrides$1 = {
|
|
120957
|
-
getKeywordSearchResultsAdapterFactory: getKeywordSearchResultsFactory$1.getAdapter,
|
|
120958
|
-
setGetKeywordSearchResultsAdapterFactory: getKeywordSearchResultsFactory$1.setAdapter,
|
|
120959
|
-
getListRecordsByNameAdapterFactory: getListRecordsByNameFactory$1.getAdapter,
|
|
120960
|
-
setGetListRecordsByNameAdapterFactory: getListRecordsByNameFactory$1.setAdapter,
|
|
120961
|
-
getListUiAdapterFactory: getListUiFactory$1.getAdapter,
|
|
120962
|
-
setGetListUiAdapterFactory: getListUiFactory$1.setAdapter,
|
|
120963
|
-
getLookupRecordsAdapterFactory: getLookupRecordsFactory$1.getAdapter,
|
|
120964
|
-
setGetLookupRecordsAdapterFactory: getLookupRecordsFactory$1.setAdapter,
|
|
120965
|
-
getQuickActionDefaultsAdapterFactory: getQuickActionDefaultsFactory$1.getAdapter,
|
|
120966
|
-
setGetQuickActionDefaultsAdapterFactory: getQuickActionDefaultsFactory$1.setAdapter,
|
|
120967
|
-
getRecordCreateDefaultsAdapterFactory: getRecordCreateDefaultsFactory$1.getAdapter,
|
|
120968
|
-
setGetRecordCreateDefaultsAdapterFactory: getRecordCreateDefaultsFactory$1.setAdapter,
|
|
120969
|
-
getRecordTemplateCloneAdapterFactory: getRecordTemplateCloneFactory$1.getAdapter,
|
|
120970
|
-
setGetRecordTemplateCloneAdapterFactory: getRecordTemplateCloneFactory$1.setAdapter,
|
|
120971
|
-
getRecordTemplateCreateAdapterFactory: getRecordTemplateCreateFactory$1.getAdapter,
|
|
120972
|
-
setGetRecordTemplateCreateAdapterFactory: getRecordTemplateCreateFactory$1.setAdapter,
|
|
120973
|
-
getRecordUiAdapterFactory: getRecordUiFactory$1.getAdapter,
|
|
120974
|
-
setGetRecordUiAdapterFactory: getRecordUiFactory$1.setAdapter,
|
|
120975
|
-
getRecordAdapterFactory: getRecordFactory$1.getAdapter,
|
|
120976
|
-
setGetRecordAdapterFactory: getRecordFactory$1.setAdapter,
|
|
120977
|
-
getRecordsAdapterFactory: getRecordsFactory$1.getAdapter,
|
|
120978
|
-
setGetRecordsAdapterFactory: getRecordsFactory$1.setAdapter,
|
|
120979
|
-
getRelatedListRecordsAdapterFactory: getRelatedListRecordsFactory$1.getAdapter,
|
|
120980
|
-
setGetRelatedListRecordsAdapterFactory: getRelatedListRecordsFactory$1.setAdapter,
|
|
120981
|
-
getRelatedListRecordsBatchAdapterFactory: getRelatedListRecordsBatchFactory$1.getAdapter,
|
|
120982
|
-
setGetRelatedListRecordsBatchAdapterFactory: getRelatedListRecordsBatchFactory$1.setAdapter,
|
|
120983
|
-
getSearchResultsAdapterFactory: getSearchResultsFactory$1.getAdapter,
|
|
120984
|
-
setGetSearchResultsAdapterFactory: getSearchResultsFactory$1.setAdapter,
|
|
120985
|
-
};
|
|
120986
|
-
/**
|
|
120987
|
-
* Defines the configuration API and is exposed internally as well as externally.
|
|
120988
|
-
* Configuration for REST adapters only.
|
|
120989
|
-
*/
|
|
120990
|
-
const configurationForRestAdapters$1 = {
|
|
120991
|
-
setTrackedFieldDepthOnCacheMiss: function (trackedFieldDepthOnCacheMissParam) {
|
|
120992
|
-
trackedFieldDepthOnCacheMiss$1 = trackedFieldDepthOnCacheMissParam;
|
|
120993
|
-
},
|
|
120994
|
-
getTrackedFieldDepthOnCacheMiss: function () {
|
|
120995
|
-
return trackedFieldDepthOnCacheMiss$1;
|
|
120996
|
-
},
|
|
120997
|
-
setTrackedFieldDepthOnCacheMergeConflict: function (trackedFieldDepthOnCacheMergeConflictParam) {
|
|
120998
|
-
trackedFieldDepthOnCacheMergeConflict$1 = trackedFieldDepthOnCacheMergeConflictParam;
|
|
120999
|
-
},
|
|
121000
|
-
getTrackedFieldDepthOnCacheMergeConflict: function () {
|
|
121001
|
-
return trackedFieldDepthOnCacheMergeConflict$1;
|
|
121002
|
-
},
|
|
121003
|
-
setTrackedFieldDepthOnNotifyChange: function (trackedFieldDepthOnNotifyChangeParam) {
|
|
121004
|
-
trackedFieldDepthOnNotifyChange$1 = trackedFieldDepthOnNotifyChangeParam;
|
|
121005
|
-
},
|
|
121006
|
-
getTrackedFieldDepthOnNotifyChange: function () {
|
|
121007
|
-
return trackedFieldDepthOnNotifyChange$1;
|
|
121008
|
-
},
|
|
121009
|
-
setTrackedFieldLeafNodeIdAndNameOnly: function (trackedFieldLeafNodeIdAndNameOnlyParam) {
|
|
121010
|
-
trackedFieldLeafNodeIdAndNameOnly$1 = trackedFieldLeafNodeIdAndNameOnlyParam;
|
|
121011
|
-
},
|
|
121012
|
-
getTrackedFieldLeafNodeIdAndNameOnly: function () {
|
|
121013
|
-
return trackedFieldLeafNodeIdAndNameOnly$1;
|
|
121014
|
-
},
|
|
121015
|
-
setRelatedListsPredictionsEnabled: function (f) {
|
|
121016
|
-
relatedListsPredictionsEnabled$1 = f;
|
|
121017
|
-
},
|
|
121018
|
-
areRelatedListsPredictionsEnabled: function () {
|
|
121019
|
-
return relatedListsPredictionsEnabled$1 === true;
|
|
121020
|
-
},
|
|
121021
|
-
setRelatedListsPlusPredictionsEnabled: function (f) {
|
|
121022
|
-
relatedListsPlusPredictionsEnabled$1 = f;
|
|
121023
|
-
},
|
|
121024
|
-
areRelatedListsPlusPredictionsEnabled: function () {
|
|
121025
|
-
return relatedListsPlusPredictionsEnabled$1 === true;
|
|
121026
|
-
},
|
|
121027
|
-
setRecordRepresentationIngestionOverride: function (ingest) {
|
|
121028
|
-
recordRepresentationIngestionOverride$1 = ingest;
|
|
121029
|
-
},
|
|
121030
|
-
getRecordRepresentationIngestionOverride: function () {
|
|
121031
|
-
return recordRepresentationIngestionOverride$1;
|
|
121032
|
-
},
|
|
121033
|
-
// createRecord
|
|
121034
|
-
getDraftAwareCreateRecordAdapter: configurableCreateRecordAdapter$1.getAdapter,
|
|
121035
|
-
setDraftAwareCreateRecordAdapter: configurableCreateRecordAdapter$1.setAdapter,
|
|
121036
|
-
// updateRecord
|
|
121037
|
-
getDraftAwareUpdateRecordAdapter: configurableUpdateRecordAdapter$1.getAdapter,
|
|
121038
|
-
setDraftAwareUpdateRecordAdapter: configurableUpdateRecordAdapter$1.setAdapter,
|
|
121039
|
-
// deleteRecord
|
|
121040
|
-
getDraftAwareDeleteRecordAdapter: configurableDeleteRecordAdapter$1.getAdapter,
|
|
121041
|
-
setDraftAwareDeleteRecordAdapter: configurableDeleteRecordAdapter$1.setAdapter,
|
|
121042
|
-
// performQuickAction
|
|
121043
|
-
getDraftAwarePerformQuickActionAdapter: configurablePerformQuickActionAdapter$1.getAdapter,
|
|
121044
|
-
setDraftAwarePerformQuickActionAdapter: configurablePerformQuickActionAdapter$1.setAdapter,
|
|
121045
|
-
// performRecordUpdateQuickAction
|
|
121046
|
-
getDraftAwarePerformUpdateRecordQuickActionAdapter: configurablePerformUpdateRecordQuickActionAdapter$1.getAdapter,
|
|
121047
|
-
setDraftAwarePerformUpdateRecordQuickActionAdapter: configurablePerformUpdateRecordQuickActionAdapter$1.setAdapter,
|
|
121048
|
-
// createContentDocumentAndVersion
|
|
121049
|
-
getDraftAwareCreateContentDocumentAndVersionAdapter: configurableCreateContentDocumentAndVersion$1.getAdapter,
|
|
121050
|
-
setDraftAwareCreateContentDocumentAndVersionAdapter: configurableCreateContentDocumentAndVersion$1.setAdapter,
|
|
121051
|
-
// createContentVersion
|
|
121052
|
-
getDraftAwareCreateContentVersionAdapter: configurableCreateContentVersion$1.getAdapter,
|
|
121053
|
-
setDraftAwareCreateContentVersionAdapter: configurableCreateContentVersion$1.setAdapter,
|
|
121054
|
-
...configurationForOneStoreEnabledAdapters$1,
|
|
121055
|
-
...configurationForEnvironmentFactoryOverrides$1,
|
|
121056
|
-
};
|
|
121057
|
-
let configurableGraphQLAdapter$1 = new Configurable$1();
|
|
121058
|
-
let configurableGraphQLBatchAdapter$1 = new Configurable$1();
|
|
121059
|
-
/**
|
|
121060
|
-
* Defines the configuration API and is exposed internally as well as externally.
|
|
121061
|
-
* Configuration for GraphQL adapters only.
|
|
121062
|
-
*/
|
|
121063
|
-
const configurationForGraphQLAdapters$1 = {
|
|
121064
|
-
getDraftAwareGraphQLAdapter: configurableGraphQLAdapter$1.getAdapter,
|
|
121065
|
-
setDraftAwareGraphQLAdapter: configurableGraphQLAdapter$1.setAdapter,
|
|
121066
|
-
getEnvironmentAwareGraphQLBatchAdapter: configurableGraphQLBatchAdapter$1.getAdapter,
|
|
121067
|
-
setEnvironmentAwareGraphQLBatchAdapter: configurableGraphQLBatchAdapter$1.setAdapter,
|
|
121068
|
-
};
|
|
121069
|
-
const registrations$1 = new Set();
|
|
121070
|
-
/**
|
|
121071
|
-
* lds-adapter-uiapi is special. The non-SFDC bundle combines REST and GQL adapters,
|
|
121072
|
-
* yet for SFDC those are separate bundles. So non-SFDC bundle (./main.ts) registers
|
|
121073
|
-
* both REST and GQL configs. We want each SFDC bundle to register (we don't want one
|
|
121074
|
-
* SFDC bundle to assume the other is being loaded and therefore the other one will
|
|
121075
|
-
* take care of registration) but we don't want to double register either.
|
|
121076
|
-
*
|
|
121077
|
-
* So we make this function that memoizes if it's been called before and only
|
|
121078
|
-
* actually registers once.
|
|
121079
|
-
*/
|
|
121080
|
-
function ensureRegisteredOnce$1(registration) {
|
|
121081
|
-
const { id } = registration;
|
|
121082
|
-
if (!registrations$1.has(id)) {
|
|
121083
|
-
register$1(registration);
|
|
121084
|
-
registrations$1.add(id);
|
|
121085
|
-
}
|
|
121086
|
-
}
|
|
121087
|
-
|
|
121088
121516
|
function validateAdapterConfig$1(untrustedConfig, _configPropertyNames) {
|
|
121089
121517
|
if (untrustedConfig !== null && typeof untrustedConfig === 'object') {
|
|
121090
121518
|
const operationNameIsDefinedAsUndefined = ObjectPrototypeHasOwnProperty.call(untrustedConfig, 'operationName') &&
|
|
@@ -121411,7 +121839,7 @@
|
|
|
121411
121839
|
const batchQueryTransformed = config.batchQuery.map((singleConfig) => {
|
|
121412
121840
|
return {
|
|
121413
121841
|
...singleConfig,
|
|
121414
|
-
query: applyMinimumFieldsToDocument(parse$
|
|
121842
|
+
query: applyMinimumFieldsToDocument(parse$9(print(singleConfig.query)), { queryTypeName: 'Query' }, getQueryTransformerForType, singleConfig.operationName), // Stringifies and parses again to avoid mutating original. Should we just JSON.stringify to avoid the dependency on the parser?
|
|
121415
121843
|
};
|
|
121416
121844
|
});
|
|
121417
121845
|
return {
|
|
@@ -121553,11 +121981,11 @@
|
|
|
121553
121981
|
const graphqlBatch_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'graphqlBatch', factory), graphqlBatchMetadata);
|
|
121554
121982
|
return {
|
|
121555
121983
|
// Wire Adapters
|
|
121556
|
-
graphql: createGraphQLWireAdapterConstructor(luvio, graphql_ldsAdapter, graphqlMetadata, astResolver),
|
|
121557
121984
|
graphqlBatch: createGraphQLWireAdapterConstructor(luvio, graphqlBatch_ldsAdapter, graphqlBatchMetadata, astResolver),
|
|
121558
121985
|
// One Store Enabled Adapters
|
|
121986
|
+
graphql: getLuvioOrOneStoreAdapter(createGraphQLWireAdapterConstructor(luvio, graphql_ldsAdapter, graphqlMetadata, astResolver), configurationForOneStoreEnabledAdapters$1.getGraphQLWireAdapter()),
|
|
121987
|
+
graphql_imperative: getLuvioOrOneStoreAdapter(createGraphQLImperativeAdapter(luvio, graphql_ldsAdapter, graphqlMetadata, astResolver), configurationForOneStoreEnabledAdapters$1.getGraphQLImperativeQueryAdapter()),
|
|
121559
121988
|
// Imperative Adapters
|
|
121560
|
-
graphql_imperative: createGraphQLImperativeAdapter(luvio, graphql_ldsAdapter, graphqlMetadata, astResolver),
|
|
121561
121989
|
graphqlBatch_imperative: createGraphQLImperativeAdapter(luvio, graphqlBatch_ldsAdapter, graphqlBatchMetadata, astResolver),
|
|
121562
121990
|
};
|
|
121563
121991
|
}
|
|
@@ -122072,7 +122500,14 @@
|
|
|
122072
122500
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
122073
122501
|
instrument: instrument$1,
|
|
122074
122502
|
});
|
|
122075
|
-
|
|
122503
|
+
function refreshGraphQL(data) {
|
|
122504
|
+
// If OneStore data, call its refresh instead
|
|
122505
|
+
if (typeof data.refresh === 'function') {
|
|
122506
|
+
return data.refresh();
|
|
122507
|
+
}
|
|
122508
|
+
return refresh$3(data, 'refreshUiApi');
|
|
122509
|
+
}
|
|
122510
|
+
// version: 1.370.0-7c1df2520b
|
|
122076
122511
|
|
|
122077
122512
|
// On core the unstable adapters are re-exported with different names,
|
|
122078
122513
|
// we want to match them here.
|
|
@@ -122084,7 +122519,7 @@
|
|
|
122084
122519
|
gql: gql,
|
|
122085
122520
|
get graphql () { return graphql; },
|
|
122086
122521
|
get graphqlBatch () { return graphqlBatch; },
|
|
122087
|
-
|
|
122522
|
+
refreshGraphQL: refreshGraphQL,
|
|
122088
122523
|
get unstable_getActionOverrides_imperative () { return unstable_getActionOverrides_imperative; },
|
|
122089
122524
|
get unstable_getFlexipageFormulaOverrides_imperative () { return unstable_getFlexipageFormulaOverrides_imperative; },
|
|
122090
122525
|
get unstable_getGlobalActions_imperative () { return unstable_getGlobalActions_imperative; },
|
|
@@ -122224,7 +122659,7 @@
|
|
|
122224
122659
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
122225
122660
|
graphQLImperative = ldsAdapter;
|
|
122226
122661
|
});
|
|
122227
|
-
// version: 1.
|
|
122662
|
+
// version: 1.370.0-7c1df2520b
|
|
122228
122663
|
|
|
122229
122664
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
122230
122665
|
__proto__: null,
|
|
@@ -123023,7 +123458,7 @@
|
|
|
123023
123458
|
function register(r) {
|
|
123024
123459
|
callbacks$1.forEach((callback) => callback(r));
|
|
123025
123460
|
}
|
|
123026
|
-
// version: 1.
|
|
123461
|
+
// version: 1.370.0-3ec6ffba72
|
|
123027
123462
|
|
|
123028
123463
|
/**
|
|
123029
123464
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -123089,6 +123524,14 @@
|
|
|
123089
123524
|
* One store enabled Get Object Infos adapter
|
|
123090
123525
|
*/
|
|
123091
123526
|
let oneStoreGetObjectInfosAdapter = undefined;
|
|
123527
|
+
/**
|
|
123528
|
+
* One store enabled GraphQL adapter
|
|
123529
|
+
*/
|
|
123530
|
+
let oneStoreGraphQLWireAdapter = undefined;
|
|
123531
|
+
/**
|
|
123532
|
+
* One store enabled GraphQL imperative query adapter
|
|
123533
|
+
*/
|
|
123534
|
+
let oneStoreGraphQLImperativeQueryAdapter = undefined;
|
|
123092
123535
|
/**
|
|
123093
123536
|
* Determines when to include PDL strategies for Related Lists
|
|
123094
123537
|
*/
|
|
@@ -123115,6 +123558,18 @@
|
|
|
123115
123558
|
getGetObjectInfosAdapter: function () {
|
|
123116
123559
|
return oneStoreGetObjectInfosAdapter;
|
|
123117
123560
|
},
|
|
123561
|
+
setGraphQLWireAdapter: function (adapter) {
|
|
123562
|
+
oneStoreGraphQLWireAdapter = adapter;
|
|
123563
|
+
},
|
|
123564
|
+
getGraphQLWireAdapter: function () {
|
|
123565
|
+
return oneStoreGraphQLWireAdapter;
|
|
123566
|
+
},
|
|
123567
|
+
setGraphQLImperativeQueryAdapter: function (adapter) {
|
|
123568
|
+
oneStoreGraphQLImperativeQueryAdapter = adapter;
|
|
123569
|
+
},
|
|
123570
|
+
getGraphQLImperativeQueryAdapter: function () {
|
|
123571
|
+
return oneStoreGraphQLImperativeQueryAdapter;
|
|
123572
|
+
},
|
|
123118
123573
|
};
|
|
123119
123574
|
const getKeywordSearchResultsFactory = new Configurable();
|
|
123120
123575
|
const getListRecordsByNameFactory = new Configurable();
|
|
@@ -124210,4 +124665,4 @@
|
|
|
124210
124665
|
exports.subscribeToAdapter = subscribeToAdapter;
|
|
124211
124666
|
|
|
124212
124667
|
}));
|
|
124213
|
-
// version: 1.
|
|
124668
|
+
// version: 1.370.0-3ec6ffba72
|