@salesforce/lds-runtime-aura 1.412.1 → 1.414.1

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.
@@ -18,7 +18,6 @@ import usePredictiveLoading from '@salesforce/gate/lds.usePredictiveLoading';
18
18
  import useApexPredictions from '@salesforce/gate/lds.pdl.useApexPredictions';
19
19
  import useRelatedListsPredictions from '@salesforce/gate/lds.pdl.useRelatedListsPredictions';
20
20
  import useRelatedListPlus from '@salesforce/gate/lds.pdl.useRelatedListPlus';
21
- import applyPredictionRequestLimit from '@salesforce/gate/lds.pdl.applyRequestLimit';
22
21
  import useLocalStorage from '@salesforce/gate/lds.pdl.useLocalStorage';
23
22
  import useOneStoreGraphql from '@salesforce/gate/lds.oneStoreGraphqlEnabled.ltng';
24
23
  import canCombineRecordLayoutRequests from '@salesforce/gate/lds.pdl.canCombineRecordLayoutRequests';
@@ -26,19 +25,20 @@ import { GetApexWireAdapterFactory, registerPrefetcher as registerPrefetcher$1 }
26
25
  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
26
  import { getInstrumentation } from 'o11y/client';
28
27
  import { findExecutableOperation, buildGraphQLInputExtension, addTypenameToDocument } from 'force/luvioGraphqlNormalization';
29
- import { print, wrapConfigAndVerify, resolveAst, validateGraphQLOperations } from 'force/luvioOnestoreGraphqlParser';
28
+ import { print, resolveAndValidateGraphQLConfig } from 'force/luvioOnestoreGraphqlParser';
30
29
  import { setServices } from 'force/luvioServiceProvisioner1';
31
30
  import { assertIsValid, MissingRequiredPropertyError, JsonSchemaViolationError } from 'force/luvioJsonschemaValidate5';
32
31
  import { dispatchGlobalEvent, unstable_loadComponentDefs, executeGlobalControllerRawResponse } from 'aura';
33
32
  import auraNetworkAdapter, { dispatchAuraAction, defaultActionConfig, instrument as instrument$1, forceRecordTransactionsDisabled as forceRecordTransactionsDisabled$1, ldsNetworkAdapterInstrument, CrudEventState, CrudEventType, UIAPI_RECORDS_PATH, UIAPI_RELATED_LIST_RECORDS_BATCH_PATH, UIAPI_RELATED_LIST_RECORDS_PATH } from 'force/ldsNetwork';
34
33
  import { ThirdPartyTracker } from 'instrumentation:thirdPartyTracker';
35
34
  import { markStart, markEnd, counter, registerCacheStats, perfStart, perfEnd, registerPeriodicLogger, interaction, timer } from 'instrumentation/service';
36
- import { instrument as instrument$2, setupLexNetworkAdapter, internalRequestTracker, generateRequestId as generateRequestId$1 } from 'force/ldsNetworkFetch';
35
+ import { instrument as instrument$2, setupLexNetworkAdapter } from 'force/ldsNetworkFetch';
37
36
  import { REFRESH_ADAPTER_EVENT, ADAPTER_UNFULFILLED_ERROR, instrument as instrument$3 } from 'force/ldsBindings';
38
- import { LRUCache, instrumentAdapter, instrumentLuvio, setupInstrumentation as setupInstrumentation$1, logObjectInfoChanged as logObjectInfoChanged$1, updatePercentileHistogramMetric, incrementCounterMetric, incrementGetRecordNotifyChangeAllowCount, incrementGetRecordNotifyChangeDropCount, incrementNotifyRecordUpdateAvailableAllowCount, incrementNotifyRecordUpdateAvailableDropCount, setLdsAdaptersUiapiInstrumentation, logError as logError$2, setLdsNetworkAdapterInstrumentation, incrementStateCreatedCount, executeAsyncActivity, METRIC_KEYS, onIdleDetected } from 'force/ldsInstrumentation';
37
+ import { LRUCache, instrumentAdapter, instrumentLuvio, logMessage as logMessage$1, setupInstrumentation as setupInstrumentation$1, logObjectInfoChanged as logObjectInfoChanged$1, updatePercentileHistogramMetric, incrementCounterMetric, incrementGetRecordNotifyChangeAllowCount, incrementGetRecordNotifyChangeDropCount, incrementNotifyRecordUpdateAvailableAllowCount, incrementNotifyRecordUpdateAvailableDropCount, setLdsAdaptersUiapiInstrumentation, logError as logError$2, setLdsNetworkAdapterInstrumentation, incrementStateCreatedCount, executeAsyncActivity, METRIC_KEYS, onIdleDetected } from 'force/ldsInstrumentation';
39
38
  import { instrument as instrument$4 } from 'force/adsBridge';
40
39
  import { instrument as instrument$5 } from '@lwc/state';
41
40
  import { withRegistration, register, setDefaultLuvio } from 'force/ldsEngine';
41
+ import applyPredictionRequestLimit from '@salesforce/gate/lds.pdl.applyRequestLimit';
42
42
  import { pageScopedCache } from 'instrumentation/utility';
43
43
  import { createStorage, clearStorages } from 'force/ldsStorage';
44
44
  import lightningConnectEnabled from '@salesforce/gate/ui.services.LightningConnect.enabled';
@@ -411,7 +411,10 @@ class AuraNetworkCommand extends NetworkCommand$1 {
411
411
  coerceAuraErrors(auraErrors) {
412
412
  return toError(auraErrors[0]);
413
413
  }
414
- async coerceFetchErrors(errorResponse) {
414
+ /**
415
+ * Customize how non-2xx fetch fallback responses are converted into errors.
416
+ */
417
+ async coerceError(errorResponse) {
415
418
  return toError(errorResponse.statusText);
416
419
  }
417
420
  convertAuraResponseToData(responsePromise, coerceError) {
@@ -449,7 +452,7 @@ class AuraNetworkCommand extends NetworkCommand$1 {
449
452
  }
450
453
  });
451
454
  } else {
452
- return this.coerceFetchErrors(response2).then((coercedError) => {
455
+ return this.coerceError(response2).then((coercedError) => {
453
456
  return err$1(coercedError);
454
457
  }).finally(() => {
455
458
  try {
@@ -1090,7 +1093,7 @@ let AuraCacheControlCommand$1 = class AuraCacheControlCommand extends CacheContr
1090
1093
  coerceAuraErrors(auraErrors) {
1091
1094
  return toError(auraErrors[0]);
1092
1095
  }
1093
- async coerceFetchError(errorResponse) {
1096
+ async coerceError(errorResponse) {
1094
1097
  return toError(errorResponse.statusText);
1095
1098
  }
1096
1099
  processAuraReturnValue(auraReturnValue) {
@@ -1136,7 +1139,7 @@ let AuraCacheControlCommand$1 = class AuraCacheControlCommand extends CacheContr
1136
1139
  }
1137
1140
  });
1138
1141
  } else {
1139
- return this.coerceFetchError(response2).then((coercedError) => {
1142
+ return this.coerceError(response2).then((coercedError) => {
1140
1143
  return err$1(coercedError);
1141
1144
  }).finally(() => {
1142
1145
  try {
@@ -1238,7 +1241,7 @@ class AuraCacheControlCommand extends CacheControlCommand {
1238
1241
  coerceAuraErrors(auraErrors) {
1239
1242
  return toError(auraErrors[0]);
1240
1243
  }
1241
- async coerceFetchError(errorResponse) {
1244
+ async coerceError(errorResponse) {
1242
1245
  return toError(errorResponse.statusText);
1243
1246
  }
1244
1247
  processAuraReturnValue(auraReturnValue) {
@@ -1284,7 +1287,7 @@ class AuraCacheControlCommand extends CacheControlCommand {
1284
1287
  }
1285
1288
  });
1286
1289
  } else {
1287
- return this.coerceFetchError(response2).then((coercedError) => {
1290
+ return this.coerceError(response2).then((coercedError) => {
1288
1291
  return err$1(coercedError);
1289
1292
  }).finally(() => {
1290
1293
  try {
@@ -2702,7 +2705,7 @@ function buildServiceDescriptor$d(luvio) {
2702
2705
  },
2703
2706
  };
2704
2707
  }
2705
- // version: 1.412.1-944b7de7af
2708
+ // version: 1.414.1-06354ce124
2706
2709
 
2707
2710
  /*!
2708
2711
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -3055,7 +3058,7 @@ function buildServiceDescriptor$9(notifyRecordUpdateAvailable, getNormalizedLuvi
3055
3058
  },
3056
3059
  };
3057
3060
  }
3058
- // version: 1.412.1-944b7de7af
3061
+ // version: 1.414.1-06354ce124
3059
3062
 
3060
3063
  /*!
3061
3064
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -3437,7 +3440,7 @@ class LegacyImperativeBindingsService {
3437
3440
  return { invoke, subscribe };
3438
3441
  }
3439
3442
  }
3440
- function buildServiceDescriptor$3() {
3443
+ function buildServiceDescriptor$3$1() {
3441
3444
  return {
3442
3445
  type: "legacyImperativeBindings",
3443
3446
  version: "1.0",
@@ -3449,7 +3452,16 @@ class GraphQLImperativeBindingsService {
3449
3452
  return async (...params) => {
3450
3453
  try {
3451
3454
  if (params.length) {
3452
- params[0] = wrapConfigAndVerify(params[0]);
3455
+ const options = {
3456
+ acceptedOperations: ["query"]
3457
+ };
3458
+ const result = resolveAndValidateGraphQLConfig(params[0], options);
3459
+ if (result == null ? void 0 : result.isErr()) {
3460
+ return result.error;
3461
+ }
3462
+ if (result == null ? void 0 : result.isOk()) {
3463
+ params[0] = result.value;
3464
+ }
3453
3465
  }
3454
3466
  return await buildBaseImperativeInvoker(getCommand, (result) => this.transformResult(result, exposeRefresh))(...params);
3455
3467
  } catch (error) {
@@ -3540,7 +3552,19 @@ function buildServiceDescriptor$2$1() {
3540
3552
  class GraphQLLegacyImperativeBindingsService {
3541
3553
  bind(getCommand) {
3542
3554
  const invoke = async (config, requestContext, callback) => {
3543
- config = wrapConfigAndVerify(config);
3555
+ if (config) {
3556
+ const options = {
3557
+ acceptedOperations: ["query"]
3558
+ };
3559
+ const result = resolveAndValidateGraphQLConfig(config, options);
3560
+ if (result == null ? void 0 : result.isErr()) {
3561
+ callback(result.error);
3562
+ return;
3563
+ }
3564
+ if (result == null ? void 0 : result.isOk()) {
3565
+ config = result.value;
3566
+ }
3567
+ }
3544
3568
  const command = getCommand({ config, assertIsValid });
3545
3569
  try {
3546
3570
  const overrides = getOverridesForLegacyRequestContext(requestContext);
@@ -3569,7 +3593,20 @@ class GraphQLLegacyImperativeBindingsService {
3569
3593
  }
3570
3594
  };
3571
3595
  const subscribe = (config, requestContext, callback) => {
3572
- config = wrapConfigAndVerify(config);
3596
+ if (config) {
3597
+ const options = {
3598
+ acceptedOperations: ["query"]
3599
+ };
3600
+ const result = resolveAndValidateGraphQLConfig(config, options);
3601
+ if (result == null ? void 0 : result.isErr()) {
3602
+ callback(result.error);
3603
+ return () => {
3604
+ };
3605
+ }
3606
+ if (result == null ? void 0 : result.isOk()) {
3607
+ config = result.value;
3608
+ }
3609
+ }
3573
3610
  const command = getCommand({ config, assertIsValid });
3574
3611
  let unsubscribe = () => {
3575
3612
  };
@@ -3618,9 +3655,19 @@ class GraphQLMutationBindingsService {
3618
3655
  return async (...params) => {
3619
3656
  try {
3620
3657
  if (params.length) {
3621
- params[0] = wrapConfigAndVerify(params[0], {
3658
+ const options = {
3622
3659
  acceptedOperations: ["mutation"]
3623
- });
3660
+ };
3661
+ const result2 = resolveAndValidateGraphQLConfig(params[0], options);
3662
+ if (result2 == null ? void 0 : result2.isErr()) {
3663
+ return {
3664
+ data: void 0,
3665
+ errors: result2.error.errors
3666
+ };
3667
+ }
3668
+ if (result2 == null ? void 0 : result2.isOk()) {
3669
+ params[0] = result2.value;
3670
+ }
3624
3671
  }
3625
3672
  const command = getCommand({ params, assertIsValid });
3626
3673
  const result = await command.execute({ cacheControlConfig: { type: "no-cache" } });
@@ -3950,16 +3997,25 @@ class GraphQLCommandWireAdapterConstructor extends CommandWireAdapterConstructor
3950
3997
  }
3951
3998
  update(config, _context) {
3952
3999
  this.unsubscribe();
3953
- const resolvedQuery = resolveAst(config.query);
3954
- if (resolvedQuery) {
3955
- validateGraphQLOperations(
3956
- { query: resolvedQuery, operationName: config == null ? void 0 : config.operationName },
3957
- { acceptedOperations: ["query"] }
3958
- );
4000
+ const options = {
4001
+ acceptedOperations: ["query"]
4002
+ };
4003
+ const result = resolveAndValidateGraphQLConfig(config, options);
4004
+ if (!result) {
4005
+ return;
3959
4006
  }
4007
+ if (result.isErr()) {
4008
+ const error = result.error;
4009
+ this.callback({
4010
+ data: void 0,
4011
+ errors: error.errors
4012
+ });
4013
+ return;
4014
+ }
4015
+ const { query, ...rest } = result.value;
3960
4016
  this.config = {
3961
- ...sanitize(config),
3962
- query: resolvedQuery
4017
+ query,
4018
+ ...sanitize(rest)
3963
4019
  };
3964
4020
  this.invokeAdapter();
3965
4021
  }
@@ -3978,7 +4034,7 @@ class LWCGraphQLWireBindingsService {
3978
4034
  };
3979
4035
  }
3980
4036
  }
3981
- function buildServiceDescriptor$2() {
4037
+ function buildServiceDescriptor$3() {
3982
4038
  return {
3983
4039
  type: "lwcGraphQLWireBindings",
3984
4040
  version: "1.0",
@@ -4011,7 +4067,7 @@ function buildLWCWireBindingsServiceDescriptor() {
4011
4067
  };
4012
4068
  }
4013
4069
  function buildLWCGraphQLWireBindingsServiceDescriptor() {
4014
- const base = buildServiceDescriptor$2();
4070
+ const base = buildServiceDescriptor$3();
4015
4071
  const originalBind = base.service.bind.bind(base.service);
4016
4072
  const bind = (...args) => {
4017
4073
  const ctor = originalBind(...args);
@@ -4321,7 +4377,7 @@ class JwtManager {
4321
4377
  * All rights reserved.
4322
4378
  * For full license text, see the LICENSE.txt file
4323
4379
  */
4324
- function buildServiceDescriptor$1(interceptors = {
4380
+ function buildServiceDescriptor$2(interceptors = {
4325
4381
  request: [],
4326
4382
  retry: void 0,
4327
4383
  response: [],
@@ -4714,7 +4770,7 @@ const sfapNetworkAdapter = async (resourceRequest, resourceRequestContext) => {
4714
4770
  authenticatedRequest = modifySfapResourceRequest(authenticatedRequest, jwtToken);
4715
4771
  // --- instrumentation block --- start
4716
4772
  const uniqueRequestTaskIdentifier = 'sfap-' + sfapRequestCount++;
4717
- const uniqueRequestGuid = generateRequestId();
4773
+ const uniqueRequestGuid = generateRequestId$1();
4718
4774
  // request id header allows logging the request id and searching for the request logs
4719
4775
  authenticatedRequest.headers[X_REQUEST_ID_HEADER] = uniqueRequestGuid;
4720
4776
  let fetchComplete = false;
@@ -4753,7 +4809,7 @@ const composedNetworkAdapter$1 = {
4753
4809
  },
4754
4810
  adapter: sfapNetworkAdapter,
4755
4811
  };
4756
- function generateRequestId() {
4812
+ function generateRequestId$1() {
4757
4813
  if (typeof crypto !== 'undefined' && crypto.randomUUID) {
4758
4814
  // as nov. 2025 caniuse says this has 93.5% support (all modern browsers)
4759
4815
  return crypto.randomUUID();
@@ -4767,46 +4823,6 @@ function generateRequestId() {
4767
4823
 
4768
4824
  function e(e){this.message=e;}e.prototype=new Error,e.prototype.name="InvalidCharacterError";"undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(r){var t=String(r).replace(/=+$/,"");if(t.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,a=0,i=0,c="";o=t.charAt(i++);~o&&(n=a%4?64*n+o:o,a++%4)?c+=String.fromCharCode(255&n>>(-2*a&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return c};function n(e){this.message=e;}n.prototype=new Error,n.prototype.name="InvalidTokenError";
4769
4825
 
4770
- /**
4771
- * Copyright (c) 2022, Salesforce, Inc.,
4772
- * All rights reserved.
4773
- * For full license text, see the LICENSE.txt file
4774
- */
4775
-
4776
- /*
4777
- * ATTENTION!
4778
- * THIS IS A GENERATED FILE FROM https://github.com/salesforce-experience-platform-emu/lds-lightning-platform
4779
- * If you would like to contribute to LDS, please follow the steps outlined in the git repo.
4780
- * Any changes made to this file in p4 will be automatically overwritten.
4781
- * *******************************************************************************************
4782
- */
4783
- /* proxy-compat-disable */
4784
- var EnvironmentSettings;
4785
- (function (EnvironmentSettings) {
4786
- EnvironmentSettings["ForceRecordTransactionsDisabled"] = "forceRecordTransactionsDisabled";
4787
- })(EnvironmentSettings || (EnvironmentSettings = {}));
4788
- const GATE_FORCE_RECORD_TRANSACTIONS_DISABLED = '$Browser.S1Features.forceRecordTransactionsDisabled';
4789
- const supportedEnvironmentSettings = {
4790
- [EnvironmentSettings.ForceRecordTransactionsDisabled]: GATE_FORCE_RECORD_TRANSACTIONS_DISABLED,
4791
- };
4792
- /**
4793
- * Returns aura configuration settings. Used to check gate/perm statuses.
4794
- * @param name Name of the setting to check.
4795
- * @returns Value of the setting, or undefined if $A is not available.
4796
- */
4797
- function getEnvironmentSetting(name) {
4798
- if (typeof window === 'undefined') {
4799
- // server environment i.e. SSR in LWR
4800
- return undefined;
4801
- }
4802
- const environmentSetting = supportedEnvironmentSettings[name];
4803
- if (typeof window.$A !== 'undefined' && environmentSetting !== undefined) {
4804
- return window.$A.get(environmentSetting);
4805
- }
4806
- return undefined;
4807
- }
4808
- // version: 1.412.1-944b7de7af
4809
-
4810
4826
  /**
4811
4827
  * Observability / Critical Availability Program (230+)
4812
4828
  *
@@ -5288,6 +5304,9 @@ function incrementRequestResponseCount(cb) {
5288
5304
  function logObjectInfoChanged() {
5289
5305
  logObjectInfoChanged$1();
5290
5306
  }
5307
+ function logMessage(message) {
5308
+ logMessage$1(message);
5309
+ }
5291
5310
  /**
5292
5311
  * Create a new instrumentation cache stats and return it.
5293
5312
  *
@@ -5395,7 +5414,205 @@ function logCRUDLightningInteraction(eventSource, attributes) {
5395
5414
  }
5396
5415
  const instrumentation = new Instrumentation();
5397
5416
 
5398
- const forceRecordTransactionsDisabled = getEnvironmentSetting(EnvironmentSettings.ForceRecordTransactionsDisabled);
5417
+ /*!
5418
+ * Copyright (c) 2022, Salesforce, Inc.,
5419
+ * All rights reserved.
5420
+ * For full license text, see the LICENSE.txt file
5421
+ */
5422
+ function valueFor(value, path) {
5423
+ if (path.length === 0 || path[0] === "") {
5424
+ return value;
5425
+ } else if (value === null || typeof value !== "object") {
5426
+ return void 0;
5427
+ } else if (Array.isArray(value)) {
5428
+ const index = parseInt(path[0]);
5429
+ if (index >= 0) {
5430
+ return valueFor(value[index], path.slice(1));
5431
+ }
5432
+ return void 0;
5433
+ } else {
5434
+ return valueFor(value[path[0]], path.slice(1));
5435
+ }
5436
+ }
5437
+ class PrioritizedConfigService {
5438
+ constructor(initialConfigDatas) {
5439
+ this.validators = [];
5440
+ this.validated = false;
5441
+ this.readonlyObjectProxies = /* @__PURE__ */ new Map();
5442
+ this.unsafeConfig = this.buildReadonlyObjectProxy([]);
5443
+ this.prioritizedConfigData = {};
5444
+ for (const [p, initialConfigData] of Object.entries(initialConfigDatas)) {
5445
+ this.prioritizedConfigData[p] = initialConfigData || {};
5446
+ }
5447
+ }
5448
+ // ConfigService.addValidator
5449
+ addValidator(validator) {
5450
+ this.validators.push(validator);
5451
+ this.validated = false;
5452
+ }
5453
+ // ConfigService.validate
5454
+ validate() {
5455
+ const errors = [];
5456
+ this.validators.forEach((v) => {
5457
+ const result = v(this.unsafeConfig);
5458
+ if (result.isErr()) {
5459
+ errors.push(...result.error);
5460
+ }
5461
+ });
5462
+ this.validated = errors.length === 0;
5463
+ return errors.length === 0 ? ok$2(void 0) : err$1(errors);
5464
+ }
5465
+ // constructs a proxy for the given non-leaf object path in the config tree
5466
+ buildReadonlyObjectProxy(path) {
5467
+ const key = path.join("\0");
5468
+ let proxy = this.readonlyObjectProxies.get(key);
5469
+ if (proxy) {
5470
+ return proxy;
5471
+ }
5472
+ proxy = new Proxy(/* @__PURE__ */ Object.create(null), {
5473
+ defineProperty: () => {
5474
+ throw new Error("cannot (re)define properties on config");
5475
+ },
5476
+ deleteProperty: () => {
5477
+ throw new Error("cannot delete properties on config");
5478
+ },
5479
+ get: (_, property) => {
5480
+ const propertyPath = [...path, property];
5481
+ const value = this.valueFor(propertyPath);
5482
+ return typeof value === "object" && value !== null && !isArray$3(value) ? this.buildReadonlyObjectProxy(propertyPath) : value;
5483
+ },
5484
+ getOwnPropertyDescriptor: (target, property) => {
5485
+ const propertyPath = [...path, property];
5486
+ const value = this.valueFor(propertyPath);
5487
+ return {
5488
+ value: (
5489
+ // TODO - need to wrap arrays in a Proxy as well
5490
+ typeof value === "object" && value !== null && !isArray$3(value) ? this.buildReadonlyObjectProxy(propertyPath) : value
5491
+ ),
5492
+ writable: false,
5493
+ configurable: true,
5494
+ enumerable: true
5495
+ };
5496
+ },
5497
+ has: (_, property) => {
5498
+ return this.valueFor([...path, property]) !== void 0;
5499
+ },
5500
+ ownKeys: () => {
5501
+ const keys = [];
5502
+ for (const v of Object.values(this.prioritizedConfigData)) {
5503
+ const value = valueFor(v, path);
5504
+ if (value) {
5505
+ keys.push(...Object.keys(value));
5506
+ }
5507
+ }
5508
+ return [...new Set(keys)];
5509
+ },
5510
+ set: () => {
5511
+ throw new Error("cannot directly set values on config");
5512
+ }
5513
+ });
5514
+ this.readonlyObjectProxies.set(key, proxy);
5515
+ return proxy;
5516
+ }
5517
+ // ConfigService.config
5518
+ get config() {
5519
+ if (!this.validated) {
5520
+ const result = this.validate();
5521
+ if (result.isErr()) {
5522
+ throw result.error.join("; ");
5523
+ }
5524
+ }
5525
+ return this.unsafeConfig;
5526
+ }
5527
+ // ConfigService.set
5528
+ set(priority, setter) {
5529
+ this.validated = false;
5530
+ return setter(this.prioritizedConfigData[priority]);
5531
+ }
5532
+ // returns the highest priority value for a given path, undefined if no value
5533
+ // is defined for the path at any priority
5534
+ valueFor(path) {
5535
+ for (const [_, data] of Object.entries(this.prioritizedConfigData)) {
5536
+ const value = valueFor(data, path);
5537
+ if (value !== void 0) {
5538
+ return value;
5539
+ }
5540
+ }
5541
+ }
5542
+ }
5543
+ function buildServiceDescriptor$1(initialConfigDatas) {
5544
+ return {
5545
+ type: "config",
5546
+ version: "1.0",
5547
+ service: new PrioritizedConfigService(initialConfigDatas)
5548
+ };
5549
+ }
5550
+
5551
+ /**
5552
+ * Copyright (c) 2022, Salesforce, Inc.,
5553
+ * All rights reserved.
5554
+ * For full license text, see the LICENSE.txt file
5555
+ */
5556
+
5557
+ /*
5558
+ * ATTENTION!
5559
+ * THIS IS A GENERATED FILE FROM https://github.com/salesforce-experience-platform-emu/lds-lightning-platform
5560
+ * If you would like to contribute to LDS, please follow the steps outlined in the git repo.
5561
+ * Any changes made to this file in p4 will be automatically overwritten.
5562
+ * *******************************************************************************************
5563
+ */
5564
+ /* proxy-compat-disable */
5565
+ var EnvironmentSettings;
5566
+ (function (EnvironmentSettings) {
5567
+ EnvironmentSettings["ForceRecordTransactionsDisabled"] = "forceRecordTransactionsDisabled";
5568
+ })(EnvironmentSettings || (EnvironmentSettings = {}));
5569
+ const GATE_FORCE_RECORD_TRANSACTIONS_DISABLED = '$Browser.S1Features.forceRecordTransactionsDisabled';
5570
+ const supportedEnvironmentSettings = {
5571
+ [EnvironmentSettings.ForceRecordTransactionsDisabled]: GATE_FORCE_RECORD_TRANSACTIONS_DISABLED,
5572
+ };
5573
+ /**
5574
+ * Returns aura configuration settings. Used to check gate/perm statuses.
5575
+ * @param name Name of the setting to check.
5576
+ * @returns Value of the setting, or undefined if $A is not available.
5577
+ */
5578
+ function getEnvironmentSetting(name) {
5579
+ if (typeof window === 'undefined') {
5580
+ // server environment i.e. SSR in LWR
5581
+ return undefined;
5582
+ }
5583
+ const environmentSetting = supportedEnvironmentSettings[name];
5584
+ if (typeof window.$A !== 'undefined' && environmentSetting !== undefined) {
5585
+ return window.$A.get(environmentSetting);
5586
+ }
5587
+ return undefined;
5588
+ }
5589
+ // version: 1.414.1-06354ce124
5590
+
5591
+ const environmentHasAura = typeof window !== 'undefined' && typeof window.$A !== 'undefined';
5592
+ const defaultConfig = {
5593
+ maxAllowedParallelXHRCounts: 9,
5594
+ forceRecordTransactionsDisabled: false,
5595
+ };
5596
+ const configServiceDescriptor = buildServiceDescriptor$1({
5597
+ overrides: {},
5598
+ lex: {},
5599
+ default: defaultConfig,
5600
+ });
5601
+ const configService = configServiceDescriptor.service;
5602
+ if (environmentHasAura) {
5603
+ configService.set('lex', (config) => {
5604
+ config.maxAllowedParallelXHRCounts =
5605
+ window['$A'].clientService.maxAllowedParallelXHRCounts();
5606
+ config.forceRecordTransactionsDisabled = getEnvironmentSetting(EnvironmentSettings.ForceRecordTransactionsDisabled);
5607
+ });
5608
+ }
5609
+ if (!applyPredictionRequestLimit.isOpen({ fallback: false })) {
5610
+ configService.set('lex', (config) => {
5611
+ config.maxAllowedParallelXHRCounts = 1000;
5612
+ });
5613
+ }
5614
+
5615
+ const forceRecordTransactionsDisabled = configService.config.forceRecordTransactionsDisabled;
5399
5616
  //TODO: Some duplication here that can be most likely moved to a util class
5400
5617
  const NO_RECORD_ID_204 = '204_NO_RECORD_ID';
5401
5618
  const NO_RECORD_TYPE_204 = '204_NO_RECORD_TYPE';
@@ -5815,7 +6032,7 @@ function buildLexRuntimeLuvio5xxStatusResponseInterceptor() {
5815
6032
 
5816
6033
  const CSRF_TOKEN_KEY = 'salesforce_csrf_token';
5817
6034
  const CSRF_STORAGE_NAME = 'ldsCSRFToken';
5818
- const BASE_URI = '/services/data/v66.0';
6035
+ const BASE_URI = '/services/data/v67.0';
5819
6036
  const UI_API_BASE_URI = `${BASE_URI}/ui-api`;
5820
6037
  const CSRF_TOKEN_ENDPOINT = `${UI_API_BASE_URI}/session/csrf`;
5821
6038
  const CSRF_STORAGE_CONFIG = {
@@ -6034,6 +6251,191 @@ function buildLuvioCsrfTokenInterceptor() {
6034
6251
  };
6035
6252
  }
6036
6253
 
6254
+ function createInstrumentationIdContext() {
6255
+ return () => ({
6256
+ instrumentationId: generateRequestId(),
6257
+ });
6258
+ }
6259
+ function createStartMark(requestId) {
6260
+ const startMark = markStart('transport', 'request');
6261
+ startMark.context = {
6262
+ auraXHRId: requestId,
6263
+ background: false,
6264
+ actionDefs: ['lds-fetch'],
6265
+ requestId,
6266
+ requestLength: -1, // not known
6267
+ };
6268
+ }
6269
+ function createEndMark(responseStatus, responseStatusText, url, context, errorMessage) {
6270
+ if (context && context.instrumentationId) {
6271
+ const endMark = markEnd('transport', 'request', { auraXHRId: context.instrumentationId });
6272
+ if (performance && performance.getEntriesByName) {
6273
+ const resources = performance.getEntriesByName(url);
6274
+ let resource;
6275
+ if (resources.length) {
6276
+ if (resources.length === 1) {
6277
+ // only one, so it is the correct one
6278
+ resource = resources[0];
6279
+ }
6280
+ else {
6281
+ // otherwise we need to guess based on the start time
6282
+ resource = findCorrectResource(resources, context);
6283
+ }
6284
+ if (resource) {
6285
+ setResourceTimings(context.instrumentationId, responseStatus, responseStatusText, endMark, resource);
6286
+ }
6287
+ }
6288
+ else if (errorMessage) {
6289
+ logMessage(errorMessage);
6290
+ }
6291
+ }
6292
+ }
6293
+ }
6294
+ // noop implementation for when one is not provided
6295
+ let internalRequestTracker = {
6296
+ hasTracker: () => false,
6297
+ registerHandler: (_request, _name, _loadedCheck) => { },
6298
+ markFinished: (_request) => { },
6299
+ };
6300
+ function setResourceTimings(id, responseStatus, responseStatusText, endMark, r) {
6301
+ endMark.context = {
6302
+ auraXHRId: id,
6303
+ status: responseStatus,
6304
+ statusText: responseStatusText,
6305
+ // Timings fields
6306
+ responseLength: r.decodedBodySize || 0,
6307
+ serverTime: r.serverTiming || 0,
6308
+ xhrDuration: Math.floor(r.responseEnd - r.startTime),
6309
+ xhrStall: Math.floor(r.requestStart - r.startTime),
6310
+ startTime: Math.floor(r.startTime),
6311
+ fetchStart: Math.floor(r.fetchStart),
6312
+ requestStart: Math.floor(r.requestStart),
6313
+ dns: Math.floor(r.domainLookupEnd - r.domainLookupStart),
6314
+ tcp: Math.floor(r.connectEnd - r.connectStart),
6315
+ ttfb: Math.floor(r.responseStart - r.startTime),
6316
+ transfer: Math.floor(r.responseEnd - r.responseStart),
6317
+ transferSize: r['transferSize'] || 0,
6318
+ nextHopProtocol: r['nextHopProtocol'],
6319
+ };
6320
+ }
6321
+ function findCorrectResource(resources, context) {
6322
+ if (context && context.startTime) {
6323
+ let likelyResource = {
6324
+ index: 0,
6325
+ diff: Math.abs(context.startTime - resources[0].startTime),
6326
+ };
6327
+ for (let entry = 1; entry < resources.length; ++entry) {
6328
+ let diff = Math.abs(context.startTime - resources[entry].startTime);
6329
+ if (diff < likelyResource.diff) {
6330
+ likelyResource = { index: entry, diff };
6331
+ }
6332
+ }
6333
+ return resources[likelyResource.index];
6334
+ }
6335
+ return undefined;
6336
+ }
6337
+ // Copied from requestId generation on core
6338
+ function generateRequestId() {
6339
+ function guid() {
6340
+ function s4() {
6341
+ return Math.floor((1 + Math.random()) * 0x10000)
6342
+ .toString(16)
6343
+ .substring(1);
6344
+ }
6345
+ return s4() + s4();
6346
+ }
6347
+ return [Math.round(performance.now() * 1000000), guid(), Math.round(Math.random() * 100000000)]
6348
+ .join('')
6349
+ .substring(0, 18);
6350
+ }
6351
+
6352
+ function buildLuvioThirdPartyTrackerRegisterInterceptor() {
6353
+ return (resourceRequest, context) => {
6354
+ if (context && context.instrumentationId) {
6355
+ instrumentationTracker.registerHandler(context.instrumentationId, 'luvio-inflight-network-request', () => {
6356
+ // return false until we signal we are finished
6357
+ return false;
6358
+ });
6359
+ }
6360
+ return resolvedPromiseLike$2(resourceRequest);
6361
+ };
6362
+ }
6363
+
6364
+ function buildLuvioThirdPartyTrackerFinishInterceptor() {
6365
+ return async (context) => {
6366
+ if (context && context.instrumentationId) {
6367
+ instrumentationTracker.markFinished(context.instrumentationId);
6368
+ }
6369
+ };
6370
+ }
6371
+
6372
+ const SFDC_REQUEST_ID_KEY = 'X-SFDC-Request-Id';
6373
+ function buildTransportMarksSendInterceptor() {
6374
+ return async (fetchArgs, context) => {
6375
+ // First set the requestId header. If there's not context, it means we won't be able to track the mark and something is hosed, and so not worth even trying
6376
+ if (context && context.instrumentationId) {
6377
+ const requestId = context.instrumentationId;
6378
+ fetchArgs = setHeader(SFDC_REQUEST_ID_KEY, requestId, fetchArgs);
6379
+ context.startTime = performance.now();
6380
+ createStartMark(requestId);
6381
+ }
6382
+ return resolvedPromiseLike$2(fetchArgs);
6383
+ };
6384
+ }
6385
+ function buildLuvioTransportMarksSendInterceptor() {
6386
+ return (resourceRequest, context) => {
6387
+ if (context && context.instrumentationId) {
6388
+ const requestId = context.instrumentationId;
6389
+ setLuvioRequestIdHeader(resourceRequest, requestId);
6390
+ context.startTime = performance.now();
6391
+ context.url = location.origin + resourceRequest.baseUri + resourceRequest.basePath;
6392
+ createStartMark(requestId);
6393
+ }
6394
+ return resolvedPromiseLike$2(resourceRequest);
6395
+ };
6396
+ }
6397
+ function setLuvioRequestIdHeader(resourceRequest, requestId) {
6398
+ // Ensure headers object exists
6399
+ if (!resourceRequest.headers) {
6400
+ resourceRequest.headers = {};
6401
+ }
6402
+ // Don't overwrite request id header if it already exists
6403
+ if (!resourceRequest.headers[SFDC_REQUEST_ID_KEY]) {
6404
+ resourceRequest.headers[SFDC_REQUEST_ID_KEY] = requestId;
6405
+ }
6406
+ }
6407
+
6408
+ const observer = new PerformanceObserver(() => { });
6409
+ observer.observe({ type: 'resource', buffered: true });
6410
+ function buildTransportMarksReceiveInterceptor() {
6411
+ return async (response, context) => {
6412
+ response
6413
+ .clone()
6414
+ .text()
6415
+ .then(() => {
6416
+ createEndMark(response.status, response.statusText, response.url, context, `OneStore resource timing failed to match for: ${response.url}`);
6417
+ })
6418
+ .catch((e) => {
6419
+ logMessage(`OneStore transport marks received failed with: ${e}`);
6420
+ });
6421
+ return response;
6422
+ };
6423
+ }
6424
+ function buildLuvioTransportMarksReceiveInterceptor() {
6425
+ return async (response, context) => {
6426
+ if (context && context.url) {
6427
+ Promise.resolve(response)
6428
+ .then(() => {
6429
+ createEndMark(response.status, response.statusText, context.url, context, `Luvio resource timing failed to match for: ${context.url}`);
6430
+ })
6431
+ .catch((e) => {
6432
+ logMessage(`Luvio transport marks received failed with: ${e}`);
6433
+ });
6434
+ }
6435
+ return response;
6436
+ };
6437
+ }
6438
+
6037
6439
  function isOneRuntime() {
6038
6440
  return !!globalThis.LWR;
6039
6441
  }
@@ -6156,12 +6558,20 @@ const composedFetchNetworkAdapter = {
6156
6558
  }
6157
6559
  return ENABLED_PATH_MATCHERS.some((matcher) => matcher.test(path));
6158
6560
  },
6159
- adapter: setupLexNetworkAdapter(requestTracker, requestLogger, {
6160
- request: [buildLuvioPageScopedCacheRequestInterceptor(), buildLuvioCsrfTokenInterceptor()],
6561
+ adapter: setupLexNetworkAdapter(requestLogger, {
6562
+ createContext: createInstrumentationIdContext(),
6563
+ request: [
6564
+ buildLuvioThirdPartyTrackerRegisterInterceptor(),
6565
+ buildLuvioTransportMarksSendInterceptor(),
6566
+ buildLuvioPageScopedCacheRequestInterceptor(),
6567
+ buildLuvioCsrfTokenInterceptor(),
6568
+ ],
6161
6569
  response: [
6162
6570
  buildLexRuntimeLuvio5xxStatusResponseInterceptor(),
6163
6571
  buildLexRuntimeLuvioAuthExpirationRedirectResponseInterceptor(),
6572
+ buildLuvioTransportMarksReceiveInterceptor(),
6164
6573
  ],
6574
+ finally: [buildLuvioThirdPartyTrackerFinishInterceptor()],
6165
6575
  }),
6166
6576
  };
6167
6577
 
@@ -6185,22 +6595,6 @@ function buildThirdPartyTrackerRegisterInterceptor() {
6185
6595
  };
6186
6596
  }
6187
6597
 
6188
- function createInstrumentationIdContext() {
6189
- return () => ({
6190
- instrumentationId: generateRequestId$1(),
6191
- });
6192
- }
6193
- function createStartMark(requestId) {
6194
- const startMark = markStart('transport', 'request');
6195
- startMark.context = {
6196
- auraXHRId: requestId,
6197
- background: false,
6198
- actionDefs: ['lds-fetch'],
6199
- requestId,
6200
- requestLength: -1, // not known
6201
- };
6202
- }
6203
-
6204
6598
  const DEFAULT_CONFIG$1 = {
6205
6599
  maxRetries: 1, // Only retry once after token refresh
6206
6600
  };
@@ -6291,8 +6685,8 @@ async function isCsrfError(response) {
6291
6685
  // Clone to avoid consuming the original response
6292
6686
  const cloned = response.clone();
6293
6687
  const body = await cloned.json();
6294
- // Check the error array format: data[0].errorCode
6295
- const errorCode = body?.data?.[0]?.errorCode;
6688
+ // Check the error array format: body[0].errorCode
6689
+ const errorCode = body?.[0]?.errorCode;
6296
6690
  return errorCode === 'INVALID_ACCESS_TOKEN';
6297
6691
  }
6298
6692
  catch {
@@ -6333,7 +6727,7 @@ const SFAP_BASE_URL = 'api.salesforce.com';
6333
6727
  const sfapJwtRepository = new JwtRepository();
6334
6728
  const sfapJwtManager = new JwtManager(sfapJwtRepository, platformSfapJwtResolver);
6335
6729
  function buildJwtAuthorizedSfapFetchServiceDescriptor(logger) {
6336
- const jwtAuthorizedFetchService = buildServiceDescriptor$1({
6730
+ const jwtAuthorizedFetchService = buildServiceDescriptor$2({
6337
6731
  createContext: createInstrumentationIdContext(),
6338
6732
  request: [buildThirdPartyTrackerRegisterInterceptor(), buildJwtRequestInterceptor(logger)],
6339
6733
  retry: buildCsrfRetryInterceptor(),
@@ -6355,7 +6749,7 @@ function buildCopilotFetchServiceDescriptor(logger) {
6355
6749
  // we switch to JWT authentication this will need to change to incorporate the
6356
6750
  // Interceptor here with the logic in buildJwtAuthorizedSfapFetchServiceDescriptor()
6357
6751
  // above.
6358
- ...buildServiceDescriptor$1({
6752
+ ...buildServiceDescriptor$2({
6359
6753
  createContext: createInstrumentationIdContext(),
6360
6754
  request: [
6361
6755
  buildThirdPartyTrackerRegisterInterceptor(),
@@ -6405,7 +6799,7 @@ function buildCopilotFetchServiceDescriptor(logger) {
6405
6799
  };
6406
6800
  }
6407
6801
  function buildUnauthorizedFetchServiceDescriptor() {
6408
- const fetchService = buildServiceDescriptor$1({
6802
+ const fetchService = buildServiceDescriptor$2({
6409
6803
  createContext: createInstrumentationIdContext(),
6410
6804
  request: [buildThirdPartyTrackerRegisterInterceptor()],
6411
6805
  retry: buildCsrfRetryInterceptor(),
@@ -9248,29 +9642,8 @@ function buildPageScopedCacheRequestInterceptor() {
9248
9642
  };
9249
9643
  }
9250
9644
 
9251
- const SFDC_REQUEST_ID_KEY = 'X-SFDC-Request-Id';
9252
- function buildTransportMarksSendInterceptor() {
9253
- return async (fetchArgs, context) => {
9254
- // First set the requestId header. If there's not context, it means we won't be able to track the mark and something is hosed, and so not worth even trying
9255
- if (context && context.instrumentationId) {
9256
- const requestId = context.instrumentationId;
9257
- fetchArgs = setHeader(SFDC_REQUEST_ID_KEY, requestId, fetchArgs);
9258
- createStartMark(requestId);
9259
- }
9260
- return resolvedPromiseLike$2(fetchArgs);
9261
- };
9262
- }
9263
-
9264
- function buildTransportMarksReceiveInterceptor() {
9265
- return async (context) => {
9266
- if (context && context.instrumentationId) {
9267
- markEnd('transport', 'request', { auraXHRId: context.instrumentationId });
9268
- }
9269
- };
9270
- }
9271
-
9272
9645
  function buildLexRuntimeDefaultFetchServiceDescriptor(logger, retryService) {
9273
- const fetchService = buildServiceDescriptor$1({
9646
+ const fetchService = buildServiceDescriptor$2({
9274
9647
  createContext: createInstrumentationIdContext(),
9275
9648
  request: [
9276
9649
  buildThirdPartyTrackerRegisterInterceptor(),
@@ -9282,18 +9655,16 @@ function buildLexRuntimeDefaultFetchServiceDescriptor(logger, retryService) {
9282
9655
  response: [
9283
9656
  buildLexRuntime5xxStatusResponseInterceptor(logger),
9284
9657
  buildLexRuntimeAuthExpirationRedirectResponseInterceptor(logger),
9285
- ],
9286
- finally: [
9287
9658
  buildTransportMarksReceiveInterceptor(),
9288
- buildThirdPartyTrackerFinishInterceptor(),
9289
9659
  ],
9660
+ finally: [buildThirdPartyTrackerFinishInterceptor()],
9290
9661
  }, retryService);
9291
9662
  return {
9292
9663
  ...fetchService,
9293
9664
  };
9294
9665
  }
9295
9666
  function buildLexRuntimeAllow5xxFetchServiceDescriptor(logger, retryService) {
9296
- const fetchService = buildServiceDescriptor$1({
9667
+ const fetchService = buildServiceDescriptor$2({
9297
9668
  createContext: createInstrumentationIdContext(),
9298
9669
  request: [
9299
9670
  buildThirdPartyTrackerRegisterInterceptor(),
@@ -9302,11 +9673,11 @@ function buildLexRuntimeAllow5xxFetchServiceDescriptor(logger, retryService) {
9302
9673
  buildCsrfTokenInterceptor(),
9303
9674
  ],
9304
9675
  retry: buildCsrfRetryInterceptor(),
9305
- response: [buildLexRuntimeAuthExpirationRedirectResponseInterceptor(logger)],
9306
- finally: [
9676
+ response: [
9677
+ buildLexRuntimeAuthExpirationRedirectResponseInterceptor(logger),
9307
9678
  buildTransportMarksReceiveInterceptor(),
9308
- buildThirdPartyTrackerFinishInterceptor(),
9309
9679
  ],
9680
+ finally: [buildThirdPartyTrackerFinishInterceptor()],
9310
9681
  }, retryService);
9311
9682
  return {
9312
9683
  ...fetchService,
@@ -9716,15 +10087,6 @@ function setupQueryEvaluators(luvio, store) {
9716
10087
  luvio.registerTypeQueryEvaluator(UiApiNamespace, RecordRepresentationRepresentationType, recordRepresentationQueryEvaluator);
9717
10088
  }
9718
10089
  let __lexPrefetcher;
9719
- const HARDCODED_REQUEST_LIMIT = 9;
9720
- function getInflightRequestLimit() {
9721
- try {
9722
- return window['$A'].clientService.maxAllowedParallelXHRCounts();
9723
- }
9724
- catch (e) {
9725
- return HARDCODED_REQUEST_LIMIT;
9726
- }
9727
- }
9728
10090
  const requestStrategyManager = new RequestStrategyManager();
9729
10091
  /**
9730
10092
  * Registers a request strategy to be utilized by PDL.
@@ -9783,9 +10145,7 @@ function setupPredictivePrefetcher(luvio) {
9783
10145
  }
9784
10146
  },
9785
10147
  });
9786
- const inflightRequestLimit = applyPredictionRequestLimit.isOpen({ fallback: false })
9787
- ? getInflightRequestLimit()
9788
- : 1000;
10148
+ const inflightRequestLimit = configService.config.maxAllowedParallelXHRCounts;
9789
10149
  const prefetcherOptions = {
9790
10150
  inflightRequestLimit,
9791
10151
  };
@@ -9895,7 +10255,6 @@ function buildPredictorForContext(context) {
9895
10255
  },
9896
10256
  };
9897
10257
  }
9898
- // LDS initialization logic, invoked directly by Aura component tests
9899
10258
  function initializeLDS() {
9900
10259
  const storeOptions = {
9901
10260
  scheduler: () => { },
@@ -9990,12 +10349,13 @@ function initializeOneStore(luvio) {
9990
10349
  buildServiceDescriptor$6(),
9991
10350
  buildServiceDescriptor$5(),
9992
10351
  buildServiceDescriptor$4(),
9993
- buildServiceDescriptor$3(),
10352
+ buildServiceDescriptor$3$1(),
9994
10353
  buildServiceDescriptor$2$1(),
9995
10354
  buildServiceDescriptor$1$2(),
9996
10355
  buildServiceDescriptor$7(),
9997
10356
  buildLWCWireBindingsServiceDescriptor(),
9998
10357
  buildLWCGraphQLWireBindingsServiceDescriptor(),
10358
+ configServiceDescriptor,
9999
10359
  ];
10000
10360
  setServices(services);
10001
10361
  }
@@ -10014,5 +10374,5 @@ function ldsEngineCreator() {
10014
10374
  return { name: 'ldsEngineCreator' };
10015
10375
  }
10016
10376
 
10017
- export { LexRequestStrategy, PdlPrefetcherEventType, PdlRequestPriority, buildPredictorForContext, ldsEngineCreator as default, initializeLDS, initializeOneStore, notifyUpdateAvailableFactory, registerRequestStrategy, saveRequestAsPrediction, subscribeToPrefetcherEvents, unregisterRequestStrategy, whenPredictionsReady };
10018
- // version: 1.412.1-054d9a1111
10377
+ export { LexRequestStrategy, PdlPrefetcherEventType, PdlRequestPriority, buildPredictorForContext, configService, ldsEngineCreator as default, initializeLDS, initializeOneStore, notifyUpdateAvailableFactory, registerRequestStrategy, saveRequestAsPrediction, subscribeToPrefetcherEvents, unregisterRequestStrategy, whenPredictionsReady };
10378
+ // version: 1.414.1-a1d9b7b404
@@ -0,0 +1,2 @@
1
+ export declare function getEnvironmentSetting(): boolean;
2
+ export declare const EnvironmentSettings: {};
@@ -153,6 +153,7 @@ export declare function incrementRequestResponseCount(cb: () => FetchResponse<un
153
153
  */
154
154
  export declare function mark(name: string, content?: any): void;
155
155
  export declare function logObjectInfoChanged(): void;
156
+ export declare function logMessage(message: string): void;
156
157
  /**
157
158
  * Create a new instrumentation cache stats and return it.
158
159
  *
@@ -0,0 +1,6 @@
1
+ export type LDSConfig = {
2
+ maxAllowedParallelXHRCounts: number;
3
+ forceRecordTransactionsDisabled: boolean;
4
+ };
5
+ export declare const configServiceDescriptor: import("node_modules/@conduit-client/service-config/dist/types/v1/config").ConfigServiceDescriptor<LDSConfig, "default" | "lex" | "overrides">;
6
+ export declare const configService: import("@conduit-client/service-config/v1").ConfigService<LDSConfig, "default" | "lex" | "overrides">;
@@ -0,0 +1 @@
1
+ export declare function buildLuvioThirdPartyTrackerFinishInterceptor(): (context?: any) => Promise<void>;
@@ -2,3 +2,11 @@ export declare function createInstrumentationIdContext(): () => {
2
2
  instrumentationId: string;
3
3
  };
4
4
  export declare function createStartMark(requestId: string): void;
5
+ export declare function createEndMark(responseStatus: number, responseStatusText: string, url: string, context?: any, errorMessage?: string): void;
6
+ export type RequestTracker = {
7
+ hasTracker: () => boolean;
8
+ registerHandler: (request: any, name: string, loadedCheck: () => boolean) => void;
9
+ markFinished: (request: any) => void;
10
+ };
11
+ export declare let internalRequestTracker: RequestTracker;
12
+ export declare function generateRequestId(): string;
@@ -5,6 +5,7 @@ import type { LexRequestStrategy } from './predictive-loading/request-strategy/l
5
5
  import { type LexRequest } from './predictive-loading/lex';
6
6
  export { PdlRequestPriority, PdlPrefetcherEventType } from './predictive-loading';
7
7
  export { LexRequestStrategy } from './predictive-loading/request-strategy/lex-request-strategy';
8
+ export { configService } from './config-service-util';
8
9
  /**
9
10
  * Registers a request strategy to be utilized by PDL.
10
11
  * @param requestStrategy - {@link LexRequestStrategy} The request strategy/strategies to register.
@@ -1,5 +1,6 @@
1
1
  import { type ResourceRequest } from '@luvio/engine';
2
- import type { RequestLogger, RequestTracker } from '@salesforce/lds-network-fetch';
2
+ import type { RequestLogger } from '@salesforce/lds-network-fetch';
3
+ import { RequestTracker } from './instrumentation-utils';
3
4
  /**
4
5
  * Base set of url paths that this adapter can serve via HTTP when enabled.
5
6
  * Extend this list to support additional endpoints (see predicate wiring below).
@@ -0,0 +1,2 @@
1
+ import { ResourceRequest } from '@luvio/engine';
2
+ export declare function buildLuvioThirdPartyTrackerRegisterInterceptor(): (resourceRequest: ResourceRequest, context?: any) => PromiseLike<ResourceRequest>;
@@ -0,0 +1,4 @@
1
+ import { ResponseInterceptor } from '@conduit-client/service-fetch-network/v1';
2
+ import { ResponseInterceptor as LuvioResponseInterceptor } from '@salesforce/lds-network-fetch';
3
+ export declare function buildTransportMarksReceiveInterceptor(): ResponseInterceptor;
4
+ export declare function buildLuvioTransportMarksReceiveInterceptor(): LuvioResponseInterceptor;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-aura",
3
- "version": "1.412.1",
3
+ "version": "1.414.1",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS engine for Aura runtime",
6
6
  "main": "dist/ldsEngineCreator.js",
@@ -34,57 +34,58 @@
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.7.1",
38
- "@conduit-client/tools-core": "3.7.1",
39
- "@salesforce/lds-adapters-apex": "^1.412.1",
40
- "@salesforce/lds-adapters-uiapi": "^1.412.1",
41
- "@salesforce/lds-ads-bridge": "^1.412.1",
42
- "@salesforce/lds-aura-storage": "^1.412.1",
43
- "@salesforce/lds-bindings": "^1.412.1",
44
- "@salesforce/lds-instrumentation": "^1.412.1",
45
- "@salesforce/lds-network-aura": "^1.412.1",
46
- "@salesforce/lds-network-fetch": "^1.412.1",
37
+ "@conduit-client/service-provisioner": "3.9.0",
38
+ "@conduit-client/tools-core": "3.9.0",
39
+ "@salesforce/lds-adapters-apex": "^1.414.1",
40
+ "@salesforce/lds-adapters-uiapi": "^1.414.1",
41
+ "@salesforce/lds-ads-bridge": "^1.414.1",
42
+ "@salesforce/lds-aura-storage": "^1.414.1",
43
+ "@salesforce/lds-bindings": "^1.414.1",
44
+ "@salesforce/lds-instrumentation": "^1.414.1",
45
+ "@salesforce/lds-network-aura": "^1.414.1",
46
+ "@salesforce/lds-network-fetch": "^1.414.1",
47
47
  "jwt-encode": "1.0.1"
48
48
  },
49
49
  "dependencies": {
50
- "@conduit-client/command-aura-graphql-normalized-cache-control": "3.7.1",
51
- "@conduit-client/command-aura-network": "3.7.1",
52
- "@conduit-client/command-aura-normalized-cache-control": "3.7.1",
53
- "@conduit-client/command-aura-resource-cache-control": "3.7.1",
54
- "@conduit-client/command-fetch-network": "3.7.1",
55
- "@conduit-client/command-http-graphql-normalized-cache-control": "3.7.1",
56
- "@conduit-client/command-http-normalized-cache-control": "3.7.1",
57
- "@conduit-client/command-ndjson": "3.7.1",
58
- "@conduit-client/command-network": "3.7.1",
59
- "@conduit-client/command-sse": "3.7.1",
60
- "@conduit-client/command-streaming": "3.7.1",
61
- "@conduit-client/service-aura-network": "3.7.1",
62
- "@conduit-client/service-bindings-imperative": "3.7.1",
63
- "@conduit-client/service-bindings-lwc": "3.7.1",
64
- "@conduit-client/service-cache": "3.7.1",
65
- "@conduit-client/service-cache-control": "3.7.1",
66
- "@conduit-client/service-cache-inclusion-policy": "3.7.1",
67
- "@conduit-client/service-feature-flags": "3.7.1",
68
- "@conduit-client/service-fetch-network": "3.7.1",
69
- "@conduit-client/service-instrument-command": "3.7.1",
70
- "@conduit-client/service-pubsub": "3.7.1",
71
- "@conduit-client/service-store": "3.7.1",
72
- "@conduit-client/utils": "3.7.1",
50
+ "@conduit-client/command-aura-graphql-normalized-cache-control": "3.9.0",
51
+ "@conduit-client/command-aura-network": "3.9.0",
52
+ "@conduit-client/command-aura-normalized-cache-control": "3.9.0",
53
+ "@conduit-client/command-aura-resource-cache-control": "3.9.0",
54
+ "@conduit-client/command-fetch-network": "3.9.0",
55
+ "@conduit-client/command-http-graphql-normalized-cache-control": "3.9.0",
56
+ "@conduit-client/command-http-normalized-cache-control": "3.9.0",
57
+ "@conduit-client/command-ndjson": "3.9.0",
58
+ "@conduit-client/command-network": "3.9.0",
59
+ "@conduit-client/command-sse": "3.9.0",
60
+ "@conduit-client/command-streaming": "3.9.0",
61
+ "@conduit-client/service-aura-network": "3.9.0",
62
+ "@conduit-client/service-bindings-imperative": "3.9.0",
63
+ "@conduit-client/service-bindings-lwc": "3.9.0",
64
+ "@conduit-client/service-cache": "3.9.0",
65
+ "@conduit-client/service-cache-control": "3.9.0",
66
+ "@conduit-client/service-cache-inclusion-policy": "3.9.0",
67
+ "@conduit-client/service-config": "3.9.0",
68
+ "@conduit-client/service-feature-flags": "3.9.0",
69
+ "@conduit-client/service-fetch-network": "3.9.0",
70
+ "@conduit-client/service-instrument-command": "3.9.0",
71
+ "@conduit-client/service-pubsub": "3.9.0",
72
+ "@conduit-client/service-store": "3.9.0",
73
+ "@conduit-client/utils": "3.9.0",
73
74
  "@luvio/network-adapter-composable": "0.158.7",
74
75
  "@luvio/network-adapter-fetch": "0.158.7",
75
76
  "@lwc/state": "^0.23.0",
76
- "@salesforce/lds-adapters-onestore-graphql": "^1.412.1",
77
- "@salesforce/lds-adapters-uiapi-lex": "^1.412.1",
78
- "@salesforce/lds-luvio-service": "^1.412.1",
79
- "@salesforce/lds-luvio-uiapi-records-service": "^1.412.1"
77
+ "@salesforce/lds-adapters-onestore-graphql": "^1.414.1",
78
+ "@salesforce/lds-adapters-uiapi-lex": "^1.414.1",
79
+ "@salesforce/lds-luvio-service": "^1.414.1",
80
+ "@salesforce/lds-luvio-uiapi-records-service": "^1.414.1"
80
81
  },
81
82
  "luvioBundlesize": [
82
83
  {
83
84
  "path": "./dist/ldsEngineCreator.js",
84
85
  "maxSize": {
85
- "none": "350 kB",
86
+ "none": "365 kB",
86
87
  "min": "190 kB",
87
- "compressed": "57.2 kB"
88
+ "compressed": "59.2 kB"
88
89
  }
89
90
  }
90
91
  ],
@@ -1,3 +0,0 @@
1
- import { FinallyInterceptor } from '@conduit-client/service-fetch-network/v1';
2
- export declare function buildTransportMarksReceiveInterceptor(): FinallyInterceptor;
3
- export declare function buildLuvioTransportMarksReceiveInterceptor(): FinallyInterceptor;