@salesforce/lds-runtime-aura 1.405.0 → 1.410.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/ldsEngineCreator.js
CHANGED
|
@@ -22,8 +22,9 @@ import useCmpDefPredictions from '@salesforce/gate/lds.pdl.useCmpDefPredictions'
|
|
|
22
22
|
import applyPredictionRequestLimit from '@salesforce/gate/lds.pdl.applyRequestLimit';
|
|
23
23
|
import useLocalStorage from '@salesforce/gate/lds.pdl.useLocalStorage';
|
|
24
24
|
import useOneStoreGraphql from '@salesforce/gate/lds.oneStoreGraphqlEnabled.ltng';
|
|
25
|
+
import canCombineRecordLayoutRequests from '@salesforce/gate/lds.pdl.canCombineRecordLayoutRequests';
|
|
25
26
|
import { GetApexWireAdapterFactory, registerPrefetcher as registerPrefetcher$1 } from 'force/ldsAdaptersApex';
|
|
26
|
-
import { instrument, getRecordAvatarsAdapterFactory, getRecordAdapterFactory, coerceFieldIdArray, getRecordsAdapterFactory, getRecordActionsAdapterFactory, getObjectInfosAdapterFactory, coerceObjectIdArray, getObjectInfoAdapterFactory, coerceObjectId, getRelatedListsActionsAdapterFactory, getRelatedListInfoBatchAdapterFactory, getRelatedListInfoAdapterFactory, getRelatedListRecordsBatchAdapterFactory, getRelatedListRecordsAdapterFactory, getListInfoByNameAdapterFactory, getListInfosByObjectNameAdapterFactory, getListRecordsByNameAdapterFactory, getListObjectInfoAdapterFactory, getRelatedListsInfoAdapterFactory, getRelatedListActionsAdapterFactory, getRecordId18Array, buildRecordRepKeyFromId, configuration, InMemoryRecordRepresentationQueryEvaluator, UiApiNamespace, RecordRepresentationRepresentationType, registerPrefetcher, RecordRepresentationVersion } from 'force/ldsAdaptersUiapi';
|
|
27
|
+
import { instrument, getRecordAvatarsAdapterFactory, getRecordAdapterFactory, coerceFieldIdArray, coerceLayoutTypeArray, coerceLayoutModeArray, getRecordsAdapterFactory, getRecordActionsAdapterFactory, getObjectInfosAdapterFactory, coerceObjectIdArray, getObjectInfoAdapterFactory, coerceObjectId, getRelatedListsActionsAdapterFactory, getRelatedListInfoBatchAdapterFactory, getRelatedListInfoAdapterFactory, getRelatedListRecordsBatchAdapterFactory, getRelatedListRecordsAdapterFactory, getListInfoByNameAdapterFactory, getListInfosByObjectNameAdapterFactory, getListRecordsByNameAdapterFactory, getListObjectInfoAdapterFactory, getRelatedListsInfoAdapterFactory, getRelatedListActionsAdapterFactory, getRecordId18Array, buildRecordRepKeyFromId, configuration, InMemoryRecordRepresentationQueryEvaluator, UiApiNamespace, RecordRepresentationRepresentationType, registerPrefetcher, RecordRepresentationVersion } from 'force/ldsAdaptersUiapi';
|
|
27
28
|
import { getInstrumentation } from 'o11y/client';
|
|
28
29
|
import { findExecutableOperation, buildGraphQLInputExtension, addTypenameToDocument } from 'force/luvioGraphqlNormalization';
|
|
29
30
|
import { print, wrapConfigAndVerify, resolveAst, validateGraphQLOperations } from 'force/luvioOnestoreGraphqlParser';
|
|
@@ -41,9 +42,14 @@ import { instrument as instrument$5 } from '@lwc/state';
|
|
|
41
42
|
import { withRegistration, register, setDefaultLuvio } from 'force/ldsEngine';
|
|
42
43
|
import { pageScopedCache } from 'instrumentation/utility';
|
|
43
44
|
import { createStorage, clearStorages } from 'force/ldsStorage';
|
|
44
|
-
import
|
|
45
|
+
import lightningConnectEnabled from '@salesforce/gate/ui.services.LightningConnect.enabled';
|
|
46
|
+
import bypassAppRestrictionEnabled from '@salesforce/gate/ui.services.LightningConnect.BypassAppRestriction.enabled';
|
|
47
|
+
import csrfValidationEnabled from '@salesforce/gate/ui.services.LightningConnect.CsrfValidation.enabled';
|
|
48
|
+
import sessionApiEnabled from '@salesforce/gate/ui.uisdk.session.api.enabled';
|
|
45
49
|
import useHttpUiapiOneApp from '@salesforce/gate/lds.useHttpUiapiOneApp';
|
|
46
50
|
import useHttpUiapiOneRuntime from '@salesforce/gate/lds.useHttpUiapiOneRuntime';
|
|
51
|
+
import disableCreateContentDocumentAndVersionHTTPLexRuntime from '@salesforce/gate/lds.lex.http.disableCreateContentDocumentAndVersion';
|
|
52
|
+
import useHotspotLimit from '@salesforce/gate/lds.pdl.useHotspotLimit';
|
|
47
53
|
|
|
48
54
|
/*!
|
|
49
55
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -2666,7 +2672,7 @@ function buildServiceDescriptor$d(luvio) {
|
|
|
2666
2672
|
},
|
|
2667
2673
|
};
|
|
2668
2674
|
}
|
|
2669
|
-
// version: 1.
|
|
2675
|
+
// version: 1.410.0-7c228ee347
|
|
2670
2676
|
|
|
2671
2677
|
/*!
|
|
2672
2678
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -3004,7 +3010,7 @@ function buildServiceDescriptor$9(notifyRecordUpdateAvailable, getNormalizedLuvi
|
|
|
3004
3010
|
},
|
|
3005
3011
|
};
|
|
3006
3012
|
}
|
|
3007
|
-
// version: 1.
|
|
3013
|
+
// version: 1.410.0-7c228ee347
|
|
3008
3014
|
|
|
3009
3015
|
/*!
|
|
3010
3016
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -4707,7 +4713,7 @@ function getEnvironmentSetting(name) {
|
|
|
4707
4713
|
}
|
|
4708
4714
|
return undefined;
|
|
4709
4715
|
}
|
|
4710
|
-
// version: 1.
|
|
4716
|
+
// version: 1.410.0-7c228ee347
|
|
4711
4717
|
|
|
4712
4718
|
/**
|
|
4713
4719
|
* Observability / Critical Availability Program (230+)
|
|
@@ -5837,6 +5843,23 @@ class CsrfTokenManager {
|
|
|
5837
5843
|
CsrfTokenManager.instance = null;
|
|
5838
5844
|
|
|
5839
5845
|
const CSRF_TOKEN_HEADER = 'X-CSRF-Token';
|
|
5846
|
+
/**
|
|
5847
|
+
* Checks if all required gates are enabled for CSRF token interceptor.
|
|
5848
|
+
*
|
|
5849
|
+
* @returns true if all gates are enabled, false otherwise
|
|
5850
|
+
*/
|
|
5851
|
+
function areCsrfGatesEnabled() {
|
|
5852
|
+
try {
|
|
5853
|
+
return (lightningConnectEnabled.isOpen({ fallback: false }) &&
|
|
5854
|
+
bypassAppRestrictionEnabled.isOpen({ fallback: false }) &&
|
|
5855
|
+
csrfValidationEnabled.isOpen({ fallback: false }) &&
|
|
5856
|
+
sessionApiEnabled.isOpen({ fallback: false }));
|
|
5857
|
+
}
|
|
5858
|
+
catch (error) {
|
|
5859
|
+
// If any gate check fails, disable CSRF interceptor
|
|
5860
|
+
return false;
|
|
5861
|
+
}
|
|
5862
|
+
}
|
|
5840
5863
|
/**
|
|
5841
5864
|
* Determines if the HTTP method requires CSRF protection.
|
|
5842
5865
|
* Only mutating operations (POST, PUT, PATCH, DELETE) require CSRF tokens.
|
|
@@ -5864,6 +5887,10 @@ function isCsrfMethod(method) {
|
|
|
5864
5887
|
function buildCsrfTokenInterceptor() {
|
|
5865
5888
|
const csrfTokenManager = CsrfTokenManager.getInstance();
|
|
5866
5889
|
return async (fetchArgs) => {
|
|
5890
|
+
// Check if all required gates are enabled before running
|
|
5891
|
+
if (!areCsrfGatesEnabled()) {
|
|
5892
|
+
return resolvedPromiseLike$2(fetchArgs);
|
|
5893
|
+
}
|
|
5867
5894
|
const [urlOrRequest, options] = fetchArgs;
|
|
5868
5895
|
// Determine the method from either Request object or options
|
|
5869
5896
|
let method;
|
|
@@ -5893,6 +5920,10 @@ function buildCsrfTokenInterceptor() {
|
|
|
5893
5920
|
function buildLuvioCsrfTokenInterceptor() {
|
|
5894
5921
|
const csrfTokenManager = CsrfTokenManager.getInstance();
|
|
5895
5922
|
return async (resourceRequest) => {
|
|
5923
|
+
// Check if all required gates are enabled before running
|
|
5924
|
+
if (!areCsrfGatesEnabled()) {
|
|
5925
|
+
return resolvedPromiseLike$2(resourceRequest);
|
|
5926
|
+
}
|
|
5896
5927
|
// Ensure headers object exists
|
|
5897
5928
|
if (!resourceRequest.headers) {
|
|
5898
5929
|
resourceRequest.headers = {};
|
|
@@ -5911,19 +5942,19 @@ function buildLuvioCsrfTokenInterceptor() {
|
|
|
5911
5942
|
};
|
|
5912
5943
|
}
|
|
5913
5944
|
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5945
|
+
function isOneRuntime() {
|
|
5946
|
+
return !!globalThis.LWR;
|
|
5947
|
+
}
|
|
5948
|
+
/**
|
|
5949
|
+
* Base set of url paths that this adapter can serve via HTTP when enabled.
|
|
5950
|
+
* Extend this list to support additional endpoints (see predicate wiring below).
|
|
5951
|
+
*
|
|
5952
|
+
* Examples:
|
|
5953
|
+
* - Add another endpoint pattern:
|
|
5954
|
+
* "/ui-api/records/{recordId}"
|
|
5955
|
+
* - Keep placeholders for variable segments wrapped in "{}".
|
|
5956
|
+
*/
|
|
5957
|
+
const UIAPI_PATHS = [
|
|
5927
5958
|
// getObjectInfo
|
|
5928
5959
|
'/ui-api/object-info/{objectApiName}',
|
|
5929
5960
|
// getObjectInfos
|
|
@@ -5941,10 +5972,68 @@ const API_PATHS = [
|
|
|
5941
5972
|
// getRelatedListRecords
|
|
5942
5973
|
// '/ui-api/related-list-records/{parentRecordId}/{relatedListId}',
|
|
5943
5974
|
];
|
|
5944
|
-
|
|
5945
|
-
|
|
5946
|
-
|
|
5947
|
-
|
|
5975
|
+
/**
|
|
5976
|
+
* Single content documents version URL enabled/disabled by killswitch.
|
|
5977
|
+
* Exported for reuse in tests.
|
|
5978
|
+
*/
|
|
5979
|
+
const CONTENT_DOCUMENTS_VERSIONS_PATH = '/ui-api/records/content-documents/content-versions';
|
|
5980
|
+
/**
|
|
5981
|
+
* Configure which path sets are enabled under which conditions.
|
|
5982
|
+
*
|
|
5983
|
+
* To add a new condition:
|
|
5984
|
+
* - Define a new `predicate` function that returns true when your feature gate
|
|
5985
|
+
* or runtime environment should enable HTTP for its path set.
|
|
5986
|
+
* - Provide the list of `paths`
|
|
5987
|
+
*
|
|
5988
|
+
* Example:
|
|
5989
|
+
* {
|
|
5990
|
+
* predicate: () => myNewGate.isOpen({ fallback: false }),
|
|
5991
|
+
* paths: ['/ui-api/some-endpoint/{id}'],
|
|
5992
|
+
* }
|
|
5993
|
+
*/
|
|
5994
|
+
const PREDICATE_PATH_SETS = [
|
|
5995
|
+
// One Runtime gate
|
|
5996
|
+
{
|
|
5997
|
+
predicate: () => isOneRuntime() && useHttpUiapiOneRuntime.isOpen({ fallback: false }),
|
|
5998
|
+
paths: UIAPI_PATHS,
|
|
5999
|
+
},
|
|
6000
|
+
// one.app gate
|
|
6001
|
+
{
|
|
6002
|
+
predicate: () => !isOneRuntime() && useHttpUiapiOneApp.isOpen({ fallback: false }),
|
|
6003
|
+
paths: UIAPI_PATHS,
|
|
6004
|
+
},
|
|
6005
|
+
// disableCreateContentDocumentAndVersionHTTPLexRuntime killswitch
|
|
6006
|
+
{
|
|
6007
|
+
predicate: () => !disableCreateContentDocumentAndVersionHTTPLexRuntime.isOpen({ fallback: false }),
|
|
6008
|
+
paths: [CONTENT_DOCUMENTS_VERSIONS_PATH],
|
|
6009
|
+
},
|
|
6010
|
+
];
|
|
6011
|
+
function getEnabledPaths() {
|
|
6012
|
+
const enabled = new Set();
|
|
6013
|
+
for (const { predicate, paths } of PREDICATE_PATH_SETS) {
|
|
6014
|
+
if (predicate()) {
|
|
6015
|
+
for (const p of paths) {
|
|
6016
|
+
enabled.add(p);
|
|
6017
|
+
}
|
|
6018
|
+
}
|
|
6019
|
+
}
|
|
6020
|
+
return Array.from(enabled);
|
|
6021
|
+
}
|
|
6022
|
+
function buildMatchers(paths) {
|
|
6023
|
+
return paths.map((path) => {
|
|
6024
|
+
const regexString = path.replace(/\{.+?\}/g, '[^/]+');
|
|
6025
|
+
return new RegExp(`^${regexString}$`);
|
|
6026
|
+
});
|
|
6027
|
+
}
|
|
6028
|
+
// Precompute enabled path matchers at module load to avoid per-request rebuild
|
|
6029
|
+
const ENABLED_PATH_MATCHERS = buildMatchers(getEnabledPaths());
|
|
6030
|
+
/**
|
|
6031
|
+
* Indicates whether any predicate-enabled path sets are active.
|
|
6032
|
+
* Used by adapter composition to decide whether to include the fetch adapter.
|
|
6033
|
+
*/
|
|
6034
|
+
function isFetchAdapterEnabled() {
|
|
6035
|
+
return getEnabledPaths().length > 0;
|
|
6036
|
+
}
|
|
5948
6037
|
const requestTracker = {
|
|
5949
6038
|
hasTracker: () => ThirdPartyTracker !== undefined,
|
|
5950
6039
|
registerHandler: (request, name, loadedCheck) => {
|
|
@@ -5964,12 +6053,16 @@ const requestLogger = {
|
|
|
5964
6053
|
},
|
|
5965
6054
|
};
|
|
5966
6055
|
const composedFetchNetworkAdapter = {
|
|
6056
|
+
/**
|
|
6057
|
+
* Handles only the enabled paths. The incoming path is normalized
|
|
6058
|
+
* (trailing slash removed) before matching against the precomputed matchers.
|
|
6059
|
+
*/
|
|
5967
6060
|
shouldHandleRequest(resourceRequest) {
|
|
5968
6061
|
let path = resourceRequest.basePath.trim();
|
|
5969
6062
|
if (path.endsWith('/')) {
|
|
5970
6063
|
path = path.substring(0, path.length - 1);
|
|
5971
6064
|
}
|
|
5972
|
-
return
|
|
6065
|
+
return ENABLED_PATH_MATCHERS.some((matcher) => matcher.test(path));
|
|
5973
6066
|
},
|
|
5974
6067
|
adapter: setupLexNetworkAdapter(requestTracker, requestLogger, {
|
|
5975
6068
|
request: [buildLuvioPageScopedCacheRequestInterceptor(), buildLuvioCsrfTokenInterceptor()],
|
|
@@ -6775,9 +6868,31 @@ function isFieldsRequest(config) {
|
|
|
6775
6868
|
config.modes === undefined &&
|
|
6776
6869
|
(config.fields !== undefined || config.optionalFields !== undefined));
|
|
6777
6870
|
}
|
|
6871
|
+
function isCombinableLayoutRequest(config) {
|
|
6872
|
+
// We will only consider a layout request combinable if it is a single layout type request
|
|
6873
|
+
// and the only request parameters are:
|
|
6874
|
+
// - layoutTypes
|
|
6875
|
+
// - optionalFields
|
|
6876
|
+
// - modes
|
|
6877
|
+
const hasExtraParams = config.childRelationships !== undefined ||
|
|
6878
|
+
config.pageSize !== undefined ||
|
|
6879
|
+
config.updateMru !== undefined;
|
|
6880
|
+
return config.layoutTypes !== undefined && !hasExtraParams;
|
|
6881
|
+
}
|
|
6882
|
+
function areCombinableLayoutRequests(reqA, reqB) {
|
|
6883
|
+
const normilizedLayoutTypesA = coerceLayoutTypeArray(reqA.layoutTypes) || [];
|
|
6884
|
+
const normilizedLayoutTypesB = coerceLayoutTypeArray(reqB.layoutTypes) || [];
|
|
6885
|
+
// Let's only combine when the layoutTypes are the same
|
|
6886
|
+
return (isCombinableLayoutRequest(reqA) &&
|
|
6887
|
+
isCombinableLayoutRequest(reqB) &&
|
|
6888
|
+
reqA.recordId === reqB.recordId &&
|
|
6889
|
+
normilizedLayoutTypesA.length === normilizedLayoutTypesB.length &&
|
|
6890
|
+
normilizedLayoutTypesA.every((type, index) => type === normilizedLayoutTypesB[index]));
|
|
6891
|
+
}
|
|
6778
6892
|
class GetRecordRequestStrategy extends LuvioAdapterRequestStrategy {
|
|
6779
|
-
constructor() {
|
|
6780
|
-
super(
|
|
6893
|
+
constructor(luvio, canCombineRecordLayoutRequests = false) {
|
|
6894
|
+
super(luvio);
|
|
6895
|
+
this.canCombineRecordLayoutRequests = canCombineRecordLayoutRequests;
|
|
6781
6896
|
this.adapterName = GET_RECORD_ADAPTER_NAME;
|
|
6782
6897
|
this.adapterFactory = getRecordAdapterFactory;
|
|
6783
6898
|
}
|
|
@@ -6806,10 +6921,41 @@ class GetRecordRequestStrategy extends LuvioAdapterRequestStrategy {
|
|
|
6806
6921
|
};
|
|
6807
6922
|
}
|
|
6808
6923
|
canCombine(reqA, reqB) {
|
|
6809
|
-
// must be same record and
|
|
6810
|
-
return reqA.recordId === reqB.recordId &&
|
|
6924
|
+
// must be same record and either both are fields requests or both are combinable layout requests
|
|
6925
|
+
return (reqA.recordId === reqB.recordId &&
|
|
6926
|
+
((isFieldsRequest(reqA) && isFieldsRequest(reqB)) ||
|
|
6927
|
+
(this.canCombineRecordLayoutRequests && areCombinableLayoutRequests(reqA, reqB))));
|
|
6811
6928
|
}
|
|
6812
6929
|
combineRequests(reqA, reqB) {
|
|
6930
|
+
if (isFieldsRequest(reqA)) {
|
|
6931
|
+
return this.combineFieldsRequests(reqA, reqB);
|
|
6932
|
+
}
|
|
6933
|
+
else {
|
|
6934
|
+
return this.combineLayoutRequests(reqA, reqB);
|
|
6935
|
+
}
|
|
6936
|
+
}
|
|
6937
|
+
combineLayoutRequests(reqA, reqB) {
|
|
6938
|
+
const combined = {
|
|
6939
|
+
recordId: reqA.recordId,
|
|
6940
|
+
layoutTypes: coerceLayoutTypeArray(reqA.layoutTypes),
|
|
6941
|
+
};
|
|
6942
|
+
// combine Modes.
|
|
6943
|
+
// Note: the || ['View'] is important; it is to cover the case in which it needs to
|
|
6944
|
+
// combine mode: undefined (defaults to View) with mode: ['something else than View']
|
|
6945
|
+
const modeA = coerceLayoutModeArray(reqA.modes) || ['View'];
|
|
6946
|
+
const modeB = coerceLayoutModeArray(reqB.modes) || ['View'];
|
|
6947
|
+
if (reqA.modes !== undefined || reqB.modes !== undefined) {
|
|
6948
|
+
combined.modes = Array.from(new Set([...modeA, ...modeB]));
|
|
6949
|
+
}
|
|
6950
|
+
// combine Optional Fields.
|
|
6951
|
+
const optionalFieldsA = coerceFieldIdArray(reqA.optionalFields, COERCE_FIELD_ID_ARRAY_OPTIONS) || [];
|
|
6952
|
+
const optionalFieldsB = coerceFieldIdArray(reqB.optionalFields, COERCE_FIELD_ID_ARRAY_OPTIONS) || [];
|
|
6953
|
+
if (optionalFieldsA !== undefined || optionalFieldsB !== undefined) {
|
|
6954
|
+
combined.optionalFields = Array.from(new Set([...optionalFieldsA, ...optionalFieldsB]));
|
|
6955
|
+
}
|
|
6956
|
+
return combined;
|
|
6957
|
+
}
|
|
6958
|
+
combineFieldsRequests(reqA, reqB) {
|
|
6813
6959
|
const fields = new Set();
|
|
6814
6960
|
const optionalFields = new Set();
|
|
6815
6961
|
if (reqA.fields !== undefined) {
|
|
@@ -8418,24 +8564,12 @@ function buildComposableNetworkAdapter(composedAdapters) {
|
|
|
8418
8564
|
};
|
|
8419
8565
|
}
|
|
8420
8566
|
|
|
8421
|
-
function shouldUseHttp() {
|
|
8422
|
-
// Check if we're in One Runtime (has LWR set)
|
|
8423
|
-
const isOneRuntime = !!globalThis.LWR;
|
|
8424
|
-
// If we're in One Runtime and the One Runtime gate is open, use HTTP
|
|
8425
|
-
if (isOneRuntime && useHttpUiapiOneRuntime.isOpen({ fallback: false })) {
|
|
8426
|
-
return true;
|
|
8427
|
-
}
|
|
8428
|
-
// If we're in one.app and the one.app gate is open, use HTTP
|
|
8429
|
-
if (!isOneRuntime && useHttpUiapiOneApp.isOpen({ fallback: false })) {
|
|
8430
|
-
return true;
|
|
8431
|
-
}
|
|
8432
|
-
return false;
|
|
8433
|
-
}
|
|
8434
8567
|
function getComposedAdapters() {
|
|
8435
8568
|
const composedAdapters = [
|
|
8436
8569
|
composedNetworkAdapter$1, // SFAP adapter
|
|
8437
8570
|
];
|
|
8438
|
-
if
|
|
8571
|
+
// Add the UIAPI Fetch adapter if any of its API paths are enabled
|
|
8572
|
+
if (isFetchAdapterEnabled()) {
|
|
8439
8573
|
composedAdapters.push(composedFetchNetworkAdapter); // UIAPI Fetch adapter
|
|
8440
8574
|
}
|
|
8441
8575
|
return composedAdapters;
|
|
@@ -9495,7 +9629,7 @@ function whenPredictionsReady(callback) {
|
|
|
9495
9629
|
}
|
|
9496
9630
|
function setupPredictivePrefetcher(luvio) {
|
|
9497
9631
|
const allStrategies = [
|
|
9498
|
-
new GetRecordRequestStrategy(luvio),
|
|
9632
|
+
new GetRecordRequestStrategy(luvio, canCombineRecordLayoutRequests.isOpen({ fallback: false })),
|
|
9499
9633
|
new GetRecordsRequestStrategy(luvio),
|
|
9500
9634
|
new GetRecordActionsRequestStrategy(luvio),
|
|
9501
9635
|
new GetRecordAvatarsRequestStrategy(luvio),
|
|
@@ -9788,4 +9922,4 @@ function ldsEngineCreator() {
|
|
|
9788
9922
|
}
|
|
9789
9923
|
|
|
9790
9924
|
export { LexRequestStrategy, PdlRequestPriority, buildPredictorForContext, ldsEngineCreator as default, initializeLDS, initializeOneStore, notifyUpdateAvailableFactory, registerRequestStrategy, saveRequestAsPrediction, unregisterRequestStrategy, whenPredictionsReady };
|
|
9791
|
-
// version: 1.
|
|
9925
|
+
// version: 1.410.0-19e0e5d352
|
|
@@ -1,8 +1,32 @@
|
|
|
1
1
|
import { type ResourceRequest } from '@luvio/engine';
|
|
2
2
|
import type { RequestLogger, RequestTracker } from '@salesforce/lds-network-fetch';
|
|
3
|
+
/**
|
|
4
|
+
* Base set of url paths that this adapter can serve via HTTP when enabled.
|
|
5
|
+
* Extend this list to support additional endpoints (see predicate wiring below).
|
|
6
|
+
*
|
|
7
|
+
* Examples:
|
|
8
|
+
* - Add another endpoint pattern:
|
|
9
|
+
* "/ui-api/records/{recordId}"
|
|
10
|
+
* - Keep placeholders for variable segments wrapped in "{}".
|
|
11
|
+
*/
|
|
12
|
+
export declare const UIAPI_PATHS: string[];
|
|
13
|
+
/**
|
|
14
|
+
* Single content documents version URL enabled/disabled by killswitch.
|
|
15
|
+
* Exported for reuse in tests.
|
|
16
|
+
*/
|
|
17
|
+
export declare const CONTENT_DOCUMENTS_VERSIONS_PATH = "/ui-api/records/content-documents/content-versions";
|
|
18
|
+
/**
|
|
19
|
+
* Indicates whether any predicate-enabled path sets are active.
|
|
20
|
+
* Used by adapter composition to decide whether to include the fetch adapter.
|
|
21
|
+
*/
|
|
22
|
+
export declare function isFetchAdapterEnabled(): boolean;
|
|
3
23
|
export declare const instrumentationTracker: RequestTracker;
|
|
4
24
|
export declare const requestLogger: RequestLogger;
|
|
5
25
|
export declare const composedFetchNetworkAdapter: {
|
|
26
|
+
/**
|
|
27
|
+
* Handles only the enabled paths. The incoming path is normalized
|
|
28
|
+
* (trailing slash removed) before matching against the precomputed matchers.
|
|
29
|
+
*/
|
|
6
30
|
shouldHandleRequest(resourceRequest: ResourceRequest): boolean;
|
|
7
31
|
adapter: import("@luvio/engine").NetworkAdapter;
|
|
8
32
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Luvio } from '@luvio/engine';
|
|
1
2
|
import type { GetRecordConfig } from '@salesforce/lds-adapters-uiapi';
|
|
2
3
|
import { LuvioAdapterRequestStrategy } from './luvio-adapter-request-strategy';
|
|
3
4
|
export type GetRecordRequest = {
|
|
@@ -9,12 +10,16 @@ type GetRecordContext = {
|
|
|
9
10
|
};
|
|
10
11
|
export declare const GET_RECORD_ADAPTER_NAME = "getRecord";
|
|
11
12
|
export declare class GetRecordRequestStrategy extends LuvioAdapterRequestStrategy<GetRecordConfig, GetRecordRequest, GetRecordContext> {
|
|
13
|
+
private readonly canCombineRecordLayoutRequests;
|
|
12
14
|
adapterName: string;
|
|
13
15
|
adapterFactory: import("@luvio/engine").AdapterFactory<GetRecordConfig, import("@salesforce/lds-adapters-uiapi").RecordRepresentation>;
|
|
16
|
+
constructor(luvio: Luvio, canCombineRecordLayoutRequests?: boolean);
|
|
14
17
|
buildConcreteRequest(similarRequest: GetRecordRequest, context: GetRecordContext): GetRecordRequest;
|
|
15
18
|
transformForSave(request: GetRecordRequest): GetRecordRequest;
|
|
16
19
|
canCombine(reqA: GetRecordConfig, reqB: GetRecordConfig): boolean;
|
|
17
20
|
combineRequests(reqA: GetRecordConfig, reqB: GetRecordConfig): GetRecordConfig;
|
|
21
|
+
combineLayoutRequests(reqA: GetRecordConfig, reqB: GetRecordConfig): GetRecordConfig;
|
|
22
|
+
combineFieldsRequests(reqA: GetRecordConfig, reqB: GetRecordConfig): GetRecordConfig;
|
|
18
23
|
isContextDependent(context: GetRecordContext, request: GetRecordRequest): boolean;
|
|
19
24
|
transformForSaveSimilarRequest(request: GetRecordRequest): GetRecordRequest;
|
|
20
25
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-aura",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.410.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "LDS engine for Aura runtime",
|
|
6
6
|
"main": "dist/ldsEngineCreator.js",
|
|
@@ -34,47 +34,49 @@
|
|
|
34
34
|
"release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-aura"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@conduit-client/service-provisioner": "3.
|
|
38
|
-
"@conduit-client/tools-core": "3.
|
|
39
|
-
"@salesforce/lds-adapters-apex": "^1.
|
|
40
|
-
"@salesforce/lds-adapters-uiapi": "^1.
|
|
41
|
-
"@salesforce/lds-ads-bridge": "^1.
|
|
42
|
-
"@salesforce/lds-aura-storage": "^1.
|
|
43
|
-
"@salesforce/lds-bindings": "^1.
|
|
44
|
-
"@salesforce/lds-instrumentation": "^1.
|
|
45
|
-
"@salesforce/lds-network-aura": "^1.
|
|
46
|
-
"@salesforce/lds-network-fetch": "^1.
|
|
37
|
+
"@conduit-client/service-provisioner": "3.6.1",
|
|
38
|
+
"@conduit-client/tools-core": "3.6.1",
|
|
39
|
+
"@salesforce/lds-adapters-apex": "^1.410.0",
|
|
40
|
+
"@salesforce/lds-adapters-uiapi": "^1.410.0",
|
|
41
|
+
"@salesforce/lds-ads-bridge": "^1.410.0",
|
|
42
|
+
"@salesforce/lds-aura-storage": "^1.410.0",
|
|
43
|
+
"@salesforce/lds-bindings": "^1.410.0",
|
|
44
|
+
"@salesforce/lds-instrumentation": "^1.410.0",
|
|
45
|
+
"@salesforce/lds-network-aura": "^1.410.0",
|
|
46
|
+
"@salesforce/lds-network-fetch": "^1.410.0",
|
|
47
47
|
"jwt-encode": "1.0.1"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@conduit-client/command-aura-graphql-normalized-cache-control": "3.
|
|
51
|
-
"@conduit-client/command-aura-network": "3.
|
|
52
|
-
"@conduit-client/command-aura-normalized-cache-control": "3.
|
|
53
|
-
"@conduit-client/command-aura-resource-cache-control": "3.
|
|
54
|
-
"@conduit-client/command-fetch-network": "3.
|
|
55
|
-
"@conduit-client/command-http-graphql-normalized-cache-control": "3.
|
|
56
|
-
"@conduit-client/command-http-normalized-cache-control": "3.
|
|
57
|
-
"@conduit-client/command-ndjson": "3.
|
|
58
|
-
"@conduit-client/command-network": "3.
|
|
59
|
-
"@conduit-client/command-sse": "3.
|
|
60
|
-
"@conduit-client/command-streaming": "3.
|
|
61
|
-
"@conduit-client/service-aura-network": "3.
|
|
62
|
-
"@conduit-client/service-
|
|
63
|
-
"@conduit-client/service-
|
|
64
|
-
"@conduit-client/service-cache
|
|
65
|
-
"@conduit-client/service-
|
|
66
|
-
"@conduit-client/service-
|
|
67
|
-
"@conduit-client/service-
|
|
68
|
-
"@conduit-client/service-
|
|
69
|
-
"@conduit-client/service-
|
|
70
|
-
"@conduit-client/
|
|
50
|
+
"@conduit-client/command-aura-graphql-normalized-cache-control": "3.6.1",
|
|
51
|
+
"@conduit-client/command-aura-network": "3.6.1",
|
|
52
|
+
"@conduit-client/command-aura-normalized-cache-control": "3.6.1",
|
|
53
|
+
"@conduit-client/command-aura-resource-cache-control": "3.6.1",
|
|
54
|
+
"@conduit-client/command-fetch-network": "3.6.1",
|
|
55
|
+
"@conduit-client/command-http-graphql-normalized-cache-control": "3.6.1",
|
|
56
|
+
"@conduit-client/command-http-normalized-cache-control": "3.6.1",
|
|
57
|
+
"@conduit-client/command-ndjson": "3.6.1",
|
|
58
|
+
"@conduit-client/command-network": "3.6.1",
|
|
59
|
+
"@conduit-client/command-sse": "3.6.1",
|
|
60
|
+
"@conduit-client/command-streaming": "3.6.1",
|
|
61
|
+
"@conduit-client/service-aura-network": "3.6.1",
|
|
62
|
+
"@conduit-client/service-bindings-imperative": "3.6.1",
|
|
63
|
+
"@conduit-client/service-bindings-lwc": "3.6.1",
|
|
64
|
+
"@conduit-client/service-cache": "3.6.1",
|
|
65
|
+
"@conduit-client/service-cache-control": "3.6.1",
|
|
66
|
+
"@conduit-client/service-cache-inclusion-policy": "3.6.1",
|
|
67
|
+
"@conduit-client/service-feature-flags": "3.6.1",
|
|
68
|
+
"@conduit-client/service-fetch-network": "3.6.1",
|
|
69
|
+
"@conduit-client/service-instrument-command": "3.6.1",
|
|
70
|
+
"@conduit-client/service-pubsub": "3.6.1",
|
|
71
|
+
"@conduit-client/service-store": "3.6.1",
|
|
72
|
+
"@conduit-client/utils": "3.6.1",
|
|
71
73
|
"@luvio/network-adapter-composable": "0.158.7",
|
|
72
74
|
"@luvio/network-adapter-fetch": "0.158.7",
|
|
73
75
|
"@lwc/state": "^0.23.0",
|
|
74
|
-
"@salesforce/lds-adapters-onestore-graphql": "^1.
|
|
75
|
-
"@salesforce/lds-adapters-uiapi-lex": "^1.
|
|
76
|
-
"@salesforce/lds-luvio-service": "^1.
|
|
77
|
-
"@salesforce/lds-luvio-uiapi-records-service": "^1.
|
|
76
|
+
"@salesforce/lds-adapters-onestore-graphql": "^1.410.0",
|
|
77
|
+
"@salesforce/lds-adapters-uiapi-lex": "^1.410.0",
|
|
78
|
+
"@salesforce/lds-luvio-service": "^1.410.0",
|
|
79
|
+
"@salesforce/lds-luvio-uiapi-records-service": "^1.410.0"
|
|
78
80
|
},
|
|
79
81
|
"luvioBundlesize": [
|
|
80
82
|
{
|
|
@@ -82,7 +84,7 @@
|
|
|
82
84
|
"maxSize": {
|
|
83
85
|
"none": "350 kB",
|
|
84
86
|
"min": "190 kB",
|
|
85
|
-
"compressed": "
|
|
87
|
+
"compressed": "57 kB"
|
|
86
88
|
}
|
|
87
89
|
}
|
|
88
90
|
],
|