@salesforce/lds-runtime-aura 1.392.0 → 1.393.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.
@@ -2437,7 +2437,7 @@ function buildServiceDescriptor$5(luvio) {
2437
2437
  },
2438
2438
  };
2439
2439
  }
2440
- // version: 1.392.0-3cd2606b7f
2440
+ // version: 1.393.0-94e6d2aef3
2441
2441
 
2442
2442
  /*!
2443
2443
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -2747,7 +2747,7 @@ function buildServiceDescriptor$1(notifyRecordUpdateAvailable, getNormalizedLuvi
2747
2747
  },
2748
2748
  };
2749
2749
  }
2750
- // version: 1.392.0-3cd2606b7f
2750
+ // version: 1.393.0-94e6d2aef3
2751
2751
 
2752
2752
  /*!
2753
2753
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -6249,7 +6249,7 @@ function getEnvironmentSetting(name) {
6249
6249
  }
6250
6250
  return undefined;
6251
6251
  }
6252
- // version: 1.392.0-3cd2606b7f
6252
+ // version: 1.393.0-94e6d2aef3
6253
6253
 
6254
6254
  const forceRecordTransactionsDisabled = getEnvironmentSetting(EnvironmentSettings.ForceRecordTransactionsDisabled);
6255
6255
  //TODO: Some duplication here that can be most likely moved to a util class
@@ -6497,6 +6497,32 @@ function buildLexRuntimeLuvioAuthExpirationRedirectResponseInterceptor() {
6497
6497
  };
6498
6498
  }
6499
6499
 
6500
+ function buildLexRuntime5xxStatusResponseInterceptor(logger) {
6501
+ return async (response) => {
6502
+ if (response.status >= 500 && response.status < 600) {
6503
+ logger.warn(`Received ${response.status} status code from LEX runtime service`);
6504
+ // Create an error object similar to Aura's current shape for system errors
6505
+ const error = {
6506
+ message: `Runtime Error: ${response.status} ${response.statusText}`,
6507
+ severity: 'ALERT',
6508
+ name: 'LEXRuntimeError',
6509
+ stack: null,
6510
+ handled: false,
6511
+ reported: false,
6512
+ };
6513
+ const evtArgs = {
6514
+ message: error.message,
6515
+ error: null,
6516
+ auraError: error,
6517
+ };
6518
+ // Fire the event asynchronously, similar to the legacy setTimeout pattern
6519
+ window.setTimeout(() => {
6520
+ dispatchGlobalEvent('markup://aura:systemError', evtArgs);
6521
+ }, 0);
6522
+ }
6523
+ return response;
6524
+ };
6525
+ }
6500
6526
  function buildLexRuntimeLuvio5xxStatusResponseInterceptor() {
6501
6527
  return async (response) => {
6502
6528
  if (response.status >= 500 && response.status < 600) {
@@ -6925,18 +6951,26 @@ function buildInMemoryCacheInclusionPolicyService(cache) {
6925
6951
  };
6926
6952
  }
6927
6953
 
6928
- function buildLexRuntimeFetchServiceDescriptor(logger) {
6954
+ function buildLexRuntimeDefaultFetchServiceDescriptor(logger) {
6929
6955
  const fetchService = buildServiceDescriptor({
6930
6956
  request: [],
6931
6957
  response: [
6932
- // TODO: Revisit after ADR for 5xx error propagation in W-19363628
6933
- // buildLexRuntime5xxStatusResponseInterceptor(logger),
6958
+ buildLexRuntime5xxStatusResponseInterceptor(logger),
6934
6959
  buildLexRuntimeAuthExpirationRedirectResponseInterceptor(logger),
6935
6960
  ],
6936
6961
  });
6937
6962
  return {
6938
6963
  ...fetchService,
6939
- tags: { runtimeInterceptors: 'lex_runtime_interceptors' },
6964
+ };
6965
+ }
6966
+ function buildLexRuntimeAllow5xxFetchServiceDescriptor(logger) {
6967
+ const fetchService = buildServiceDescriptor({
6968
+ request: [],
6969
+ response: [buildLexRuntimeAuthExpirationRedirectResponseInterceptor(logger)],
6970
+ });
6971
+ return {
6972
+ ...fetchService,
6973
+ tags: { interceptors: 'allow_500s' },
6940
6974
  };
6941
6975
  }
6942
6976
 
@@ -7245,7 +7279,8 @@ function initializeOneStore(luvio) {
7245
7279
  buildServiceDescriptor$g(),
7246
7280
  buildServiceDescriptor$f(),
7247
7281
  buildServiceDescriptor$7(),
7248
- buildLexRuntimeFetchServiceDescriptor(loggerService),
7282
+ buildLexRuntimeDefaultFetchServiceDescriptor(loggerService),
7283
+ buildLexRuntimeAllow5xxFetchServiceDescriptor(loggerService),
7249
7284
  buildServiceDescriptor$5(luvio),
7250
7285
  luvioUiapiRecordsServiceDescriptor,
7251
7286
  buildServiceDescriptor$4(),
@@ -7270,4 +7305,4 @@ function ldsEngineCreator() {
7270
7305
  }
7271
7306
 
7272
7307
  export { LexRequestStrategy, PdlRequestPriority, buildPredictorForContext, ldsEngineCreator as default, initializeLDS, initializeOneStore, notifyUpdateAvailableFactory, registerRequestStrategy, saveRequestAsPrediction, unregisterRequestStrategy, whenPredictionsReady };
7273
- // version: 1.392.0-620a222fbc
7308
+ // version: 1.393.0-fe4eaa97f2
@@ -0,0 +1,4 @@
1
+ import { type LoggerService } from '@luvio/utils';
2
+ import { type FetchServiceDescriptor } from '@luvio/service-fetch-network/v1';
3
+ export declare function buildLexRuntimeDefaultFetchServiceDescriptor(logger: LoggerService): FetchServiceDescriptor;
4
+ export declare function buildLexRuntimeAllow5xxFetchServiceDescriptor(logger: LoggerService): FetchServiceDescriptor;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-aura",
3
- "version": "1.392.0",
3
+ "version": "1.393.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.62.0",
38
38
  "@luvio/tools-core": "5.62.0",
39
- "@salesforce/lds-adapters-apex": "^1.392.0",
40
- "@salesforce/lds-adapters-uiapi": "^1.392.0",
41
- "@salesforce/lds-ads-bridge": "^1.392.0",
42
- "@salesforce/lds-aura-storage": "^1.392.0",
43
- "@salesforce/lds-bindings": "^1.392.0",
44
- "@salesforce/lds-instrumentation": "^1.392.0",
45
- "@salesforce/lds-network-aura": "^1.392.0",
46
- "@salesforce/lds-network-fetch": "^1.392.0",
39
+ "@salesforce/lds-adapters-apex": "^1.393.0",
40
+ "@salesforce/lds-adapters-uiapi": "^1.393.0",
41
+ "@salesforce/lds-ads-bridge": "^1.393.0",
42
+ "@salesforce/lds-aura-storage": "^1.393.0",
43
+ "@salesforce/lds-bindings": "^1.393.0",
44
+ "@salesforce/lds-instrumentation": "^1.393.0",
45
+ "@salesforce/lds-network-aura": "^1.393.0",
46
+ "@salesforce/lds-network-fetch": "^1.393.0",
47
47
  "jwt-encode": "1.0.1"
48
48
  },
49
49
  "dependencies": {
@@ -71,10 +71,10 @@
71
71
  "@luvio/service-store": "5.62.0",
72
72
  "@luvio/utils": "5.62.0",
73
73
  "@lwc/state": "^0.23.0",
74
- "@salesforce/lds-adapters-onestore-graphql": "^1.392.0",
75
- "@salesforce/lds-adapters-uiapi-lex": "^1.392.0",
76
- "@salesforce/lds-luvio-service": "^1.392.0",
77
- "@salesforce/lds-luvio-uiapi-records-service": "^1.392.0"
74
+ "@salesforce/lds-adapters-onestore-graphql": "^1.393.0",
75
+ "@salesforce/lds-adapters-uiapi-lex": "^1.393.0",
76
+ "@salesforce/lds-luvio-service": "^1.393.0",
77
+ "@salesforce/lds-luvio-uiapi-records-service": "^1.393.0"
78
78
  },
79
79
  "luvioBundlesize": [
80
80
  {
@@ -1,3 +0,0 @@
1
- import { type LoggerService } from '@luvio/utils';
2
- import { type FetchServiceDescriptor } from '@luvio/service-fetch-network/v1';
3
- export declare function buildLexRuntimeFetchServiceDescriptor(logger: LoggerService): FetchServiceDescriptor;