@salesforce/lds-runtime-one-app 1.465.0 → 1.467.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.
@@ -13,9 +13,6 @@
13
13
  */
14
14
  /* proxy-compat-disable */
15
15
  import { HttpStatusCode as HttpStatusCode$2, InMemoryStore, Environment, Luvio, InMemoryStoreQueryEvaluator } from 'force/luvioEngine';
16
- import usePredictiveLoading from '@salesforce/gate/lds.usePredictiveLoading';
17
- import useLocalStorage from '@salesforce/gate/lds.pdl.useLocalStorage';
18
- import useOneStoreGraphql from '@salesforce/gate/lds.oneStoreGraphqlEnabled.ltng';
19
16
  import usePersistedQueries from '@salesforce/gate/lds.graphqlusepersistedqueries';
20
17
  import canCombineRecordLayoutRequests from '@salesforce/gate/lds.pdl.canCombineRecordLayoutRequests';
21
18
  import { GetApexWireAdapterFactory, registerPrefetcher as registerPrefetcher$1 } from 'force/ldsAdaptersApex';
@@ -41,11 +38,8 @@ import csrfValidationEnabled from '@salesforce/gate/ui.services.LightningConnect
41
38
  import sessionApiEnabled from '@salesforce/gate/ui.uisdk.session.api.enabled';
42
39
  import { pageScopedCache } from 'instrumentation/utility';
43
40
  import { createStorage, clearStorages } from 'force/ldsDurableStorage';
44
- import applyPredictionRequestLimit from '@salesforce/gate/lds.pdl.applyRequestLimit';
45
41
  import useHttpUiapiLex from '@salesforce/gate/lds.usehttpuiapilex';
46
42
  import auraBasedRequestsEnabled from '@salesforce/gate/ui.services.auraBasedRequests.enabled';
47
- import disableCreateContentDocumentAndVersionHTTPLexRuntime from '@salesforce/gate/lds.lex.http.disableCreateContentDocumentAndVersion';
48
- import useHotspotLimit from '@salesforce/gate/lds.pdl.useHotspotLimit';
49
43
  import { registerSubRequestNetworkAdapter } from 'force/ldsNetwork';
50
44
 
51
45
  const { create: create$1, freeze, keys: keys$2, entries: entries$1 } = Object;
@@ -389,13 +383,17 @@ function buildServiceDescriptor$q() {
389
383
  };
390
384
  }
391
385
 
392
- function applyOperationRequestOptions$1(init, operationType) {
393
- if (operationType === void 0) {
386
+ function applyOperationRequestOptions$3(init, operationType, requestOptions) {
387
+ if (operationType === void 0 && requestOptions === void 0) {
394
388
  return init;
395
389
  }
396
390
  return {
397
391
  ...init,
398
- onestore: { ...init?.onestore, retrySafe: operationType === "query" }
392
+ onestore: {
393
+ ...requestOptions,
394
+ ...init?.onestore,
395
+ ...operationType !== void 0 && { retrySafe: operationType === "query" }
396
+ }
399
397
  };
400
398
  }
401
399
  class AuraNetworkCommand extends NetworkCommand$1 {
@@ -428,6 +426,10 @@ class AuraNetworkCommand extends NetworkCommand$1 {
428
426
  get operationType() {
429
427
  return void 0;
430
428
  }
429
+ /** Declared `onestore` options (`handleServerError`, `compression`); generated overrides. HTTP fallback only. */
430
+ get requestOptions() {
431
+ return void 0;
432
+ }
431
433
  coerceAuraErrors(auraErrors) {
432
434
  const response = getFetchResponseFromAuraError(auraErrors[0]);
433
435
  return new UserVisibleError(
@@ -534,7 +536,11 @@ class AuraNetworkCommand extends NetworkCommand$1 {
534
536
  );
535
537
  } else if (this.shouldUseFetch()) {
536
538
  const [input, init] = this.fetchParams;
537
- const initWithOptions = applyOperationRequestOptions$1(init, this.operationType);
539
+ const initWithOptions = applyOperationRequestOptions$3(
540
+ init,
541
+ this.operationType,
542
+ this.requestOptions
543
+ );
538
544
  try {
539
545
  const fetchCall = initWithOptions === void 0 ? this.services.fetch(input) : this.services.fetch(input, initWithOptions);
540
546
  return this.convertFetchResponseToData(fetchCall);
@@ -1102,6 +1108,19 @@ function mergeCacheControlConfigs(baseConfig, overrides) {
1102
1108
  };
1103
1109
  }
1104
1110
 
1111
+ function applyOperationRequestOptions$2(init, operationType, requestOptions) {
1112
+ if (operationType === void 0 && requestOptions === void 0) {
1113
+ return init;
1114
+ }
1115
+ return {
1116
+ ...init,
1117
+ onestore: {
1118
+ ...requestOptions,
1119
+ ...init?.onestore,
1120
+ ...operationType !== void 0 && { retrySafe: operationType === "query" }
1121
+ }
1122
+ };
1123
+ }
1105
1124
  class AuraCacheControlCommand extends CacheControlCommand {
1106
1125
  constructor(services) {
1107
1126
  super(services);
@@ -1119,6 +1138,20 @@ class AuraCacheControlCommand extends CacheControlCommand {
1119
1138
  "Fetch parameters must be specified when using HTTP transport on an Aura adapter"
1120
1139
  );
1121
1140
  }
1141
+ /** Declared `onestore` options (`handleServerError`, `compression`); generated overrides. HTTP fallback only. */
1142
+ get requestOptions() {
1143
+ return void 0;
1144
+ }
1145
+ /**
1146
+ * `params` with request options merged into `init.onestore` (see `applyOperationRequestOptions`).
1147
+ * `retrySafe` follows `operationType` (default `'query'`): hand-written writes must override it.
1148
+ */
1149
+ withRequestOptions([
1150
+ input,
1151
+ init
1152
+ ]) {
1153
+ return [input, applyOperationRequestOptions$2(init, this.operationType, this.requestOptions)];
1154
+ }
1122
1155
  shouldUseAuraNetwork() {
1123
1156
  return this.services.auraNetwork !== void 0 && (this.networkPreference === "aura" || !this.services.fetch);
1124
1157
  }
@@ -1137,7 +1170,7 @@ class AuraCacheControlCommand extends CacheControlCommand {
1137
1170
  (errs) => this.coerceAuraErrors(errs)
1138
1171
  );
1139
1172
  } else if (this.shouldUseFetch()) {
1140
- const params = this.fetchParams;
1173
+ const params = this.withRequestOptions(this.fetchParams);
1141
1174
  try {
1142
1175
  return this.convertFetchResponseToData(this.services.fetch(...params));
1143
1176
  } catch (reason) {
@@ -1242,6 +1275,19 @@ function buildServiceDescriptor$o() {
1242
1275
  };
1243
1276
  }
1244
1277
 
1278
+ function applyOperationRequestOptions$1(init, operationType, requestOptions) {
1279
+ if (operationType === void 0 && requestOptions === void 0) {
1280
+ return init;
1281
+ }
1282
+ return {
1283
+ ...init,
1284
+ onestore: {
1285
+ ...requestOptions,
1286
+ ...init?.onestore,
1287
+ ...operationType !== void 0 && { retrySafe: operationType === "query" }
1288
+ }
1289
+ };
1290
+ }
1245
1291
  class HttpCacheControlCommand extends CacheControlCommand {
1246
1292
  constructor(services) {
1247
1293
  super(services);
@@ -1251,9 +1297,25 @@ class HttpCacheControlCommand extends CacheControlCommand {
1251
1297
  requestFromNetwork() {
1252
1298
  return this.fetch();
1253
1299
  }
1300
+ /** Declared `onestore` options (`handleServerError`, `compression`); generated overrides. */
1301
+ get requestOptions() {
1302
+ return void 0;
1303
+ }
1304
+ /**
1305
+ * `params` with request options merged into `init.onestore` (see `applyOperationRequestOptions`).
1306
+ * `retrySafe` follows `operationType` (default `'query'`): hand-written writes must override it.
1307
+ */
1308
+ withRequestOptions([
1309
+ input,
1310
+ init
1311
+ ]) {
1312
+ return [input, applyOperationRequestOptions$1(init, this.operationType, this.requestOptions)];
1313
+ }
1254
1314
  fetch() {
1255
1315
  try {
1256
- return this.convertFetchResponseToData(this.services.fetch(...this.fetchParams));
1316
+ return this.convertFetchResponseToData(
1317
+ this.services.fetch(...this.withRequestOptions(this.fetchParams))
1318
+ );
1257
1319
  } catch (reason) {
1258
1320
  return resolvedPromiseLike$2(err$1(toError(reason)));
1259
1321
  }
@@ -1391,13 +1453,17 @@ class NetworkCommand extends BaseCommand {
1391
1453
  async afterRequestHooks(_options) {
1392
1454
  }
1393
1455
  }
1394
- function applyOperationRequestOptions(init, operationType) {
1395
- if (operationType === void 0) {
1456
+ function applyOperationRequestOptions(init, operationType, requestOptions) {
1457
+ if (operationType === void 0 && requestOptions === void 0) {
1396
1458
  return init;
1397
1459
  }
1398
1460
  return {
1399
1461
  ...init,
1400
- onestore: { ...init?.onestore, retrySafe: operationType === "query" }
1462
+ onestore: {
1463
+ ...requestOptions,
1464
+ ...init?.onestore,
1465
+ ...operationType !== void 0 && { retrySafe: operationType === "query" }
1466
+ }
1401
1467
  };
1402
1468
  }
1403
1469
  function isAbortableCommand(command) {
@@ -1495,11 +1561,19 @@ const _FetchNetworkCommand = class _FetchNetworkCommand extends NetworkCommand {
1495
1561
  get operationType() {
1496
1562
  return void 0;
1497
1563
  }
1564
+ /** Declared `onestore` options (`handleServerError`, `compression`); generated overrides (`generateRequestOptionsGetter`). */
1565
+ get requestOptions() {
1566
+ return void 0;
1567
+ }
1498
1568
  fetch(contextSeed) {
1499
1569
  try {
1500
1570
  const [input, init] = this.fetchParams;
1501
1571
  const operationType = this.operationType;
1502
- const initWithOptions = applyOperationRequestOptions(init, operationType);
1572
+ const initWithOptions = applyOperationRequestOptions(
1573
+ init,
1574
+ operationType,
1575
+ this.requestOptions
1576
+ );
1503
1577
  const seed = operationType === void 0 ? contextSeed : { operationType, ...contextSeed };
1504
1578
  const initWithSeed = seed === void 0 ? initWithOptions : { ...initWithOptions, __contextSeed: seed };
1505
1579
  const fetchCall = initWithSeed === void 0 ? this.services.fetch(input) : this.services.fetch(input, initWithSeed);
@@ -2640,7 +2714,7 @@ function buildServiceDescriptor$d(luvio) {
2640
2714
  },
2641
2715
  };
2642
2716
  }
2643
- // version: 1.465.0-91ef58ca05
2717
+ // version: 1.467.0-4f065d2a2a
2644
2718
 
2645
2719
  class AuraGraphQLNormalizedCacheControlCommand extends AuraNormalizedCacheControlCommand {
2646
2720
  constructor(config, documentRootType, services) {
@@ -2751,7 +2825,7 @@ class AuraGraphQLNormalizedCacheControlCommand extends AuraNormalizedCacheContro
2751
2825
  return buildSubscribableResult$1(result, this.buildSubscribe(), () => this.refresh());
2752
2826
  });
2753
2827
  } else if (this.shouldUseFetch()) {
2754
- const params = this.originalFetchParams;
2828
+ const params = this.withRequestOptions(this.originalFetchParams);
2755
2829
  try {
2756
2830
  return this.convertFetchResponseToData(this.services.fetch(...params)).then(
2757
2831
  (result) => {
@@ -2906,7 +2980,7 @@ class HttpGraphQLNormalizedCacheControlCommand extends HttpNormalizedCacheContro
2906
2980
  }
2907
2981
  runOriginalRequest() {
2908
2982
  return this.convertFetchResponseToData(
2909
- this.services.fetch(...this.originalFetchParams)
2983
+ this.services.fetch(...this.withRequestOptions(this.originalFetchParams))
2910
2984
  ).then((result) => {
2911
2985
  return buildSubscribableResult$1(result, this.buildSubscribe(), () => this.refresh());
2912
2986
  });
@@ -2979,7 +3053,7 @@ function buildServiceDescriptor$9(notifyRecordUpdateAvailable, getNormalizedLuvi
2979
3053
  },
2980
3054
  };
2981
3055
  }
2982
- // version: 1.465.0-91ef58ca05
3056
+ // version: 1.467.0-4f065d2a2a
2983
3057
 
2984
3058
  class RetryService {
2985
3059
  constructor(defaultRetryPolicy) {
@@ -7930,7 +8004,7 @@ function getEnvironmentSetting(name) {
7930
8004
  }
7931
8005
  return undefined;
7932
8006
  }
7933
- // version: 1.465.0-4371689bb7
8007
+ // version: 1.467.0-049a8b6027
7934
8008
 
7935
8009
  /**
7936
8010
  * Helpers for reaching the Aura framework from the LDS Aura runtime.
@@ -7970,7 +8044,7 @@ function getAuraClientService() {
7970
8044
 
7971
8045
  const auraClientService = getAuraClientService();
7972
8046
  const defaultConfig = {
7973
- maxAllowedParallelXHRCounts: 9,
8047
+ maxAllowedParallelXHRCounts: 1000,
7974
8048
  forceRecordTransactionsDisabled: false,
7975
8049
  };
7976
8050
  const configServiceDescriptor = buildServiceDescriptor({
@@ -7979,19 +8053,13 @@ const configServiceDescriptor = buildServiceDescriptor({
7979
8053
  default: defaultConfig,
7980
8054
  });
7981
8055
  const configService = configServiceDescriptor.service;
8056
+ // The maxAllowedParallelXHRCounts check only detects the Aura LEX client service; the value itself
8057
+ // is no longer used (the PDL in-flight limit is fixed at the default above).
7982
8058
  if (auraClientService?.maxAllowedParallelXHRCounts) {
7983
8059
  configService.set('lex', (config) => {
7984
- config.maxAllowedParallelXHRCounts =
7985
- auraClientService.maxAllowedParallelXHRCounts?.() ??
7986
- defaultConfig.maxAllowedParallelXHRCounts;
7987
8060
  config.forceRecordTransactionsDisabled = getEnvironmentSetting(EnvironmentSettings.ForceRecordTransactionsDisabled);
7988
8061
  });
7989
8062
  }
7990
- if (!applyPredictionRequestLimit.isOpen({ fallback: false })) {
7991
- configService.set('lex', (config) => {
7992
- config.maxAllowedParallelXHRCounts = 1000;
7993
- });
7994
- }
7995
8063
 
7996
8064
  const forceRecordTransactionsDisabled = configService.config.forceRecordTransactionsDisabled;
7997
8065
  //TODO: Some duplication here that can be most likely moved to a util class
@@ -8439,7 +8507,7 @@ function buildLuvioThirdPartyTrackerFinishInterceptor() {
8439
8507
  }
8440
8508
 
8441
8509
  /**
8442
- * Single content documents version URL enabled/disabled by killswitch.
8510
+ * Single content documents version URL.
8443
8511
  * Exported for reuse in tests.
8444
8512
  */
8445
8513
  const CONTENT_DOCUMENTS_VERSIONS_PATH = '/ui-api/records/content-documents/content-versions';
@@ -8477,11 +8545,10 @@ const PREDICATE_PATH_SETS = [
8477
8545
  auraBasedRequestsEnabled.isOpen({ fallback: false }),
8478
8546
  paths: UIAPI_PRIVATE_PATHS,
8479
8547
  },
8480
- // disableCreateContentDocumentAndVersionHTTPLexRuntime killswitch.
8481
- // This fork only runs in LEX (one.app), never on a site, so the killswitch
8482
- // alone controls the feature.
8548
+ // Content document + version creation. Always on: this fork only runs in
8549
+ // LEX (one.app), never on a site.
8483
8550
  {
8484
- predicate: () => !disableCreateContentDocumentAndVersionHTTPLexRuntime.isOpen({ fallback: false }),
8551
+ predicate: () => true,
8485
8552
  paths: [CONTENT_DOCUMENTS_VERSIONS_PATH],
8486
8553
  },
8487
8554
  ];
@@ -8685,6 +8752,9 @@ function buildJwtAuthorizedSfapFetchServiceDescriptor(logger) {
8685
8752
  buildJwtParameterizationInterceptor(sfapJwtManager, buildSfapJwtRequestModifier(logger)),
8686
8753
  // Guarded so it is skipped once the parameterized interceptor handled the request.
8687
8754
  buildGuardedLegacyJwtRequestInterceptor(logger),
8755
+ // Per-request gzip: compresses only operations that opt in via
8756
+ // `init.onestore.compression`; a pass-through no-op otherwise.
8757
+ buildCompressionInterceptor(),
8688
8758
  ],
8689
8759
  finally: [buildThirdPartyTrackerFinishInterceptor()],
8690
8760
  });
@@ -8787,6 +8857,9 @@ function buildCopilotFetchServiceDescriptor(logger) {
8787
8857
  });
8788
8858
  },
8789
8859
  buildJwtRequestInterceptor(logger),
8860
+ // Per-request gzip (opt-in via `init.onestore.compression`); last so it
8861
+ // sees the body after the session-start rewrite above.
8862
+ buildCompressionInterceptor(),
8790
8863
  ],
8791
8864
  retry: buildFetchRetryInterceptor(),
8792
8865
  finally: [buildThirdPartyTrackerFinishInterceptor()],
@@ -8797,7 +8870,8 @@ function buildCopilotFetchServiceDescriptor(logger) {
8797
8870
  function buildUnauthorizedFetchServiceDescriptor() {
8798
8871
  const fetchService = buildServiceDescriptor$2({
8799
8872
  createContext: createInstrumentationIdContext(),
8800
- request: [buildThirdPartyTrackerRegisterInterceptor()],
8873
+ // Per-request gzip (opt-in via `init.onestore.compression`).
8874
+ request: [buildThirdPartyTrackerRegisterInterceptor(), buildCompressionInterceptor()],
8801
8875
  retry: buildFetchRetryInterceptor(),
8802
8876
  finally: [buildThirdPartyTrackerFinishInterceptor()],
8803
8877
  });
@@ -9104,17 +9178,17 @@ class LuvioAdapterRequestStrategy extends LexRequestStrategy {
9104
9178
  super();
9105
9179
  this.luvio = luvio;
9106
9180
  }
9107
- execute(config, options = {}) {
9108
- return this.adapterFactory(this.luvio)(config, this.createAdapterContext(options));
9181
+ execute(config) {
9182
+ return this.adapterFactory(this.luvio)(config, this.createAdapterContext());
9109
9183
  }
9110
- createAdapterContext(options) {
9184
+ createAdapterContext() {
9111
9185
  return {
9112
9186
  ...DEFAULT_RESOURCE_CONTEXT,
9113
9187
  sourceContext: {
9114
9188
  ...DEFAULT_RESOURCE_CONTEXT.sourceContext,
9115
9189
  actionConfig: {
9116
9190
  ...DEFAULT_RESOURCE_CONTEXT.sourceContext.actionConfig,
9117
- hotspot: !options.disableHotspot,
9191
+ hotspot: true,
9118
9192
  },
9119
9193
  },
9120
9194
  };
@@ -10016,7 +10090,7 @@ class GetApexRequestStrategy extends LuvioAdapterRequestStrategy {
10016
10090
  buildConcreteRequest(similarRequest) {
10017
10091
  return similarRequest;
10018
10092
  }
10019
- createAdapterContext(_options) {
10093
+ createAdapterContext() {
10020
10094
  return APEX_RESOURCE_CONTEXT;
10021
10095
  }
10022
10096
  getRequestPriority(_request, _context) {
@@ -10616,27 +10690,6 @@ async function runRequestsWithLimit(requests, runner, concurrentRequestsLimit, p
10616
10690
  // Wait for all initial requests to complete
10617
10691
  await Promise.all(promises);
10618
10692
  }
10619
- /**
10620
- * Runs entire list of LEX requests, applying hotspot up to the specified limit and disabling for all remaining
10621
- *
10622
- * @param {RequestEntry<LexRequest>[]} requests - An array of request entries to be processed in the array order.
10623
- * @param {RequestRunner<LexRequest, LexRequestOptions>} runner - The runner instance responsible for executing the requests.
10624
- * @param {number} hotspotLimit - The number of hotspot requests allowed.
10625
- * @returns {Promise<void>} A promise that resolves when all requests have been processed.
10626
- *
10627
- * This function processes a queue of pending requests, enabling hotspot for the first N requests,
10628
- * as specified by the hotspotLimit argument. The remaining requests have hotspot disabled.
10629
- */
10630
- async function runRequestsWithHotspotLimit(requests, runner, hotspotLimit) {
10631
- const promises = requests.map((request, index) => {
10632
- // determine if hotspot needs to be disabled or not
10633
- const disableHotspot = index >= hotspotLimit;
10634
- // run request with hotspot setting
10635
- return runner.runRequest(request.request, { disableHotspot });
10636
- });
10637
- // promise for all requests
10638
- await Promise.all(promises);
10639
- }
10640
10693
  /**
10641
10694
  * Compares two request entries based on their priority and, if the priorities are the same, their request times.
10642
10695
  * This function is typically used for sorting requests where priority takes precedence, and timing is used
@@ -10670,16 +10723,6 @@ function compareByPriorityThenTime({ request: requestA, requestMetadata: request
10670
10723
  return bPriority - aPriority;
10671
10724
  }
10672
10725
  }
10673
- /**
10674
- * Returns the value of the gate that controls whether to use the hotspot limit. Value is cached after the initial call
10675
- *
10676
- * @returns {boolean} true if the gate is open, false otherwise.
10677
- */
10678
- let useHotspotLimitOpen;
10679
- function isUseHotspotLimitOpen() {
10680
- useHotspotLimitOpen = useHotspotLimitOpen ?? useHotspotLimit.isOpen({ fallback: false });
10681
- return useHotspotLimitOpen;
10682
- }
10683
10726
 
10684
10727
  function isBoxcarableRequest({ request: { adapterName } }, requestStrategyManager) {
10685
10728
  const strategy = requestStrategyManager.get(adapterName);
@@ -10756,19 +10799,14 @@ class LexPredictivePrefetcher extends ApplicationPredictivePrefetcher {
10756
10799
  async predict() {
10757
10800
  const requests = this.getPredictedRequestsOrderedByPriority();
10758
10801
  this.totalRequestCount = requests.length;
10759
- if (isUseHotspotLimitOpen()) {
10760
- await runRequestsWithHotspotLimit(requests, this.requestRunner, Math.floor(this.options.inflightRequestLimit / 2));
10761
- }
10762
- else {
10763
- await runRequestsWithLimit(requests, this.requestRunner,
10764
- // don't get available thread count below threshold else Aura will boxcar
10765
- this.options.inflightRequestLimit - AURA_BOXCAR_THREADS_THRESHOLD,
10766
- // `this.repository.pageStartTime` would be the correct here,
10767
- // but when doing predict+watch, it could be (set in watch)
10768
- // repository.startTime is not set yet, Date.now() is a better alternative,
10769
- // that is correct, and works on both cases.
10770
- Date.now());
10771
- }
10802
+ await runRequestsWithLimit(requests, this.requestRunner,
10803
+ // don't get available thread count below threshold else Aura will boxcar
10804
+ this.options.inflightRequestLimit - AURA_BOXCAR_THREADS_THRESHOLD,
10805
+ // `this.repository.pageStartTime` would be the correct here,
10806
+ // but when doing predict+watch, it could be (set in watch)
10807
+ // repository.startTime is not set yet, Date.now() is a better alternative,
10808
+ // that is correct, and works on both cases.
10809
+ Date.now());
10772
10810
  }
10773
10811
  }
10774
10812
 
@@ -10783,10 +10821,10 @@ class LexRequestRunner {
10783
10821
  .map((strategy) => strategy.reduce(requests))
10784
10822
  .flat();
10785
10823
  }
10786
- runRequest(request, options = {}) {
10824
+ runRequest(request) {
10787
10825
  const strategy = this.requestStrategyManager.get(request.adapterName);
10788
10826
  if (strategy) {
10789
- return Promise.resolve(strategy.execute(request.config, options)).then();
10827
+ return Promise.resolve(strategy.execute(request.config)).then();
10790
10828
  }
10791
10829
  return Promise.resolve(undefined);
10792
10830
  }
@@ -10891,8 +10929,8 @@ function isLocalStorageAvailable() {
10891
10929
  return false;
10892
10930
  }
10893
10931
  }
10894
- function buildPrefetchStorage(useLocalStorage, options) {
10895
- if (useLocalStorage && isLocalStorageAvailable()) {
10932
+ function buildPrefetchStorage(options) {
10933
+ if (isLocalStorageAvailable()) {
10896
10934
  return buildAuraLocalStoragePrefetchStorage(options);
10897
10935
  }
10898
10936
  else {
@@ -11345,7 +11383,7 @@ function setupPredictivePrefetcher(luvio) {
11345
11383
  new GetRelatedListActionsRequestStrategy(luvio),
11346
11384
  ];
11347
11385
  requestStrategyManager.register(allStrategies);
11348
- const storage = buildPrefetchStorage(useLocalStorage.isOpen({ fallback: false }), {
11386
+ const storage = buildPrefetchStorage({
11349
11387
  onPredictionsReadyCallback: () => predictionsReadyManager.notifyPredictionsReady(),
11350
11388
  });
11351
11389
  const requestRunner = new LexRequestRunner(requestStrategyManager);
@@ -11479,9 +11517,7 @@ function initializeLDS() {
11479
11517
  setupQueryEvaluators(luvio, store);
11480
11518
  setDefaultLuvio({ luvio });
11481
11519
  setTrackedFieldsConfig();
11482
- if (usePredictiveLoading.isOpen({ fallback: false })) {
11483
- setupPredictivePrefetcher(luvio);
11484
- }
11520
+ setupPredictivePrefetcher(luvio);
11485
11521
  return luvio; // Return the luvio instance so that we can inject it for OneStore
11486
11522
  }
11487
11523
  // Initializes OneStore in LEX
@@ -11532,8 +11568,6 @@ function initializeOneStore(luvio) {
11532
11568
  version: '1.0',
11533
11569
  service: prefetchSfapJwt,
11534
11570
  };
11535
- // set flags based on gates
11536
- featureFlagsService.set('useOneStoreGraphQL', useOneStoreGraphql.isOpen({ fallback: false }));
11537
11571
  // Use the Aura transport for the OneStore GraphQL command by default. The
11538
11572
  // HTTP transport's CSRF handling is broken on Aura/Experience sites
11539
11573
  // (W-23092947), and defaulting to Aura keeps a single, known-good transport
@@ -11602,4 +11636,4 @@ function ldsEngineCreator() {
11602
11636
  }
11603
11637
 
11604
11638
  export { LexRequestStrategy, PDL_ENGINE_REGISTRATION_ID, PdlPrefetcherEventType, PdlRequestPriority, buildPredictorForContext, configService, ldsEngineCreator as default, initializeLDS, initializeOneStore, notifyUpdateAvailableFactory, registerRequestStrategy, saveRequestAsPrediction, subscribeToPrefetcherEvents, unregisterRequestStrategy, whenPredictionsReady };
11605
- // version: 1.465.0-91ef58ca05
11639
+ // version: 1.467.0-4f065d2a2a
@@ -4,7 +4,7 @@ import type { RequestLogger } from '@salesforce/lds-network-fetch';
4
4
  import type { RequestTracker } from '@salesforce/lds-runtime-shared';
5
5
  export { UIAPI_PUBLIC_PATHS, UIAPI_PRIVATE_PATHS };
6
6
  /**
7
- * Single content documents version URL enabled/disabled by killswitch.
7
+ * Single content documents version URL.
8
8
  * Exported for reuse in tests.
9
9
  */
10
10
  export declare const CONTENT_DOCUMENTS_VERSIONS_PATH = "/ui-api/records/content-documents/content-versions";
@@ -11,7 +11,4 @@ export type LexPrefetcherOptions = {
11
11
  };
12
12
  export { PredictionsReadyManager } from './predictions-ready-manager';
13
13
  export type LexRequest<Config = unknown> = BaseAdapterRequest<Config>;
14
- export type LexRequestOptions = {
15
- disableHotspot?: boolean;
16
- };
17
14
  export type LexContext = RecordHomePageContext | ObjectHomePageContext | DefaultPageContext;
@@ -1,6 +1,6 @@
1
1
  import type { RequestRunner } from '../request-runner';
2
2
  import type { RequestEntry } from '../common';
3
- import type { LexRequest, LexRequestOptions } from '../lex';
3
+ import type { LexRequest } from '../lex';
4
4
  import type { RequestStrategyManager } from '../request-strategy-manager/request-strategy-manager';
5
5
  import type { DefaultPageContext } from '../pages';
6
6
  /**
@@ -17,18 +17,6 @@ import type { DefaultPageContext } from '../pages';
17
17
  * Requests are only processed if their `requestTime` is less than the time elapsed since `pageStartTime`.
18
18
  */
19
19
  export declare function runRequestsWithLimit<Request>(requests: RequestEntry<Request>[], runner: RequestRunner<Request>, concurrentRequestsLimit: number, pageStartTime: number): Promise<void>;
20
- /**
21
- * Runs entire list of LEX requests, applying hotspot up to the specified limit and disabling for all remaining
22
- *
23
- * @param {RequestEntry<LexRequest>[]} requests - An array of request entries to be processed in the array order.
24
- * @param {RequestRunner<LexRequest, LexRequestOptions>} runner - The runner instance responsible for executing the requests.
25
- * @param {number} hotspotLimit - The number of hotspot requests allowed.
26
- * @returns {Promise<void>} A promise that resolves when all requests have been processed.
27
- *
28
- * This function processes a queue of pending requests, enabling hotspot for the first N requests,
29
- * as specified by the hotspotLimit argument. The remaining requests have hotspot disabled.
30
- */
31
- export declare function runRequestsWithHotspotLimit(requests: RequestEntry<LexRequest>[], runner: RequestRunner<LexRequest, LexRequestOptions>, hotspotLimit: number): Promise<void>;
32
20
  /**
33
21
  * Compares two request entries based on their priority and, if the priorities are the same, their request times.
34
22
  * This function is typically used for sorting requests where priority takes precedence, and timing is used
@@ -49,4 +37,3 @@ export declare function runRequestsWithHotspotLimit(requests: RequestEntry<LexRe
49
37
  * the priority defaults to `RequestPriority.LOW`.
50
38
  */
51
39
  export declare function compareByPriorityThenTime<Context extends DefaultPageContext = DefaultPageContext>({ request: requestA, requestMetadata: requestMetadataA }: RequestEntry<LexRequest>, { request: requestB, requestMetadata: requestMetadataB }: RequestEntry<LexRequest>, requestStrategyManager: RequestStrategyManager, context: Context): number;
52
- export declare function isUseHotspotLimitOpen(): boolean;
@@ -1,10 +1,10 @@
1
1
  import type { RequestRunner } from './request-runner';
2
2
  import type { RequestEntry } from '../common';
3
- import type { LexRequest, LexRequestOptions } from '../lex';
3
+ import type { LexRequest } from '../lex';
4
4
  import type { RequestStrategyManager } from '../request-strategy-manager/request-strategy-manager';
5
- export declare class LexRequestRunner implements RequestRunner<LexRequest, LexRequestOptions> {
5
+ export declare class LexRequestRunner implements RequestRunner<LexRequest> {
6
6
  private requestStrategyManager;
7
7
  constructor(requestStrategyManager: RequestStrategyManager);
8
8
  reduceRequests(requests: RequestEntry<LexRequest>[]): RequestEntry<LexRequest>[];
9
- runRequest(request: LexRequest, options?: LexRequestOptions): Promise<void>;
9
+ runRequest(request: LexRequest): Promise<void>;
10
10
  }
@@ -2,7 +2,6 @@ import type { ApexInvokerParams } from '@salesforce/lds-adapters-apex';
2
2
  import type { AdapterRequestContext, Luvio } from '@luvio/engine';
3
3
  import { LuvioAdapterRequestStrategy } from './luvio-adapter-request-strategy';
4
4
  import { RequestPriority } from './request-strategy';
5
- import type { LexRequestOptions } from '../lex';
6
5
  export type GetApexConfig = {
7
6
  name: string;
8
7
  invokerParams: ApexInvokerParams;
@@ -19,7 +18,7 @@ export declare class GetApexRequestStrategy extends LuvioAdapterRequestStrategy<
19
18
  adapterName: string;
20
19
  adapterFactory: typeof getApexPdlFactory;
21
20
  buildConcreteRequest(similarRequest: GetApexRequest): GetApexRequest;
22
- protected createAdapterContext(_options: LexRequestOptions): {
21
+ protected createAdapterContext(): {
23
22
  sourceContext: {
24
23
  actionConfig: undefined;
25
24
  tagName: string;
@@ -1,7 +1,7 @@
1
1
  import { RequestStrategy } from './request-strategy';
2
- import type { LexContext, LexRequest, LexRequestOptions } from '../lex';
2
+ import type { LexContext, LexRequest } from '../lex';
3
3
  import type { DefaultPageContext } from '../pages';
4
- export declare abstract class LexRequestStrategy<Config = unknown, Request extends LexRequest<Config> = LexRequest<Config>, Context extends LexContext = DefaultPageContext> extends RequestStrategy<Config, Request, Context, LexRequestOptions> {
4
+ export declare abstract class LexRequestStrategy<Config = unknown, Request extends LexRequest<Config> = LexRequest<Config>, Context extends LexContext = DefaultPageContext> extends RequestStrategy<Config, Request, Context, Record<string, never>> {
5
5
  /**
6
6
  * Whether or not requests from this strategies can be boxcarred by Aura.
7
7
  * If they are, the lex prefetcher will run predictions of this strategy with a limit,
@@ -1,6 +1,6 @@
1
1
  import type { AdapterFactory, Luvio, Snapshot } from '@luvio/engine';
2
2
  import { LexRequestStrategy } from './lex-request-strategy';
3
- import type { LexContext, LexRequest, LexRequestOptions } from '../lex';
3
+ import type { LexContext, LexRequest } from '../lex';
4
4
  export declare const DEFAULT_RESOURCE_CONTEXT: {
5
5
  sourceContext: {
6
6
  tagName: string;
@@ -22,6 +22,6 @@ export declare abstract class LuvioAdapterRequestStrategy<AdapterConfig, Request
22
22
  * Factory for the adapter used in this strategy.
23
23
  */
24
24
  abstract adapterFactory: AdapterFactory<AdapterConfig, any>;
25
- execute(config: AdapterConfig, options?: LexRequestOptions): Snapshot<any> | Promise<Snapshot<any>> | null;
26
- protected createAdapterContext(options: LexRequestOptions): any;
25
+ execute(config: AdapterConfig): Snapshot<any> | Promise<Snapshot<any>> | null;
26
+ protected createAdapterContext(): any;
27
27
  }
@@ -3,6 +3,6 @@ export type PrefetchStorage = {
3
3
  get<T>(key: string): T | undefined;
4
4
  set<T>(key: string, value: T): Promise<void>;
5
5
  };
6
- export declare function buildPrefetchStorage(useLocalStorage: boolean, options: StorageOptions): PrefetchStorage;
6
+ export declare function buildPrefetchStorage(options: StorageOptions): PrefetchStorage;
7
7
  export * from './in-memory-prefetch-storage';
8
8
  export * from './local-prefetch-storage';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-one-app",
3
- "version": "1.465.0",
3
+ "version": "1.467.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS engine for the one.app (LEX) runtime.",
6
6
  "main": "dist/oneAppLdsEngineCreator.js",
@@ -34,54 +34,54 @@
34
34
  "release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-one-app"
35
35
  },
36
36
  "devDependencies": {
37
- "@conduit-client/service-provisioner": "3.32.1",
38
- "@conduit-client/tools-core": "3.32.1",
39
- "@salesforce/lds-adapters-apex": "^1.465.0",
40
- "@salesforce/lds-adapters-uiapi": "^1.465.0",
41
- "@salesforce/lds-ads-bridge": "^1.465.0",
42
- "@salesforce/lds-aura-storage": "^1.465.0",
43
- "@salesforce/lds-bindings": "^1.465.0",
44
- "@salesforce/lds-instrumentation": "^1.465.0",
45
- "@salesforce/lds-network-adapter": "^1.465.0",
46
- "@salesforce/lds-network-aura": "^1.465.0",
47
- "@salesforce/lds-network-fetch": "^1.465.0",
48
- "@salesforce/lds-runtime-shared": "^1.465.0",
37
+ "@conduit-client/service-provisioner": "3.34.0",
38
+ "@conduit-client/tools-core": "3.34.0",
39
+ "@salesforce/lds-adapters-apex": "^1.467.0",
40
+ "@salesforce/lds-adapters-uiapi": "^1.467.0",
41
+ "@salesforce/lds-ads-bridge": "^1.467.0",
42
+ "@salesforce/lds-aura-storage": "^1.467.0",
43
+ "@salesforce/lds-bindings": "^1.467.0",
44
+ "@salesforce/lds-instrumentation": "^1.467.0",
45
+ "@salesforce/lds-network-adapter": "^1.467.0",
46
+ "@salesforce/lds-network-aura": "^1.467.0",
47
+ "@salesforce/lds-network-fetch": "^1.467.0",
48
+ "@salesforce/lds-runtime-shared": "^1.467.0",
49
49
  "jwt-encode": "1.0.1"
50
50
  },
51
51
  "dependencies": {
52
- "@conduit-client/command-aura-graphql-normalized-cache-control": "3.32.1",
53
- "@conduit-client/command-aura-network": "3.32.1",
54
- "@conduit-client/command-aura-normalized-cache-control": "3.32.1",
55
- "@conduit-client/command-fetch-network": "3.32.1",
56
- "@conduit-client/command-http-graphql-normalized-cache-control": "3.32.1",
57
- "@conduit-client/command-http-normalized-cache-control": "3.32.1",
58
- "@conduit-client/command-ndjson": "3.32.1",
59
- "@conduit-client/command-network": "3.32.1",
60
- "@conduit-client/command-sse": "3.32.1",
61
- "@conduit-client/command-streaming": "3.32.1",
62
- "@conduit-client/jwt-manager": "3.32.1",
63
- "@conduit-client/service-aura-network": "3.32.1",
64
- "@conduit-client/service-bindings-imperative": "3.32.1",
65
- "@conduit-client/service-bindings-lwc": "3.32.1",
66
- "@conduit-client/service-cache": "3.32.1",
67
- "@conduit-client/service-cache-control": "3.32.1",
68
- "@conduit-client/service-cache-inclusion-policy": "3.32.1",
69
- "@conduit-client/service-config": "3.32.1",
70
- "@conduit-client/service-feature-flags": "3.32.1",
71
- "@conduit-client/service-fetch-network": "3.32.1",
72
- "@conduit-client/service-instrument-command": "3.32.1",
73
- "@conduit-client/service-pubsub": "3.32.1",
74
- "@conduit-client/service-renewable-resource-manager": "3.32.1",
75
- "@conduit-client/service-store": "3.32.1",
76
- "@conduit-client/utils": "3.32.1",
52
+ "@conduit-client/command-aura-graphql-normalized-cache-control": "3.34.0",
53
+ "@conduit-client/command-aura-network": "3.34.0",
54
+ "@conduit-client/command-aura-normalized-cache-control": "3.34.0",
55
+ "@conduit-client/command-fetch-network": "3.34.0",
56
+ "@conduit-client/command-http-graphql-normalized-cache-control": "3.34.0",
57
+ "@conduit-client/command-http-normalized-cache-control": "3.34.0",
58
+ "@conduit-client/command-ndjson": "3.34.0",
59
+ "@conduit-client/command-network": "3.34.0",
60
+ "@conduit-client/command-sse": "3.34.0",
61
+ "@conduit-client/command-streaming": "3.34.0",
62
+ "@conduit-client/jwt-manager": "3.34.0",
63
+ "@conduit-client/service-aura-network": "3.34.0",
64
+ "@conduit-client/service-bindings-imperative": "3.34.0",
65
+ "@conduit-client/service-bindings-lwc": "3.34.0",
66
+ "@conduit-client/service-cache": "3.34.0",
67
+ "@conduit-client/service-cache-control": "3.34.0",
68
+ "@conduit-client/service-cache-inclusion-policy": "3.34.0",
69
+ "@conduit-client/service-config": "3.34.0",
70
+ "@conduit-client/service-feature-flags": "3.34.0",
71
+ "@conduit-client/service-fetch-network": "3.34.0",
72
+ "@conduit-client/service-instrument-command": "3.34.0",
73
+ "@conduit-client/service-pubsub": "3.34.0",
74
+ "@conduit-client/service-renewable-resource-manager": "3.34.0",
75
+ "@conduit-client/service-store": "3.34.0",
76
+ "@conduit-client/utils": "3.34.0",
77
77
  "@luvio/network-adapter-composable": "0.161.2",
78
78
  "@luvio/network-adapter-fetch": "0.161.2",
79
79
  "@lwc/state": "^0.29.0",
80
- "@salesforce/lds-adapters-onestore-graphql": "^1.465.0",
80
+ "@salesforce/lds-adapters-onestore-graphql": "^1.467.0",
81
81
  "@salesforce/lds-adapters-uiapi-lex": "^1.415.0",
82
- "@salesforce/lds-durable-storage": "^1.465.0",
83
- "@salesforce/lds-luvio-service": "^1.465.0",
84
- "@salesforce/lds-luvio-uiapi-records-service": "^1.465.0"
82
+ "@salesforce/lds-durable-storage": "^1.467.0",
83
+ "@salesforce/lds-luvio-service": "^1.467.0",
84
+ "@salesforce/lds-luvio-uiapi-records-service": "^1.467.0"
85
85
  },
86
86
  "luvioBundlesize": [
87
87
  {