@salesforce/lds-runtime-aura 1.397.0 → 1.398.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.
@@ -31,7 +31,7 @@ import { setServices } from 'force/luvioServiceProvisioner1';
31
31
  import { dispatchGlobalEvent, unstable_loadComponentDefs, executeGlobalControllerRawResponse } from 'aura';
32
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';
33
33
  import { pageScopedCache } from 'instrumentation/utility';
34
- import { instrument as instrument$2, setupLexNetworkAdapter, internalRequestTracker, generateRequestId } from 'force/ldsNetworkFetch';
34
+ import { instrument as instrument$2, generateRequestId, setupLexNetworkAdapter, internalRequestTracker } from 'force/ldsNetworkFetch';
35
35
  import { ThirdPartyTracker } from 'instrumentation:thirdPartyTracker';
36
36
  import { REFRESH_ADAPTER_EVENT, ADAPTER_UNFULFILLED_ERROR, instrument as instrument$3 } from 'force/ldsBindings';
37
37
  import { counter, registerCacheStats, perfStart, perfEnd, registerPeriodicLogger, interaction, timer } from 'instrumentation/service';
@@ -2671,7 +2671,7 @@ function buildServiceDescriptor$5(luvio) {
2671
2671
  },
2672
2672
  };
2673
2673
  }
2674
- // version: 1.397.0-006831ea37
2674
+ // version: 1.398.0-ada864f72d
2675
2675
 
2676
2676
  /*!
2677
2677
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -3009,7 +3009,7 @@ function buildServiceDescriptor$1(notifyRecordUpdateAvailable, getNormalizedLuvi
3009
3009
  },
3010
3010
  };
3011
3011
  }
3012
- // version: 1.397.0-006831ea37
3012
+ // version: 1.398.0-ada864f72d
3013
3013
 
3014
3014
  /*!
3015
3015
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -3897,7 +3897,7 @@ function getEnvironmentSetting(name) {
3897
3897
  }
3898
3898
  return undefined;
3899
3899
  }
3900
- // version: 1.397.0-006831ea37
3900
+ // version: 1.398.0-ada864f72d
3901
3901
 
3902
3902
  /**
3903
3903
  * Observability / Critical Availability Program (230+)
@@ -4721,6 +4721,27 @@ function buildLuvioPageScopedCacheRequestInterceptor() {
4721
4721
  };
4722
4722
  }
4723
4723
 
4724
+ const REQUEST_ID_KEY = 'X-SFDC-Request-Id';
4725
+ function buildRequestIdInterceptor() {
4726
+ return async (fetchArgs) => {
4727
+ fetchArgs = setHeader(REQUEST_ID_KEY, generateRequestId(), fetchArgs);
4728
+ return resolvedPromiseLike$3(fetchArgs);
4729
+ };
4730
+ }
4731
+ function buildLuvioRequestIdInterceptor() {
4732
+ return (resourceRequest) => {
4733
+ // Ensure headers object exists
4734
+ if (!resourceRequest.headers) {
4735
+ resourceRequest.headers = {};
4736
+ }
4737
+ // Don't overwrite request id header if it already exists
4738
+ if (!resourceRequest.headers[REQUEST_ID_KEY]) {
4739
+ resourceRequest.headers[REQUEST_ID_KEY] = generateRequestId();
4740
+ }
4741
+ return resolvedPromiseLike$3(resourceRequest);
4742
+ };
4743
+ }
4744
+
4724
4745
  const API_PATHS = [
4725
4746
  // getLookupActions
4726
4747
  // '/ui-api/actions/lookup/{objectApiNames}',
@@ -4782,7 +4803,7 @@ const composedFetchNetworkAdapter = {
4782
4803
  return API_PATH_MATCHERS.some((matcher) => matcher.test(path));
4783
4804
  },
4784
4805
  adapter: setupLexNetworkAdapter(requestTracker, requestLogger, {
4785
- request: [buildLuvioPageScopedCacheRequestInterceptor()],
4806
+ request: [buildLuvioPageScopedCacheRequestInterceptor(), buildLuvioRequestIdInterceptor()],
4786
4807
  response: [
4787
4808
  buildLexRuntimeLuvio5xxStatusResponseInterceptor(),
4788
4809
  buildLexRuntimeLuvioAuthExpirationRedirectResponseInterceptor(),
@@ -4792,7 +4813,7 @@ const composedFetchNetworkAdapter = {
4792
4813
 
4793
4814
  function buildLexRuntimeDefaultFetchServiceDescriptor(logger, retryService) {
4794
4815
  const fetchService = buildLexConnectFetchServiceDescriptor({
4795
- request: [buildPageScopedCacheRequestInterceptor()],
4816
+ request: [buildPageScopedCacheRequestInterceptor(), buildRequestIdInterceptor()],
4796
4817
  response: [
4797
4818
  buildLexRuntime5xxStatusResponseInterceptor(logger),
4798
4819
  buildLexRuntimeAuthExpirationRedirectResponseInterceptor(logger),
@@ -4804,7 +4825,7 @@ function buildLexRuntimeDefaultFetchServiceDescriptor(logger, retryService) {
4804
4825
  }
4805
4826
  function buildLexRuntimeAllow5xxFetchServiceDescriptor(logger, retryService) {
4806
4827
  const fetchService = buildLexConnectFetchServiceDescriptor({
4807
- request: [buildPageScopedCacheRequestInterceptor()],
4828
+ request: [buildPageScopedCacheRequestInterceptor(), buildRequestIdInterceptor()],
4808
4829
  response: [buildLexRuntimeAuthExpirationRedirectResponseInterceptor(logger)],
4809
4830
  }, retryService);
4810
4831
  return {
@@ -7743,4 +7764,4 @@ function ldsEngineCreator() {
7743
7764
  }
7744
7765
 
7745
7766
  export { LexRequestStrategy, PdlRequestPriority, buildPredictorForContext, ldsEngineCreator as default, initializeLDS, initializeOneStore, notifyUpdateAvailableFactory, registerRequestStrategy, saveRequestAsPrediction, unregisterRequestStrategy, whenPredictionsReady };
7746
- // version: 1.397.0-08bd11d0bc
7767
+ // version: 1.398.0-4adb9f1c88
@@ -0,0 +1,4 @@
1
+ import { RequestInterceptor } from '@luvio/service-fetch-network/v1';
2
+ import { ResourceRequest } from '@luvio/engine';
3
+ export declare function buildRequestIdInterceptor(): RequestInterceptor;
4
+ export declare function buildLuvioRequestIdInterceptor(): (resourceRequest: ResourceRequest) => PromiseLike<ResourceRequest>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-aura",
3
- "version": "1.397.0",
3
+ "version": "1.398.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS engine for Aura runtime",
6
6
  "main": "dist/ldsEngineCreator.js",
@@ -36,14 +36,14 @@
36
36
  "devDependencies": {
37
37
  "@luvio/service-provisioner": "5.66.0",
38
38
  "@luvio/tools-core": "5.66.0",
39
- "@salesforce/lds-adapters-apex": "^1.397.0",
40
- "@salesforce/lds-adapters-uiapi": "^1.397.0",
41
- "@salesforce/lds-ads-bridge": "^1.397.0",
42
- "@salesforce/lds-aura-storage": "^1.397.0",
43
- "@salesforce/lds-bindings": "^1.397.0",
44
- "@salesforce/lds-instrumentation": "^1.397.0",
45
- "@salesforce/lds-network-aura": "^1.397.0",
46
- "@salesforce/lds-network-fetch": "^1.397.0",
39
+ "@salesforce/lds-adapters-apex": "^1.398.0",
40
+ "@salesforce/lds-adapters-uiapi": "^1.398.0",
41
+ "@salesforce/lds-ads-bridge": "^1.398.0",
42
+ "@salesforce/lds-aura-storage": "^1.398.0",
43
+ "@salesforce/lds-bindings": "^1.398.0",
44
+ "@salesforce/lds-instrumentation": "^1.398.0",
45
+ "@salesforce/lds-network-aura": "^1.398.0",
46
+ "@salesforce/lds-network-fetch": "^1.398.0",
47
47
  "jwt-encode": "1.0.1"
48
48
  },
49
49
  "dependencies": {
@@ -71,10 +71,10 @@
71
71
  "@luvio/service-store": "5.66.0",
72
72
  "@luvio/utils": "5.66.0",
73
73
  "@lwc/state": "^0.23.0",
74
- "@salesforce/lds-adapters-onestore-graphql": "^1.397.0",
75
- "@salesforce/lds-adapters-uiapi-lex": "^1.397.0",
76
- "@salesforce/lds-luvio-service": "^1.397.0",
77
- "@salesforce/lds-luvio-uiapi-records-service": "^1.397.0"
74
+ "@salesforce/lds-adapters-onestore-graphql": "^1.398.0",
75
+ "@salesforce/lds-adapters-uiapi-lex": "^1.398.0",
76
+ "@salesforce/lds-luvio-service": "^1.398.0",
77
+ "@salesforce/lds-luvio-uiapi-records-service": "^1.398.0"
78
78
  },
79
79
  "luvioBundlesize": [
80
80
  {