@salesforce/lds-runtime-one-runtime 1.466.0 → 1.468.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,7 +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
16
  import usePersistedQueries from '@salesforce/gate/lds.graphqlusepersistedqueries';
18
17
  import canCombineRecordLayoutRequests from '@salesforce/gate/lds.pdl.canCombineRecordLayoutRequests';
19
18
  import { GetApexWireAdapterFactory, registerPrefetcher as registerPrefetcher$1 } from 'force/ldsAdaptersApex';
@@ -39,10 +38,8 @@ import csrfValidationEnabled from '@salesforce/gate/ui.services.LightningConnect
39
38
  import sessionApiEnabled from '@salesforce/gate/ui.uisdk.session.api.enabled';
40
39
  import { pageScopedCache } from 'instrumentation/utility';
41
40
  import { createStorage, clearStorages } from 'force/ldsDurableStorage';
42
- import applyPredictionRequestLimit from '@salesforce/gate/lds.pdl.applyRequestLimit';
43
- import useHttpUiapiOneRuntime from '@salesforce/gate/lds.useHttpUiapiOneRuntime';
41
+ import useHttpUiapiLex from '@salesforce/gate/lds.usehttpuiapilex';
44
42
  import auraBasedRequestsEnabled from '@salesforce/gate/ui.services.auraBasedRequests.enabled';
45
- import useHotspotLimit from '@salesforce/gate/lds.pdl.useHotspotLimit';
46
43
  import { registerSubRequestNetworkAdapter } from 'force/ldsNetwork';
47
44
 
48
45
  const { create: create$1, freeze, keys: keys$2, entries: entries$1 } = Object;
@@ -172,6 +169,45 @@ function rejectedPromiseLike$2(reason) {
172
169
  function isPromiseLike$2(x) {
173
170
  return typeof x?.then === "function";
174
171
  }
172
+ function deepEquals$2(x, y) {
173
+ if (x === void 0) {
174
+ return y === void 0;
175
+ } else if (x === null) {
176
+ return y === null;
177
+ } else if (y === null) {
178
+ return x === null;
179
+ } else if (isArray$4(x)) {
180
+ if (!isArray$4(y) || x.length !== y.length) {
181
+ return false;
182
+ }
183
+ for (let i = 0; i < x.length; ++i) {
184
+ if (!deepEquals$2(x[i], y[i])) {
185
+ return false;
186
+ }
187
+ }
188
+ return true;
189
+ } else if (typeof x === "object") {
190
+ if (typeof y !== "object") {
191
+ return false;
192
+ }
193
+ const xkeys = Object.keys(x);
194
+ const ykeys = Object.keys(y);
195
+ if (xkeys.length !== ykeys.length) {
196
+ return false;
197
+ }
198
+ for (let i = 0; i < xkeys.length; ++i) {
199
+ const key = xkeys[i];
200
+ if (!deepEquals$2(
201
+ x[key],
202
+ y[key]
203
+ )) {
204
+ return false;
205
+ }
206
+ }
207
+ return true;
208
+ }
209
+ return x === y;
210
+ }
175
211
  function stableJSONStringify$2(node) {
176
212
  const withToJSON = node;
177
213
  if (withToJSON && typeof withToJSON.toJSON === "function") {
@@ -369,7 +405,10 @@ let NetworkCommand$1 = class NetworkCommand extends BaseCommand {
369
405
  if (isSubscribableResult(newResult)) {
370
406
  const value = newResult.isOk() ? ok$2(newResult.value.data) : err$1(newResult.error.failure);
371
407
  this.subscriptions.forEach((cb) => {
372
- cb(value);
408
+ try {
409
+ cb(value);
410
+ } catch {
411
+ }
373
412
  });
374
413
  }
375
414
  return ok$2(void 0);
@@ -1447,7 +1486,10 @@ class NetworkCommand extends BaseCommand {
1447
1486
  if (isSubscribableResult(newResult)) {
1448
1487
  const value = newResult.isOk() ? ok$2(newResult.value.data) : err$1(newResult.error.failure);
1449
1488
  this.subscriptions.forEach((cb) => {
1450
- cb(value);
1489
+ try {
1490
+ cb(value);
1491
+ } catch {
1492
+ }
1451
1493
  });
1452
1494
  }
1453
1495
  return ok$2(void 0);
@@ -1469,6 +1511,79 @@ function applyOperationRequestOptions(init, operationType, requestOptions) {
1469
1511
  }
1470
1512
  };
1471
1513
  }
1514
+ function fetchFromNetwork(getRequest, hooks, contextSeed) {
1515
+ try {
1516
+ const {
1517
+ services,
1518
+ params: [input, init],
1519
+ operationType,
1520
+ requestOptions
1521
+ } = getRequest();
1522
+ const initWithOptions = applyOperationRequestOptions(init, operationType, requestOptions);
1523
+ const seed = operationType === void 0 ? contextSeed : { operationType, ...contextSeed };
1524
+ const initWithSeed = seed === void 0 ? initWithOptions : { ...initWithOptions, __contextSeed: seed };
1525
+ const fetchCall = initWithSeed === void 0 ? services.fetch(input) : services.fetch(input, initWithSeed);
1526
+ return convertFetchResponseToData(fetchCall, hooks);
1527
+ } catch (reason) {
1528
+ return resolvedPromiseLike$2(err$1(toError(reason)));
1529
+ }
1530
+ }
1531
+ function convertFetchResponseToData(response, hooks) {
1532
+ return response.then(
1533
+ (response2) => {
1534
+ if (response2.ok) {
1535
+ let resultPromise;
1536
+ if (hooks.isSemanticNullResponse(response2)) {
1537
+ resultPromise = Promise.resolve(ok$2(null));
1538
+ } else if (hooks.isProtocolNoBodyStatus(response2.status) && !hooks.isSemanticNullResponse(response2)) {
1539
+ resultPromise = Promise.resolve(
1540
+ err$1(
1541
+ toError(
1542
+ `Unexpected ${response2.status} response: no-content status was not declared in the API specification. Declare this response in your OAS without a content property.`
1543
+ )
1544
+ )
1545
+ );
1546
+ } else {
1547
+ resultPromise = response2.json().then(
1548
+ (json) => ok$2(json),
1549
+ (reason) => err$1(toError(reason))
1550
+ );
1551
+ }
1552
+ return resultPromise.finally(() => {
1553
+ try {
1554
+ hooks.afterRequestHooks({ statusCode: response2.status });
1555
+ } catch {
1556
+ }
1557
+ });
1558
+ } else {
1559
+ return hooks.coerceError(response2).then((coercedError) => {
1560
+ return err$1(coercedError);
1561
+ }).finally(() => {
1562
+ try {
1563
+ hooks.afterRequestHooks({ statusCode: response2.status });
1564
+ } catch {
1565
+ }
1566
+ });
1567
+ }
1568
+ },
1569
+ (reason) => err$1(toError(reason))
1570
+ );
1571
+ }
1572
+ function completeRefresh(result, getSubscriptions, options = {}) {
1573
+ const { previousResult } = options;
1574
+ if (!options.suppressEqualSuccesses || result.isErr() || !previousResult || previousResult.isErr() || !deepEquals$2(previousResult.value, result.value)) {
1575
+ const subscriptions = getSubscriptions();
1576
+ const callbacks = options.skipRemovedSubscriptions ? [...subscriptions] : subscriptions;
1577
+ callbacks.forEach((callback) => {
1578
+ if (options.skipRemovedSubscriptions && !getSubscriptions().includes(callback)) return;
1579
+ try {
1580
+ callback(result);
1581
+ } catch {
1582
+ }
1583
+ });
1584
+ }
1585
+ return options.reportFailure && result.isErr() ? result : ok$2(void 0);
1586
+ }
1472
1587
  function isAbortableCommand(command) {
1473
1588
  return !!command && typeof command === "object" && "isAbortableCommand" in command && command.isAbortableCommand === true;
1474
1589
  }
@@ -1508,18 +1623,18 @@ function createAbortableDecorator(command, options) {
1508
1623
  }
1509
1624
  if (prop === "fetchParams") {
1510
1625
  const originalFetchParams = Reflect.get(target, prop, receiver);
1511
- const isInternal = Reflect.get(target, "isInternalExecution", receiver) === true;
1626
+ const suppressAbortSignal = Reflect.get(target, "isInternalExecution", receiver) === true;
1512
1627
  if (typeof originalFetchParams === "function") {
1513
1628
  return function(...args) {
1514
1629
  const originalReturnValue = originalFetchParams.apply(this, args);
1515
- if (!isInternal) {
1630
+ if (!suppressAbortSignal) {
1516
1631
  const [url, init = {}] = originalReturnValue;
1517
1632
  return [url, { signal, ...init }];
1518
1633
  }
1519
1634
  return originalReturnValue;
1520
1635
  };
1521
1636
  } else {
1522
- if (!isInternal && originalFetchParams && Array.isArray(originalFetchParams)) {
1637
+ if (!suppressAbortSignal && originalFetchParams && Array.isArray(originalFetchParams)) {
1523
1638
  const [url, init = {}] = originalFetchParams;
1524
1639
  return [url, { signal, ...init }];
1525
1640
  }
@@ -1552,38 +1667,35 @@ const _FetchNetworkCommand = class _FetchNetworkCommand extends NetworkCommand {
1552
1667
  this.services = services;
1553
1668
  this.additionalNullResponses = [];
1554
1669
  }
1555
- /**
1556
- * The command's operation type. Generated command subclasses override this
1557
- * getter with their concrete operation (see the generator's
1558
- * `generateOperationType`); the base returns `undefined` for commands that
1559
- * don't declare one (e.g. hand-written commands). Transport-layer
1560
- * interceptors use it to tell a read (`query`) apart from a write — see
1561
- * `fetch`, which folds it into the context seed and derives
1562
- * `onestore.retrySafe` from it.
1563
- */
1564
1670
  get operationType() {
1565
1671
  return void 0;
1566
1672
  }
1567
- /** Declared `onestore` options (`handleServerError`, `compression`); generated overrides (`generateRequestOptionsGetter`). */
1568
1673
  get requestOptions() {
1569
1674
  return void 0;
1570
1675
  }
1571
1676
  fetch(contextSeed) {
1572
- try {
1573
- const [input, init] = this.fetchParams;
1574
- const operationType = this.operationType;
1575
- const initWithOptions = applyOperationRequestOptions(
1576
- init,
1577
- operationType,
1578
- this.requestOptions
1579
- );
1580
- const seed = operationType === void 0 ? contextSeed : { operationType, ...contextSeed };
1581
- const initWithSeed = seed === void 0 ? initWithOptions : { ...initWithOptions, __contextSeed: seed };
1582
- const fetchCall = initWithSeed === void 0 ? this.services.fetch(input) : this.services.fetch(input, initWithSeed);
1583
- return this.convertFetchResponseToData(fetchCall);
1584
- } catch (reason) {
1585
- return resolvedPromiseLike$2(err$1(toError(reason)));
1586
- }
1677
+ return fetchFromNetwork(
1678
+ () => ({
1679
+ services: this.services,
1680
+ params: this.fetchParams,
1681
+ operationType: this.operationType,
1682
+ requestOptions: this.requestOptions
1683
+ }),
1684
+ {
1685
+ isSemanticNullResponse: (response) => this.isSemanticNullResponse(response),
1686
+ isProtocolNoBodyStatus: (status) => this.isProtocolNoBodyStatus(status),
1687
+ coerceError: (response) => this.coerceError(response),
1688
+ afterRequestHooks: (options) => this.afterRequestHooks(options)
1689
+ },
1690
+ contextSeed
1691
+ );
1692
+ }
1693
+ refresh() {
1694
+ return this.execute().then((newResult) => {
1695
+ if (!isSubscribableResult(newResult)) return ok$2(void 0);
1696
+ const result = newResult.isOk() ? ok$2(newResult.value.data) : err$1(newResult.error.failure);
1697
+ return completeRefresh(result, () => this.subscriptions);
1698
+ });
1587
1699
  }
1588
1700
  isSemanticNullResponse(response) {
1589
1701
  return this.additionalNullResponses.includes(response.status);
@@ -1591,53 +1703,9 @@ const _FetchNetworkCommand = class _FetchNetworkCommand extends NetworkCommand {
1591
1703
  isProtocolNoBodyStatus(status) {
1592
1704
  return status === 204 || status === 205;
1593
1705
  }
1594
- isUndeclaredNoBodyResponse(response) {
1595
- return this.isProtocolNoBodyStatus(response.status) && !this.isSemanticNullResponse(response);
1596
- }
1597
1706
  async coerceError(errorResponse) {
1598
1707
  return toError(errorResponse.statusText);
1599
1708
  }
1600
- convertFetchResponseToData(response) {
1601
- return response.then(
1602
- (response2) => {
1603
- if (response2.ok) {
1604
- let resultPromise;
1605
- if (this.isSemanticNullResponse(response2)) {
1606
- resultPromise = Promise.resolve(ok$2(null));
1607
- } else if (this.isUndeclaredNoBodyResponse(response2)) {
1608
- resultPromise = Promise.resolve(
1609
- err$1(
1610
- toError(
1611
- `Unexpected ${response2.status} response: no-content status was not declared in the API specification. Declare this response in your OAS without a content property.`
1612
- )
1613
- )
1614
- );
1615
- } else {
1616
- resultPromise = response2.json().then(
1617
- (json) => ok$2(json),
1618
- (reason) => err$1(toError(reason))
1619
- );
1620
- }
1621
- return resultPromise.finally(() => {
1622
- try {
1623
- this.afterRequestHooks({ statusCode: response2.status });
1624
- } catch {
1625
- }
1626
- });
1627
- } else {
1628
- return this.coerceError(response2).then((coercedError) => {
1629
- return err$1(coercedError);
1630
- }).finally(() => {
1631
- try {
1632
- this.afterRequestHooks({ statusCode: response2.status });
1633
- } catch {
1634
- }
1635
- });
1636
- }
1637
- },
1638
- (reason) => err$1(toError(reason))
1639
- );
1640
- }
1641
1709
  };
1642
1710
  _FetchNetworkCommand.availableDecorators = {
1643
1711
  abortable: createAbortableDecorator
@@ -2717,7 +2785,7 @@ function buildServiceDescriptor$d(luvio) {
2717
2785
  },
2718
2786
  };
2719
2787
  }
2720
- // version: 1.466.0-b7b08a8e3c
2788
+ // version: 1.468.0-9ef0fbdaee
2721
2789
 
2722
2790
  class AuraGraphQLNormalizedCacheControlCommand extends AuraNormalizedCacheControlCommand {
2723
2791
  constructor(config, documentRootType, services) {
@@ -3056,7 +3124,7 @@ function buildServiceDescriptor$9(notifyRecordUpdateAvailable, getNormalizedLuvi
3056
3124
  },
3057
3125
  };
3058
3126
  }
3059
- // version: 1.466.0-b7b08a8e3c
3127
+ // version: 1.468.0-9ef0fbdaee
3060
3128
 
3061
3129
  class RetryService {
3062
3130
  constructor(defaultRetryPolicy) {
@@ -3295,6 +3363,53 @@ function buildBaseImperativeInvoker(getCommand, transformResult) {
3295
3363
  }
3296
3364
  };
3297
3365
  }
3366
+ function assertSubscribable(result, report) {
3367
+ if (!isSubscribableResult(result)) {
3368
+ report("Non-subscribable result encountered - please use correct operation type");
3369
+ throw new Error("Internal error in Lightning Data Service adapter occurred");
3370
+ }
3371
+ }
3372
+ function toQueryUpdate(result) {
3373
+ return result.isOk() ? { data: result.value, error: void 0 } : { data: void 0, error: unwrapUserlandError(result.error) };
3374
+ }
3375
+ class SubscribableImperativeBindingsService {
3376
+ bind(getCommand, exposeRefresh = false) {
3377
+ return buildBaseImperativeInvoker(
3378
+ getCommand,
3379
+ (result) => this.transformResult(result, exposeRefresh)
3380
+ );
3381
+ }
3382
+ transformResult(result, exposeRefresh = false) {
3383
+ assertSubscribable(result, (message) => console.error(message));
3384
+ if (result.isErr()) throwUnwrappedUserlandError(result.error.failure);
3385
+ deepFreeze(result.value.data);
3386
+ const api = {
3387
+ data: result.value.data,
3388
+ subscribe: (callback) => result.value.subscribe((update) => {
3389
+ const { data, error } = toQueryUpdate(update);
3390
+ return callback({ data, error });
3391
+ })
3392
+ };
3393
+ if (exposeRefresh) {
3394
+ return {
3395
+ ...api,
3396
+ refresh: () => result.value.refresh().then((refreshed) => {
3397
+ if (refreshed.isOk()) return void 0;
3398
+ throw refreshed.error;
3399
+ })
3400
+ };
3401
+ }
3402
+ return api;
3403
+ }
3404
+ }
3405
+ function buildServiceDescriptor$7() {
3406
+ return {
3407
+ type: "subscribableImperativeBindings",
3408
+ version: "1.0",
3409
+ service: new SubscribableImperativeBindingsService()
3410
+ };
3411
+ }
3412
+
3298
3413
  const supportedCachePolicyTypes = ["no-cache", "only-if-cached"];
3299
3414
  function requestContextIsSupportedCachePolicy(requestContext) {
3300
3415
  return typeof requestContext === "object" && requestContext !== null && "cachePolicy" in requestContext && typeof requestContext.cachePolicy === "object" && requestContext.cachePolicy !== null && "type" in requestContext.cachePolicy && typeof requestContext.cachePolicy.type === "string" && supportedCachePolicyTypes.includes(
@@ -3347,7 +3462,7 @@ class DefaultImperativeBindingsService {
3347
3462
  });
3348
3463
  }
3349
3464
  }
3350
- function buildServiceDescriptor$6() {
3465
+ function buildServiceDescriptor$5() {
3351
3466
  return {
3352
3467
  type: "defaultImperativeBindings",
3353
3468
  version: "1.0",
@@ -3367,70 +3482,13 @@ class QueryImperativeBindingsService {
3367
3482
  });
3368
3483
  }
3369
3484
  }
3370
- function buildServiceDescriptor$5() {
3485
+ function buildServiceDescriptor$4() {
3371
3486
  return {
3372
3487
  type: "queryImperativeBindings",
3373
3488
  version: "1.0",
3374
3489
  service: new QueryImperativeBindingsService()
3375
3490
  };
3376
3491
  }
3377
- class SubscribableImperativeBindingsService {
3378
- bind(getCommand, exposeRefresh = false) {
3379
- return buildBaseImperativeInvoker(
3380
- getCommand,
3381
- (result) => this.transformResult(result, exposeRefresh)
3382
- );
3383
- }
3384
- transformResult(result, exposeRefresh = false) {
3385
- if (!isSubscribableResult(result)) {
3386
- console.error(
3387
- "Non-subscribable result encountered - please use correct operation type"
3388
- );
3389
- throw new Error("Internal error in Lightning Data Service adapter occurred");
3390
- }
3391
- if (result.isOk()) {
3392
- deepFreeze(result.value.data);
3393
- const api = {
3394
- data: result.value.data,
3395
- subscribe: (cb) => {
3396
- return result.value.subscribe((result2) => {
3397
- if (result2.isErr()) {
3398
- return cb({
3399
- data: void 0,
3400
- error: unwrapUserlandError(result2.error)
3401
- });
3402
- }
3403
- return cb({ data: result2.value, error: void 0 });
3404
- });
3405
- }
3406
- };
3407
- if (exposeRefresh) {
3408
- return {
3409
- ...api,
3410
- refresh: () => {
3411
- return result.value.refresh().then((res) => {
3412
- if (res.isOk()) {
3413
- return void 0;
3414
- }
3415
- throw res.error;
3416
- });
3417
- }
3418
- };
3419
- } else {
3420
- return api;
3421
- }
3422
- } else {
3423
- throwUnwrappedUserlandError(result.error.failure);
3424
- }
3425
- }
3426
- }
3427
- function buildServiceDescriptor$4() {
3428
- return {
3429
- type: "subscribableImperativeBindings",
3430
- version: "1.0",
3431
- service: new SubscribableImperativeBindingsService()
3432
- };
3433
- }
3434
3492
  class LegacyImperativeBindingsService {
3435
3493
  bind(getCommand) {
3436
3494
  const invoke = async (config, requestContext, callback) => {
@@ -3732,7 +3790,7 @@ class GraphQLMutationBindingsService {
3732
3790
  };
3733
3791
  }
3734
3792
  }
3735
- function buildServiceDescriptor$7() {
3793
+ function buildServiceDescriptor$6() {
3736
3794
  return {
3737
3795
  type: "graphQLMutationBindings",
3738
3796
  version: "1.0",
@@ -8007,7 +8065,7 @@ function getEnvironmentSetting(name) {
8007
8065
  }
8008
8066
  return undefined;
8009
8067
  }
8010
- // version: 1.466.0-ba624febc8
8068
+ // version: 1.468.0-c060a9b9c6
8011
8069
 
8012
8070
  /**
8013
8071
  * Helpers for reaching the Aura framework from the LDS Aura runtime.
@@ -8047,7 +8105,7 @@ function getAuraClientService() {
8047
8105
 
8048
8106
  const auraClientService = getAuraClientService();
8049
8107
  const defaultConfig = {
8050
- maxAllowedParallelXHRCounts: 9,
8108
+ maxAllowedParallelXHRCounts: 1000,
8051
8109
  forceRecordTransactionsDisabled: false,
8052
8110
  };
8053
8111
  const configServiceDescriptor = buildServiceDescriptor({
@@ -8056,19 +8114,13 @@ const configServiceDescriptor = buildServiceDescriptor({
8056
8114
  default: defaultConfig,
8057
8115
  });
8058
8116
  const configService = configServiceDescriptor.service;
8117
+ // The maxAllowedParallelXHRCounts check only detects the Aura LEX client service; the value itself
8118
+ // is no longer used (the PDL in-flight limit is fixed at the default above).
8059
8119
  if (auraClientService?.maxAllowedParallelXHRCounts) {
8060
8120
  configService.set('lex', (config) => {
8061
- config.maxAllowedParallelXHRCounts =
8062
- auraClientService.maxAllowedParallelXHRCounts?.() ??
8063
- defaultConfig.maxAllowedParallelXHRCounts;
8064
8121
  config.forceRecordTransactionsDisabled = getEnvironmentSetting(EnvironmentSettings.ForceRecordTransactionsDisabled);
8065
8122
  });
8066
8123
  }
8067
- if (!applyPredictionRequestLimit.isOpen({ fallback: false })) {
8068
- configService.set('lex', (config) => {
8069
- config.maxAllowedParallelXHRCounts = 1000;
8070
- });
8071
- }
8072
8124
 
8073
8125
  const forceRecordTransactionsDisabled = configService.config.forceRecordTransactionsDisabled;
8074
8126
  //TODO: Some duplication here that can be most likely moved to a util class
@@ -8537,22 +8589,23 @@ const CONTENT_DOCUMENTS_VERSIONS_PATH = '/ui-api/records/content-documents/conte
8537
8589
  */
8538
8590
  // This fork package (lds-runtime-one-runtime) is provisioned only in the LEX on
8539
8591
  // One Runtime (LWR) runtime, which means it always runs as LEX on One Runtime —
8540
- // never classic one.app Aura, never on a site. The single LDS gate
8541
- // `useHttpUiapiOneRuntime` enables both the public and private path lists. The
8542
- // public/private split is preserved as two separate arrays because the PRIVATE
8543
- // paths carry an extra condition: the server-side `auraBasedRequests` UiSdk gate.
8592
+ // never classic one.app Aura, never on a site. Both LEX flavors (one.app and
8593
+ // LEX on One Runtime) share the single LDS gate `lds.usehttpuiapilex`, which
8594
+ // enables both the public and private path lists. The public/private split is
8595
+ // preserved as two separate arrays because the PRIVATE paths carry an extra
8596
+ // condition: the server-side `auraBasedRequests` UiSdk gate.
8544
8597
  // If UiSdk turns that gate off, private (UiTier-restricted) Connect resources can
8545
8598
  // no longer be served over HTTP and must fall back to Aura, whereas
8546
8599
  // public/allowlisted paths are unaffected.
8547
8600
  const PREDICATE_PATH_SETS = [
8548
8601
  // LEX on One Runtime — public UIAPI endpoints
8549
8602
  {
8550
- predicate: () => useHttpUiapiOneRuntime.isOpen({ fallback: false }),
8603
+ predicate: () => useHttpUiapiLex.isOpen({ fallback: false }),
8551
8604
  paths: UIAPI_PUBLIC_PATHS,
8552
8605
  },
8553
8606
  // LEX on One Runtime — private UIAPI endpoints (also require the UiSdk gate)
8554
8607
  {
8555
- predicate: () => useHttpUiapiOneRuntime.isOpen({ fallback: false }) &&
8608
+ predicate: () => useHttpUiapiLex.isOpen({ fallback: false }) &&
8556
8609
  auraBasedRequestsEnabled.isOpen({ fallback: false }),
8557
8610
  paths: UIAPI_PRIVATE_PATHS,
8558
8611
  },
@@ -9189,17 +9242,17 @@ class LuvioAdapterRequestStrategy extends LexRequestStrategy {
9189
9242
  super();
9190
9243
  this.luvio = luvio;
9191
9244
  }
9192
- execute(config, options = {}) {
9193
- return this.adapterFactory(this.luvio)(config, this.createAdapterContext(options));
9245
+ execute(config) {
9246
+ return this.adapterFactory(this.luvio)(config, this.createAdapterContext());
9194
9247
  }
9195
- createAdapterContext(options) {
9248
+ createAdapterContext() {
9196
9249
  return {
9197
9250
  ...DEFAULT_RESOURCE_CONTEXT,
9198
9251
  sourceContext: {
9199
9252
  ...DEFAULT_RESOURCE_CONTEXT.sourceContext,
9200
9253
  actionConfig: {
9201
9254
  ...DEFAULT_RESOURCE_CONTEXT.sourceContext.actionConfig,
9202
- hotspot: !options.disableHotspot,
9255
+ hotspot: true,
9203
9256
  },
9204
9257
  },
9205
9258
  };
@@ -10101,7 +10154,7 @@ class GetApexRequestStrategy extends LuvioAdapterRequestStrategy {
10101
10154
  buildConcreteRequest(similarRequest) {
10102
10155
  return similarRequest;
10103
10156
  }
10104
- createAdapterContext(_options) {
10157
+ createAdapterContext() {
10105
10158
  return APEX_RESOURCE_CONTEXT;
10106
10159
  }
10107
10160
  getRequestPriority(_request, _context) {
@@ -10701,27 +10754,6 @@ async function runRequestsWithLimit(requests, runner, concurrentRequestsLimit, p
10701
10754
  // Wait for all initial requests to complete
10702
10755
  await Promise.all(promises);
10703
10756
  }
10704
- /**
10705
- * Runs entire list of LEX requests, applying hotspot up to the specified limit and disabling for all remaining
10706
- *
10707
- * @param {RequestEntry<LexRequest>[]} requests - An array of request entries to be processed in the array order.
10708
- * @param {RequestRunner<LexRequest, LexRequestOptions>} runner - The runner instance responsible for executing the requests.
10709
- * @param {number} hotspotLimit - The number of hotspot requests allowed.
10710
- * @returns {Promise<void>} A promise that resolves when all requests have been processed.
10711
- *
10712
- * This function processes a queue of pending requests, enabling hotspot for the first N requests,
10713
- * as specified by the hotspotLimit argument. The remaining requests have hotspot disabled.
10714
- */
10715
- async function runRequestsWithHotspotLimit(requests, runner, hotspotLimit) {
10716
- const promises = requests.map((request, index) => {
10717
- // determine if hotspot needs to be disabled or not
10718
- const disableHotspot = index >= hotspotLimit;
10719
- // run request with hotspot setting
10720
- return runner.runRequest(request.request, { disableHotspot });
10721
- });
10722
- // promise for all requests
10723
- await Promise.all(promises);
10724
- }
10725
10757
  /**
10726
10758
  * Compares two request entries based on their priority and, if the priorities are the same, their request times.
10727
10759
  * This function is typically used for sorting requests where priority takes precedence, and timing is used
@@ -10755,16 +10787,6 @@ function compareByPriorityThenTime({ request: requestA, requestMetadata: request
10755
10787
  return bPriority - aPriority;
10756
10788
  }
10757
10789
  }
10758
- /**
10759
- * Returns the value of the gate that controls whether to use the hotspot limit. Value is cached after the initial call
10760
- *
10761
- * @returns {boolean} true if the gate is open, false otherwise.
10762
- */
10763
- let useHotspotLimitOpen;
10764
- function isUseHotspotLimitOpen() {
10765
- useHotspotLimitOpen = useHotspotLimitOpen ?? useHotspotLimit.isOpen({ fallback: false });
10766
- return useHotspotLimitOpen;
10767
- }
10768
10790
 
10769
10791
  function isBoxcarableRequest({ request: { adapterName } }, requestStrategyManager) {
10770
10792
  const strategy = requestStrategyManager.get(adapterName);
@@ -10841,19 +10863,14 @@ class LexPredictivePrefetcher extends ApplicationPredictivePrefetcher {
10841
10863
  async predict() {
10842
10864
  const requests = this.getPredictedRequestsOrderedByPriority();
10843
10865
  this.totalRequestCount = requests.length;
10844
- if (isUseHotspotLimitOpen()) {
10845
- await runRequestsWithHotspotLimit(requests, this.requestRunner, Math.floor(this.options.inflightRequestLimit / 2));
10846
- }
10847
- else {
10848
- await runRequestsWithLimit(requests, this.requestRunner,
10849
- // don't get available thread count below threshold else Aura will boxcar
10850
- this.options.inflightRequestLimit - AURA_BOXCAR_THREADS_THRESHOLD,
10851
- // `this.repository.pageStartTime` would be the correct here,
10852
- // but when doing predict+watch, it could be (set in watch)
10853
- // repository.startTime is not set yet, Date.now() is a better alternative,
10854
- // that is correct, and works on both cases.
10855
- Date.now());
10856
- }
10866
+ await runRequestsWithLimit(requests, this.requestRunner,
10867
+ // don't get available thread count below threshold else Aura will boxcar
10868
+ this.options.inflightRequestLimit - AURA_BOXCAR_THREADS_THRESHOLD,
10869
+ // `this.repository.pageStartTime` would be the correct here,
10870
+ // but when doing predict+watch, it could be (set in watch)
10871
+ // repository.startTime is not set yet, Date.now() is a better alternative,
10872
+ // that is correct, and works on both cases.
10873
+ Date.now());
10857
10874
  }
10858
10875
  }
10859
10876
 
@@ -10868,10 +10885,10 @@ class LexRequestRunner {
10868
10885
  .map((strategy) => strategy.reduce(requests))
10869
10886
  .flat();
10870
10887
  }
10871
- runRequest(request, options = {}) {
10888
+ runRequest(request) {
10872
10889
  const strategy = this.requestStrategyManager.get(request.adapterName);
10873
10890
  if (strategy) {
10874
- return Promise.resolve(strategy.execute(request.config, options)).then();
10891
+ return Promise.resolve(strategy.execute(request.config)).then();
10875
10892
  }
10876
10893
  return Promise.resolve(undefined);
10877
10894
  }
@@ -11564,9 +11581,7 @@ function initializeLDS() {
11564
11581
  setupQueryEvaluators(luvio, store);
11565
11582
  setDefaultLuvio({ luvio });
11566
11583
  setTrackedFieldsConfig();
11567
- if (usePredictiveLoading.isOpen({ fallback: false })) {
11568
- setupPredictivePrefetcher(luvio);
11569
- }
11584
+ setupPredictivePrefetcher(luvio);
11570
11585
  return luvio; // Return the luvio instance so that we can inject it for OneStore
11571
11586
  }
11572
11587
  // Initializes OneStore in LEX
@@ -11654,13 +11669,13 @@ function initializeOneStore(luvio) {
11654
11669
  buildServiceDescriptor$b(),
11655
11670
  featureFlagsServiceDescriptor,
11656
11671
  retryServiceDescriptor,
11657
- buildServiceDescriptor$6(),
11658
11672
  buildServiceDescriptor$5(),
11659
11673
  buildServiceDescriptor$4(),
11674
+ buildServiceDescriptor$7(),
11660
11675
  buildServiceDescriptor$3$1(),
11661
11676
  buildServiceDescriptor$2$1(),
11662
11677
  buildServiceDescriptor$1$2(),
11663
- buildServiceDescriptor$7(),
11678
+ buildServiceDescriptor$6(),
11664
11679
  buildLWCWireBindingsServiceDescriptor(),
11665
11680
  buildLWCGraphQLWireBindingsServiceDescriptor(),
11666
11681
  configServiceDescriptor,
@@ -11685,4 +11700,4 @@ function ldsEngineCreator() {
11685
11700
  }
11686
11701
 
11687
11702
  export { LexRequestStrategy, PDL_ENGINE_REGISTRATION_ID, PdlPrefetcherEventType, PdlRequestPriority, buildPredictorForContext, configService, ldsEngineCreator as default, initializeLDS, initializeOneStore, notifyUpdateAvailableFactory, registerRequestStrategy, saveRequestAsPrediction, subscribeToPrefetcherEvents, unregisterRequestStrategy, whenPredictionsReady };
11688
- // version: 1.466.0-b7b08a8e3c
11703
+ // version: 1.468.0-9ef0fbdaee
@@ -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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-one-runtime",
3
- "version": "1.466.0",
3
+ "version": "1.468.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS engine for the LEX on One Runtime (LWR) runtime.",
6
6
  "main": "dist/oneRuntimeLdsEngineCreator.js",
@@ -34,54 +34,54 @@
34
34
  "release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-one-runtime"
35
35
  },
36
36
  "devDependencies": {
37
- "@conduit-client/service-provisioner": "3.33.0",
38
- "@conduit-client/tools-core": "3.33.0",
39
- "@salesforce/lds-adapters-apex": "^1.466.0",
40
- "@salesforce/lds-adapters-uiapi": "^1.466.0",
41
- "@salesforce/lds-ads-bridge": "^1.466.0",
42
- "@salesforce/lds-aura-storage": "^1.466.0",
43
- "@salesforce/lds-bindings": "^1.466.0",
44
- "@salesforce/lds-instrumentation": "^1.466.0",
45
- "@salesforce/lds-network-adapter": "^1.466.0",
46
- "@salesforce/lds-network-aura": "^1.466.0",
47
- "@salesforce/lds-network-fetch": "^1.466.0",
48
- "@salesforce/lds-runtime-shared": "^1.466.0",
37
+ "@conduit-client/service-provisioner": "3.35.0",
38
+ "@conduit-client/tools-core": "3.35.0",
39
+ "@salesforce/lds-adapters-apex": "^1.468.0",
40
+ "@salesforce/lds-adapters-uiapi": "^1.468.0",
41
+ "@salesforce/lds-ads-bridge": "^1.468.0",
42
+ "@salesforce/lds-aura-storage": "^1.468.0",
43
+ "@salesforce/lds-bindings": "^1.468.0",
44
+ "@salesforce/lds-instrumentation": "^1.468.0",
45
+ "@salesforce/lds-network-adapter": "^1.468.0",
46
+ "@salesforce/lds-network-aura": "^1.468.0",
47
+ "@salesforce/lds-network-fetch": "^1.468.0",
48
+ "@salesforce/lds-runtime-shared": "^1.468.0",
49
49
  "jwt-encode": "1.0.1"
50
50
  },
51
51
  "dependencies": {
52
- "@conduit-client/command-aura-graphql-normalized-cache-control": "3.33.0",
53
- "@conduit-client/command-aura-network": "3.33.0",
54
- "@conduit-client/command-aura-normalized-cache-control": "3.33.0",
55
- "@conduit-client/command-fetch-network": "3.33.0",
56
- "@conduit-client/command-http-graphql-normalized-cache-control": "3.33.0",
57
- "@conduit-client/command-http-normalized-cache-control": "3.33.0",
58
- "@conduit-client/command-ndjson": "3.33.0",
59
- "@conduit-client/command-network": "3.33.0",
60
- "@conduit-client/command-sse": "3.33.0",
61
- "@conduit-client/command-streaming": "3.33.0",
62
- "@conduit-client/jwt-manager": "3.33.0",
63
- "@conduit-client/service-aura-network": "3.33.0",
64
- "@conduit-client/service-bindings-imperative": "3.33.0",
65
- "@conduit-client/service-bindings-lwc": "3.33.0",
66
- "@conduit-client/service-cache": "3.33.0",
67
- "@conduit-client/service-cache-control": "3.33.0",
68
- "@conduit-client/service-cache-inclusion-policy": "3.33.0",
69
- "@conduit-client/service-config": "3.33.0",
70
- "@conduit-client/service-feature-flags": "3.33.0",
71
- "@conduit-client/service-fetch-network": "3.33.0",
72
- "@conduit-client/service-instrument-command": "3.33.0",
73
- "@conduit-client/service-pubsub": "3.33.0",
74
- "@conduit-client/service-renewable-resource-manager": "3.33.0",
75
- "@conduit-client/service-store": "3.33.0",
76
- "@conduit-client/utils": "3.33.0",
52
+ "@conduit-client/command-aura-graphql-normalized-cache-control": "3.35.0",
53
+ "@conduit-client/command-aura-network": "3.35.0",
54
+ "@conduit-client/command-aura-normalized-cache-control": "3.35.0",
55
+ "@conduit-client/command-fetch-network": "3.35.0",
56
+ "@conduit-client/command-http-graphql-normalized-cache-control": "3.35.0",
57
+ "@conduit-client/command-http-normalized-cache-control": "3.35.0",
58
+ "@conduit-client/command-ndjson": "3.35.0",
59
+ "@conduit-client/command-network": "3.35.0",
60
+ "@conduit-client/command-sse": "3.35.0",
61
+ "@conduit-client/command-streaming": "3.35.0",
62
+ "@conduit-client/jwt-manager": "3.35.0",
63
+ "@conduit-client/service-aura-network": "3.35.0",
64
+ "@conduit-client/service-bindings-imperative": "3.35.0",
65
+ "@conduit-client/service-bindings-lwc": "3.35.0",
66
+ "@conduit-client/service-cache": "3.35.0",
67
+ "@conduit-client/service-cache-control": "3.35.0",
68
+ "@conduit-client/service-cache-inclusion-policy": "3.35.0",
69
+ "@conduit-client/service-config": "3.35.0",
70
+ "@conduit-client/service-feature-flags": "3.35.0",
71
+ "@conduit-client/service-fetch-network": "3.35.0",
72
+ "@conduit-client/service-instrument-command": "3.35.0",
73
+ "@conduit-client/service-pubsub": "3.35.0",
74
+ "@conduit-client/service-renewable-resource-manager": "3.35.0",
75
+ "@conduit-client/service-store": "3.35.0",
76
+ "@conduit-client/utils": "3.35.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.466.0",
80
+ "@salesforce/lds-adapters-onestore-graphql": "^1.468.0",
81
81
  "@salesforce/lds-adapters-uiapi-lex": "^1.415.0",
82
- "@salesforce/lds-durable-storage": "^1.466.0",
83
- "@salesforce/lds-luvio-service": "^1.466.0",
84
- "@salesforce/lds-luvio-uiapi-records-service": "^1.466.0"
82
+ "@salesforce/lds-durable-storage": "^1.468.0",
83
+ "@salesforce/lds-luvio-service": "^1.468.0",
84
+ "@salesforce/lds-luvio-uiapi-records-service": "^1.468.0"
85
85
  },
86
86
  "luvioBundlesize": [
87
87
  {