@salesforce/lds-runtime-aura 1.428.0 → 1.430.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.
@@ -1354,6 +1354,7 @@ class HttpCacheControlCommand extends CacheControlCommand {
1354
1354
  constructor(services) {
1355
1355
  super(services);
1356
1356
  this.services = services;
1357
+ this.additionalNullResponses = [];
1357
1358
  }
1358
1359
  requestFromNetwork() {
1359
1360
  return this.fetch();
@@ -1365,6 +1366,15 @@ class HttpCacheControlCommand extends CacheControlCommand {
1365
1366
  return resolvedPromiseLike$2(err$1(toError(reason)));
1366
1367
  }
1367
1368
  }
1369
+ isSemanticNullResponse(response) {
1370
+ return this.additionalNullResponses.includes(response.status);
1371
+ }
1372
+ isProtocolNoBodyStatus(status) {
1373
+ return status === 204 || status === 205;
1374
+ }
1375
+ isUndeclaredNoBodyResponse(response) {
1376
+ return this.isProtocolNoBodyStatus(response.status) && !this.isSemanticNullResponse(response);
1377
+ }
1368
1378
  async coerceError(errorResponse) {
1369
1379
  return toError(errorResponse.statusText);
1370
1380
  }
@@ -1375,12 +1385,26 @@ class HttpCacheControlCommand extends CacheControlCommand {
1375
1385
  return response.then(
1376
1386
  (response2) => {
1377
1387
  if (response2.ok) {
1378
- return response2.json().then(
1379
- (json) => {
1380
- return this.processFetchReturnValue(json);
1381
- },
1382
- (reason) => err$1(toError(reason))
1383
- ).finally(() => {
1388
+ let resultPromise;
1389
+ if (this.isSemanticNullResponse(response2)) {
1390
+ resultPromise = Promise.resolve(ok$2(null));
1391
+ } else if (this.isUndeclaredNoBodyResponse(response2)) {
1392
+ resultPromise = Promise.resolve(
1393
+ err$1(
1394
+ toError(
1395
+ `Unexpected ${response2.status} response: no-content status was not declared in the API specification. Declare this response in your OAS without a content property.`
1396
+ )
1397
+ )
1398
+ );
1399
+ } else {
1400
+ resultPromise = response2.json().then(
1401
+ (json) => {
1402
+ return this.processFetchReturnValue(json);
1403
+ },
1404
+ (reason) => err$1(toError(reason))
1405
+ );
1406
+ }
1407
+ return resultPromise.finally(() => {
1384
1408
  try {
1385
1409
  this.afterRequestHooks({ statusCode: response2.status });
1386
1410
  } catch {
@@ -1564,6 +1588,7 @@ const _FetchNetworkCommand = class _FetchNetworkCommand extends NetworkCommand {
1564
1588
  constructor(services) {
1565
1589
  super(services);
1566
1590
  this.services = services;
1591
+ this.additionalNullResponses = [];
1567
1592
  }
1568
1593
  fetch() {
1569
1594
  try {
@@ -1572,6 +1597,15 @@ const _FetchNetworkCommand = class _FetchNetworkCommand extends NetworkCommand {
1572
1597
  return resolvedPromiseLike$2(err$1(toError(reason)));
1573
1598
  }
1574
1599
  }
1600
+ isSemanticNullResponse(response) {
1601
+ return this.additionalNullResponses.includes(response.status);
1602
+ }
1603
+ isProtocolNoBodyStatus(status) {
1604
+ return status === 204 || status === 205;
1605
+ }
1606
+ isUndeclaredNoBodyResponse(response) {
1607
+ return this.isProtocolNoBodyStatus(response.status) && !this.isSemanticNullResponse(response);
1608
+ }
1575
1609
  async coerceError(errorResponse) {
1576
1610
  return toError(errorResponse.statusText);
1577
1611
  }
@@ -1579,10 +1613,24 @@ const _FetchNetworkCommand = class _FetchNetworkCommand extends NetworkCommand {
1579
1613
  return response.then(
1580
1614
  (response2) => {
1581
1615
  if (response2.ok) {
1582
- return response2.json().then(
1583
- (json) => ok$2(json),
1584
- (reason) => err$1(toError(reason))
1585
- ).finally(() => {
1616
+ let resultPromise;
1617
+ if (this.isSemanticNullResponse(response2)) {
1618
+ resultPromise = Promise.resolve(ok$2(null));
1619
+ } else if (this.isUndeclaredNoBodyResponse(response2)) {
1620
+ resultPromise = Promise.resolve(
1621
+ err$1(
1622
+ toError(
1623
+ `Unexpected ${response2.status} response: no-content status was not declared in the API specification. Declare this response in your OAS without a content property.`
1624
+ )
1625
+ )
1626
+ );
1627
+ } else {
1628
+ resultPromise = response2.json().then(
1629
+ (json) => ok$2(json),
1630
+ (reason) => err$1(toError(reason))
1631
+ );
1632
+ }
1633
+ return resultPromise.finally(() => {
1586
1634
  try {
1587
1635
  this.afterRequestHooks({ statusCode: response2.status });
1588
1636
  } catch {
@@ -2712,7 +2760,7 @@ function buildServiceDescriptor$d(luvio) {
2712
2760
  },
2713
2761
  };
2714
2762
  }
2715
- // version: 1.428.0-9a846cb61f
2763
+ // version: 1.430.0-8e6a3c46ce
2716
2764
 
2717
2765
  /*!
2718
2766
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -3065,7 +3113,7 @@ function buildServiceDescriptor$9(notifyRecordUpdateAvailable, getNormalizedLuvi
3065
3113
  },
3066
3114
  };
3067
3115
  }
3068
- // version: 1.428.0-9a846cb61f
3116
+ // version: 1.430.0-8e6a3c46ce
3069
3117
 
3070
3118
  /*!
3071
3119
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -5702,7 +5750,7 @@ function getEnvironmentSetting(name) {
5702
5750
  }
5703
5751
  return undefined;
5704
5752
  }
5705
- // version: 1.428.0-9a846cb61f
5753
+ // version: 1.430.0-8e6a3c46ce
5706
5754
 
5707
5755
  const environmentHasAura = typeof window !== 'undefined' && typeof window.$A !== 'undefined';
5708
5756
  const defaultConfig = {
@@ -10533,4 +10581,4 @@ function ldsEngineCreator() {
10533
10581
  }
10534
10582
 
10535
10583
  export { LexRequestStrategy, PdlPrefetcherEventType, PdlRequestPriority, buildPredictorForContext, configService, ldsEngineCreator as default, initializeLDS, initializeOneStore, notifyUpdateAvailableFactory, registerRequestStrategy, saveRequestAsPrediction, subscribeToPrefetcherEvents, unregisterRequestStrategy, whenPredictionsReady };
10536
- // version: 1.428.0-b7f20524d9
10584
+ // version: 1.430.0-6adb3245d5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-aura",
3
- "version": "1.428.0",
3
+ "version": "1.430.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS engine for Aura runtime",
6
6
  "main": "dist/ldsEngineCreator.js",
@@ -34,51 +34,51 @@
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.18.0",
38
- "@conduit-client/tools-core": "3.18.0",
39
- "@salesforce/lds-adapters-apex": "^1.428.0",
40
- "@salesforce/lds-adapters-uiapi": "^1.428.0",
41
- "@salesforce/lds-ads-bridge": "^1.428.0",
42
- "@salesforce/lds-aura-storage": "^1.428.0",
43
- "@salesforce/lds-bindings": "^1.428.0",
44
- "@salesforce/lds-instrumentation": "^1.428.0",
45
- "@salesforce/lds-network-aura": "^1.428.0",
46
- "@salesforce/lds-network-fetch": "^1.428.0",
37
+ "@conduit-client/service-provisioner": "3.19.2",
38
+ "@conduit-client/tools-core": "3.19.2",
39
+ "@salesforce/lds-adapters-apex": "^1.430.0",
40
+ "@salesforce/lds-adapters-uiapi": "^1.430.0",
41
+ "@salesforce/lds-ads-bridge": "^1.430.0",
42
+ "@salesforce/lds-aura-storage": "^1.430.0",
43
+ "@salesforce/lds-bindings": "^1.430.0",
44
+ "@salesforce/lds-instrumentation": "^1.430.0",
45
+ "@salesforce/lds-network-aura": "^1.430.0",
46
+ "@salesforce/lds-network-fetch": "^1.430.0",
47
47
  "jwt-encode": "1.0.1"
48
48
  },
49
49
  "dependencies": {
50
- "@conduit-client/command-aura-graphql-normalized-cache-control": "3.18.0",
51
- "@conduit-client/command-aura-network": "3.18.0",
52
- "@conduit-client/command-aura-normalized-cache-control": "3.18.0",
53
- "@conduit-client/command-aura-resource-cache-control": "3.18.0",
54
- "@conduit-client/command-fetch-network": "3.18.0",
55
- "@conduit-client/command-http-graphql-normalized-cache-control": "3.18.0",
56
- "@conduit-client/command-http-normalized-cache-control": "3.18.0",
57
- "@conduit-client/command-ndjson": "3.18.0",
58
- "@conduit-client/command-network": "3.18.0",
59
- "@conduit-client/command-sse": "3.18.0",
60
- "@conduit-client/command-streaming": "3.18.0",
61
- "@conduit-client/service-aura-network": "3.18.0",
62
- "@conduit-client/service-bindings-imperative": "3.18.0",
63
- "@conduit-client/service-bindings-lwc": "3.18.0",
64
- "@conduit-client/service-cache": "3.18.0",
65
- "@conduit-client/service-cache-control": "3.18.0",
66
- "@conduit-client/service-cache-inclusion-policy": "3.18.0",
67
- "@conduit-client/service-config": "3.18.0",
68
- "@conduit-client/service-feature-flags": "3.18.0",
69
- "@conduit-client/service-fetch-network": "3.18.0",
70
- "@conduit-client/service-instrument-command": "3.18.0",
71
- "@conduit-client/service-pubsub": "3.18.0",
72
- "@conduit-client/service-store": "3.18.0",
73
- "@conduit-client/utils": "3.18.0",
50
+ "@conduit-client/command-aura-graphql-normalized-cache-control": "3.19.2",
51
+ "@conduit-client/command-aura-network": "3.19.2",
52
+ "@conduit-client/command-aura-normalized-cache-control": "3.19.2",
53
+ "@conduit-client/command-aura-resource-cache-control": "3.19.2",
54
+ "@conduit-client/command-fetch-network": "3.19.2",
55
+ "@conduit-client/command-http-graphql-normalized-cache-control": "3.19.2",
56
+ "@conduit-client/command-http-normalized-cache-control": "3.19.2",
57
+ "@conduit-client/command-ndjson": "3.19.2",
58
+ "@conduit-client/command-network": "3.19.2",
59
+ "@conduit-client/command-sse": "3.19.2",
60
+ "@conduit-client/command-streaming": "3.19.2",
61
+ "@conduit-client/service-aura-network": "3.19.2",
62
+ "@conduit-client/service-bindings-imperative": "3.19.2",
63
+ "@conduit-client/service-bindings-lwc": "3.19.2",
64
+ "@conduit-client/service-cache": "3.19.2",
65
+ "@conduit-client/service-cache-control": "3.19.2",
66
+ "@conduit-client/service-cache-inclusion-policy": "3.19.2",
67
+ "@conduit-client/service-config": "3.19.2",
68
+ "@conduit-client/service-feature-flags": "3.19.2",
69
+ "@conduit-client/service-fetch-network": "3.19.2",
70
+ "@conduit-client/service-instrument-command": "3.19.2",
71
+ "@conduit-client/service-pubsub": "3.19.2",
72
+ "@conduit-client/service-store": "3.19.2",
73
+ "@conduit-client/utils": "3.19.2",
74
74
  "@luvio/network-adapter-composable": "0.160.4",
75
75
  "@luvio/network-adapter-fetch": "0.160.4",
76
76
  "@lwc/state": "^0.29.0",
77
- "@salesforce/lds-adapters-onestore-graphql": "^1.428.0",
77
+ "@salesforce/lds-adapters-onestore-graphql": "^1.430.0",
78
78
  "@salesforce/lds-adapters-uiapi-lex": "^1.415.0",
79
- "@salesforce/lds-durable-storage": "^1.428.0",
80
- "@salesforce/lds-luvio-service": "^1.428.0",
81
- "@salesforce/lds-luvio-uiapi-records-service": "^1.428.0"
79
+ "@salesforce/lds-durable-storage": "^1.430.0",
80
+ "@salesforce/lds-luvio-service": "^1.430.0",
81
+ "@salesforce/lds-luvio-uiapi-records-service": "^1.430.0"
82
82
  },
83
83
  "luvioBundlesize": [
84
84
  {