@salesforce/lds-runtime-aura 1.366.0 → 1.367.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.
@@ -5697,7 +5697,7 @@ function getEnvironmentSetting(name) {
5697
5697
  }
5698
5698
  return undefined;
5699
5699
  }
5700
- // version: 1.366.0-bf15f04cce
5700
+ // version: 1.367.0-dc146bc62e
5701
5701
 
5702
5702
  const forceRecordTransactionsDisabled = getEnvironmentSetting(EnvironmentSettings.ForceRecordTransactionsDisabled);
5703
5703
  //TODO: Some duplication here that can be most likely moved to a util class
@@ -6295,6 +6295,45 @@ function buildInMemoryCacheInclusionPolicyService(cache) {
6295
6295
  };
6296
6296
  }
6297
6297
 
6298
+ function buildLexRuntimeFetchServiceDescriptor(logger) {
6299
+ const fetchService = buildServiceDescriptor({
6300
+ request: [],
6301
+ response: [buildLexRuntimeResponseInterceptor(logger)],
6302
+ });
6303
+ return {
6304
+ ...fetchService,
6305
+ tags: { runtimeInterceptors: 'lex_runtime_interceptors' },
6306
+ };
6307
+ }
6308
+ function buildLexRuntimeResponseInterceptor(logger) {
6309
+ return async (response) => {
6310
+ if (response.status >= 500 && response.status < 600) {
6311
+ logger.warn(`Received ${response.status} status code from LEX runtime service`);
6312
+ // Create an error object similar to Aura's current shape for system errors
6313
+ const error = {
6314
+ message: `Runtime Error: ${response.status} ${response.statusText}`,
6315
+ severity: 'ALERT',
6316
+ name: 'LEXRuntimeError',
6317
+ stack: null,
6318
+ handled: false,
6319
+ reported: false,
6320
+ };
6321
+ const evtArgs = {
6322
+ message: error.message,
6323
+ error: null,
6324
+ auraError: error,
6325
+ };
6326
+ // Fire the event asynchronously, similar to the legacy setTimeout pattern
6327
+ window.setTimeout(() => {
6328
+ if (window && window.$A && window.$A.eventService) {
6329
+ window.$A.eventService.getNewEvent('markup://aura:systemError').fire(evtArgs);
6330
+ }
6331
+ }, 0);
6332
+ }
6333
+ return response;
6334
+ };
6335
+ }
6336
+
6298
6337
  // This code *should* be in lds-network-adapter, but when combined with the Aura
6299
6338
  // component test workaround in lds-default-luvio it creates a circular dependecy
6300
6339
  // between lds-default-luvio and lds-network-adapter. We do the register on behalf
@@ -6556,6 +6595,7 @@ function initializeOneStore() {
6556
6595
  buildServiceDescriptor$b(),
6557
6596
  buildServiceDescriptor$a(),
6558
6597
  buildServiceDescriptor$2(),
6598
+ buildLexRuntimeFetchServiceDescriptor(loggerService),
6559
6599
  ];
6560
6600
  setServices(services);
6561
6601
  }
@@ -6578,4 +6618,4 @@ function ldsEngineCreator() {
6578
6618
  }
6579
6619
 
6580
6620
  export { LexRequestStrategy, PdlRequestPriority, buildPredictorForContext, ldsEngineCreator as default, initializeLDS, initializeOneStore, registerRequestStrategy, saveRequestAsPrediction, unregisterRequestStrategy, whenPredictionsReady };
6581
- // version: 1.366.0-30380c7ed7
6621
+ // version: 1.367.0-def0c51200
@@ -0,0 +1,17 @@
1
+ import { type LoggerService } from '@luvio/utils';
2
+ import { type FetchServiceDescriptor, type ResponseInterceptor } from '@luvio/service-fetch-network/v1';
3
+ export type LexRuntimeError = {
4
+ message: string;
5
+ severity: string;
6
+ name: string;
7
+ stack: string | null;
8
+ handled: boolean;
9
+ reported: boolean;
10
+ };
11
+ export type LexErrorEventArgs = {
12
+ message: string;
13
+ error: string | null;
14
+ auraError: LexRuntimeError;
15
+ };
16
+ export declare function buildLexRuntimeFetchServiceDescriptor(logger: LoggerService): FetchServiceDescriptor;
17
+ export declare function buildLexRuntimeResponseInterceptor(logger: LoggerService): ResponseInterceptor;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-aura",
3
- "version": "1.366.0",
3
+ "version": "1.367.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS engine for Aura runtime",
6
6
  "main": "dist/ldsEngineCreator.js",
@@ -34,48 +34,48 @@
34
34
  "release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-aura"
35
35
  },
36
36
  "devDependencies": {
37
- "@luvio/service-provisioner": "5.42.0",
38
- "@luvio/tools-core": "5.42.0",
39
- "@salesforce/lds-adapters-apex": "^1.366.0",
40
- "@salesforce/lds-adapters-uiapi": "^1.366.0",
37
+ "@luvio/service-provisioner": "5.43.1",
38
+ "@luvio/tools-core": "5.43.1",
39
+ "@salesforce/lds-adapters-apex": "^1.367.0",
40
+ "@salesforce/lds-adapters-uiapi": "^1.367.0",
41
41
  "@salesforce/lds-adapters-uiapi-lex": "^1.302.0",
42
- "@salesforce/lds-ads-bridge": "^1.366.0",
43
- "@salesforce/lds-aura-storage": "^1.366.0",
44
- "@salesforce/lds-bindings": "^1.366.0",
45
- "@salesforce/lds-instrumentation": "^1.366.0",
46
- "@salesforce/lds-network-aura": "^1.366.0",
47
- "@salesforce/lds-network-fetch": "^1.366.0",
42
+ "@salesforce/lds-ads-bridge": "^1.367.0",
43
+ "@salesforce/lds-aura-storage": "^1.367.0",
44
+ "@salesforce/lds-bindings": "^1.367.0",
45
+ "@salesforce/lds-instrumentation": "^1.367.0",
46
+ "@salesforce/lds-network-aura": "^1.367.0",
47
+ "@salesforce/lds-network-fetch": "^1.367.0",
48
48
  "jwt-encode": "1.0.1"
49
49
  },
50
50
  "dependencies": {
51
- "@luvio/command-aura-network": "5.42.0",
52
- "@luvio/command-aura-normalized-cache-control": "5.42.0",
53
- "@luvio/command-aura-resource-cache-control": "5.42.0",
54
- "@luvio/command-fetch-network": "5.42.0",
55
- "@luvio/command-http-normalized-cache-control": "5.42.0",
56
- "@luvio/command-ndjson": "5.42.0",
57
- "@luvio/command-network": "5.42.0",
58
- "@luvio/command-sse": "5.42.0",
59
- "@luvio/command-streaming": "5.42.0",
51
+ "@luvio/command-aura-network": "5.43.1",
52
+ "@luvio/command-aura-normalized-cache-control": "5.43.1",
53
+ "@luvio/command-aura-resource-cache-control": "5.43.1",
54
+ "@luvio/command-fetch-network": "5.43.1",
55
+ "@luvio/command-http-normalized-cache-control": "5.43.1",
56
+ "@luvio/command-ndjson": "5.43.1",
57
+ "@luvio/command-network": "5.43.1",
58
+ "@luvio/command-sse": "5.43.1",
59
+ "@luvio/command-streaming": "5.43.1",
60
60
  "@luvio/network-adapter-composable": "0.158.3",
61
61
  "@luvio/network-adapter-fetch": "0.158.3",
62
- "@luvio/service-aura-network": "5.42.0",
63
- "@luvio/service-cache": "5.42.0",
64
- "@luvio/service-cache-control": "5.42.0",
65
- "@luvio/service-cache-inclusion-policy": "5.42.0",
66
- "@luvio/service-fetch-network": "5.42.0",
67
- "@luvio/service-instrument-command": "5.42.0",
68
- "@luvio/service-pubsub": "5.42.0",
69
- "@luvio/service-store": "5.42.0",
70
- "@luvio/utils": "5.42.0",
71
- "@salesforce/lds-adapters-uiapi-lex": "^1.366.0"
62
+ "@luvio/service-aura-network": "5.43.1",
63
+ "@luvio/service-cache": "5.43.1",
64
+ "@luvio/service-cache-control": "5.43.1",
65
+ "@luvio/service-cache-inclusion-policy": "5.43.1",
66
+ "@luvio/service-fetch-network": "5.43.1",
67
+ "@luvio/service-instrument-command": "5.43.1",
68
+ "@luvio/service-pubsub": "5.43.1",
69
+ "@luvio/service-store": "5.43.1",
70
+ "@luvio/utils": "5.43.1",
71
+ "@salesforce/lds-adapters-uiapi-lex": "^1.367.0"
72
72
  },
73
73
  "luvioBundlesize": [
74
74
  {
75
75
  "path": "./dist/ldsEngineCreator.js",
76
76
  "maxSize": {
77
77
  "none": "250 kB",
78
- "min": "109 kB",
78
+ "min": "110 kB",
79
79
  "compressed": "45 kB"
80
80
  }
81
81
  }