@salesforce/lds-runtime-mobile 1.429.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.
Files changed (3) hide show
  1. package/dist/main.js +61 -13
  2. package/package.json +36 -36
  3. package/sfdc/main.js +61 -13
package/dist/main.js CHANGED
@@ -57870,6 +57870,7 @@ const _FetchNetworkCommand = class _FetchNetworkCommand extends NetworkCommand {
57870
57870
  constructor(services) {
57871
57871
  super(services);
57872
57872
  this.services = services;
57873
+ this.additionalNullResponses = [];
57873
57874
  }
57874
57875
  fetch() {
57875
57876
  try {
@@ -57878,6 +57879,15 @@ const _FetchNetworkCommand = class _FetchNetworkCommand extends NetworkCommand {
57878
57879
  return resolvedPromiseLike$2(err$1(toError(reason)));
57879
57880
  }
57880
57881
  }
57882
+ isSemanticNullResponse(response) {
57883
+ return this.additionalNullResponses.includes(response.status);
57884
+ }
57885
+ isProtocolNoBodyStatus(status) {
57886
+ return status === 204 || status === 205;
57887
+ }
57888
+ isUndeclaredNoBodyResponse(response) {
57889
+ return this.isProtocolNoBodyStatus(response.status) && !this.isSemanticNullResponse(response);
57890
+ }
57881
57891
  async coerceError(errorResponse) {
57882
57892
  return toError(errorResponse.statusText);
57883
57893
  }
@@ -57885,10 +57895,24 @@ const _FetchNetworkCommand = class _FetchNetworkCommand extends NetworkCommand {
57885
57895
  return response.then(
57886
57896
  (response2) => {
57887
57897
  if (response2.ok) {
57888
- return response2.json().then(
57889
- (json) => ok$1(json),
57890
- (reason) => err$1(toError(reason))
57891
- ).finally(() => {
57898
+ let resultPromise;
57899
+ if (this.isSemanticNullResponse(response2)) {
57900
+ resultPromise = Promise.resolve(ok$1(null));
57901
+ } else if (this.isUndeclaredNoBodyResponse(response2)) {
57902
+ resultPromise = Promise.resolve(
57903
+ err$1(
57904
+ toError(
57905
+ `Unexpected ${response2.status} response: no-content status was not declared in the API specification. Declare this response in your OAS without a content property.`
57906
+ )
57907
+ )
57908
+ );
57909
+ } else {
57910
+ resultPromise = response2.json().then(
57911
+ (json) => ok$1(json),
57912
+ (reason) => err$1(toError(reason))
57913
+ );
57914
+ }
57915
+ return resultPromise.finally(() => {
57892
57916
  try {
57893
57917
  this.afterRequestHooks({ statusCode: response2.status });
57894
57918
  } catch {
@@ -57935,6 +57959,7 @@ class HttpCacheControlCommand extends CacheControlCommand {
57935
57959
  constructor(services) {
57936
57960
  super(services);
57937
57961
  this.services = services;
57962
+ this.additionalNullResponses = [];
57938
57963
  }
57939
57964
  requestFromNetwork() {
57940
57965
  return this.fetch();
@@ -57946,6 +57971,15 @@ class HttpCacheControlCommand extends CacheControlCommand {
57946
57971
  return resolvedPromiseLike$2(err$1(toError(reason)));
57947
57972
  }
57948
57973
  }
57974
+ isSemanticNullResponse(response) {
57975
+ return this.additionalNullResponses.includes(response.status);
57976
+ }
57977
+ isProtocolNoBodyStatus(status) {
57978
+ return status === 204 || status === 205;
57979
+ }
57980
+ isUndeclaredNoBodyResponse(response) {
57981
+ return this.isProtocolNoBodyStatus(response.status) && !this.isSemanticNullResponse(response);
57982
+ }
57949
57983
  async coerceError(errorResponse) {
57950
57984
  return toError(errorResponse.statusText);
57951
57985
  }
@@ -57956,12 +57990,26 @@ class HttpCacheControlCommand extends CacheControlCommand {
57956
57990
  return response.then(
57957
57991
  (response2) => {
57958
57992
  if (response2.ok) {
57959
- return response2.json().then(
57960
- (json) => {
57961
- return this.processFetchReturnValue(json);
57962
- },
57963
- (reason) => err$1(toError(reason))
57964
- ).finally(() => {
57993
+ let resultPromise;
57994
+ if (this.isSemanticNullResponse(response2)) {
57995
+ resultPromise = Promise.resolve(ok$1(null));
57996
+ } else if (this.isUndeclaredNoBodyResponse(response2)) {
57997
+ resultPromise = Promise.resolve(
57998
+ err$1(
57999
+ toError(
58000
+ `Unexpected ${response2.status} response: no-content status was not declared in the API specification. Declare this response in your OAS without a content property.`
58001
+ )
58002
+ )
58003
+ );
58004
+ } else {
58005
+ resultPromise = response2.json().then(
58006
+ (json) => {
58007
+ return this.processFetchReturnValue(json);
58008
+ },
58009
+ (reason) => err$1(toError(reason))
58010
+ );
58011
+ }
58012
+ return resultPromise.finally(() => {
57965
58013
  try {
57966
58014
  this.afterRequestHooks({ statusCode: response2.status });
57967
58015
  } catch {
@@ -58949,7 +58997,7 @@ function buildServiceDescriptor$b(luvio) {
58949
58997
  },
58950
58998
  };
58951
58999
  }
58952
- // version: 1.429.0-327e0551f4
59000
+ // version: 1.430.0-8e6a3c46ce
58953
59001
 
58954
59002
  /**
58955
59003
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -58975,7 +59023,7 @@ function buildServiceDescriptor$a(notifyRecordUpdateAvailable, getNormalizedLuvi
58975
59023
  },
58976
59024
  };
58977
59025
  }
58978
- // version: 1.429.0-327e0551f4
59026
+ // version: 1.430.0-8e6a3c46ce
58979
59027
 
58980
59028
  /*!
58981
59029
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -61635,4 +61683,4 @@ register({
61635
61683
  });
61636
61684
 
61637
61685
  export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, ingest$1o as ingestDenormalizedRecordRepresentation, initializeOneStore, registerReportObserver, reportGraphqlQueryParseError };
61638
- // version: 1.429.0-5bd8f9453e
61686
+ // version: 1.430.0-6adb3245d5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-mobile",
3
- "version": "1.429.0",
3
+ "version": "1.430.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS runtime for mobile/hybrid environments.",
6
6
  "main": "dist/main.js",
@@ -32,44 +32,44 @@
32
32
  "release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-mobile"
33
33
  },
34
34
  "dependencies": {
35
- "@conduit-client/service-bindings-imperative": "3.19.0",
36
- "@conduit-client/service-bindings-lwc": "3.19.0",
37
- "@conduit-client/service-provisioner": "3.19.0",
38
- "@salesforce/lds-adapters-uiapi": "^1.429.0",
39
- "@salesforce/lds-bindings": "^1.429.0",
40
- "@salesforce/lds-instrumentation": "^1.429.0",
41
- "@salesforce/lds-luvio-service": "^1.429.0",
42
- "@salesforce/lds-luvio-uiapi-records-service": "^1.429.0",
35
+ "@conduit-client/service-bindings-imperative": "3.19.2",
36
+ "@conduit-client/service-bindings-lwc": "3.19.2",
37
+ "@conduit-client/service-provisioner": "3.19.2",
38
+ "@salesforce/lds-adapters-uiapi": "^1.430.0",
39
+ "@salesforce/lds-bindings": "^1.430.0",
40
+ "@salesforce/lds-instrumentation": "^1.430.0",
41
+ "@salesforce/lds-luvio-service": "^1.430.0",
42
+ "@salesforce/lds-luvio-uiapi-records-service": "^1.430.0",
43
43
  "@salesforce/user": "0.0.21",
44
44
  "o11y": "250.7.0",
45
45
  "o11y_schema": "256.126.0"
46
46
  },
47
47
  "devDependencies": {
48
- "@conduit-client/command-aura-network": "3.19.0",
49
- "@conduit-client/command-aura-normalized-cache-control": "3.19.0",
50
- "@conduit-client/command-aura-resource-cache-control": "3.19.0",
51
- "@conduit-client/command-fetch-network": "3.19.0",
52
- "@conduit-client/command-http-normalized-cache-control": "3.19.0",
53
- "@conduit-client/command-network": "3.19.0",
54
- "@conduit-client/service-cache": "3.19.0",
55
- "@conduit-client/service-cache-control": "3.19.0",
56
- "@conduit-client/service-cache-inclusion-policy": "3.19.0",
57
- "@conduit-client/service-fetch-network": "3.19.0",
58
- "@conduit-client/service-instrument-command": "3.19.0",
59
- "@conduit-client/service-instrumentation": "3.19.0",
60
- "@conduit-client/service-pubsub": "3.19.0",
61
- "@conduit-client/service-store": "3.19.0",
62
- "@conduit-client/utils": "3.19.0",
63
- "@salesforce/lds-adapters-graphql": "^1.429.0",
64
- "@salesforce/lds-drafts": "^1.429.0",
65
- "@salesforce/lds-durable-records": "^1.429.0",
66
- "@salesforce/lds-network-adapter": "^1.429.0",
67
- "@salesforce/lds-network-nimbus": "^1.429.0",
68
- "@salesforce/lds-store-binary": "^1.429.0",
69
- "@salesforce/lds-store-nimbus": "^1.429.0",
70
- "@salesforce/lds-store-sql": "^1.429.0",
71
- "@salesforce/lds-utils-adapters": "^1.429.0",
72
- "@salesforce/nimbus-plugin-lds": "^1.429.0",
48
+ "@conduit-client/command-aura-network": "3.19.2",
49
+ "@conduit-client/command-aura-normalized-cache-control": "3.19.2",
50
+ "@conduit-client/command-aura-resource-cache-control": "3.19.2",
51
+ "@conduit-client/command-fetch-network": "3.19.2",
52
+ "@conduit-client/command-http-normalized-cache-control": "3.19.2",
53
+ "@conduit-client/command-network": "3.19.2",
54
+ "@conduit-client/service-cache": "3.19.2",
55
+ "@conduit-client/service-cache-control": "3.19.2",
56
+ "@conduit-client/service-cache-inclusion-policy": "3.19.2",
57
+ "@conduit-client/service-fetch-network": "3.19.2",
58
+ "@conduit-client/service-instrument-command": "3.19.2",
59
+ "@conduit-client/service-instrumentation": "3.19.2",
60
+ "@conduit-client/service-pubsub": "3.19.2",
61
+ "@conduit-client/service-store": "3.19.2",
62
+ "@conduit-client/utils": "3.19.2",
63
+ "@salesforce/lds-adapters-graphql": "^1.430.0",
64
+ "@salesforce/lds-drafts": "^1.430.0",
65
+ "@salesforce/lds-durable-records": "^1.430.0",
66
+ "@salesforce/lds-network-adapter": "^1.430.0",
67
+ "@salesforce/lds-network-nimbus": "^1.430.0",
68
+ "@salesforce/lds-store-binary": "^1.430.0",
69
+ "@salesforce/lds-store-nimbus": "^1.430.0",
70
+ "@salesforce/lds-store-sql": "^1.430.0",
71
+ "@salesforce/lds-utils-adapters": "^1.430.0",
72
+ "@salesforce/nimbus-plugin-lds": "^1.430.0",
73
73
  "babel-plugin-dynamic-import-node": "^2.3.3",
74
74
  "wait-for-expect": "^3.0.2"
75
75
  },
@@ -77,7 +77,7 @@
77
77
  {
78
78
  "path": "./dist/main.js",
79
79
  "maxSize": {
80
- "none": "2.35 MB",
80
+ "none": "2.36 MB",
81
81
  "min": "1000 kB",
82
82
  "compressed": "250 kB"
83
83
  }
@@ -85,7 +85,7 @@
85
85
  {
86
86
  "path": "./sfdc/main.js",
87
87
  "maxSize": {
88
- "none": "2.35 MB",
88
+ "none": "2.36 MB",
89
89
  "min": "1000 kB",
90
90
  "compressed": "250 kB"
91
91
  }
package/sfdc/main.js CHANGED
@@ -57870,6 +57870,7 @@ const _FetchNetworkCommand = class _FetchNetworkCommand extends NetworkCommand {
57870
57870
  constructor(services) {
57871
57871
  super(services);
57872
57872
  this.services = services;
57873
+ this.additionalNullResponses = [];
57873
57874
  }
57874
57875
  fetch() {
57875
57876
  try {
@@ -57878,6 +57879,15 @@ const _FetchNetworkCommand = class _FetchNetworkCommand extends NetworkCommand {
57878
57879
  return resolvedPromiseLike$2(err$1(toError(reason)));
57879
57880
  }
57880
57881
  }
57882
+ isSemanticNullResponse(response) {
57883
+ return this.additionalNullResponses.includes(response.status);
57884
+ }
57885
+ isProtocolNoBodyStatus(status) {
57886
+ return status === 204 || status === 205;
57887
+ }
57888
+ isUndeclaredNoBodyResponse(response) {
57889
+ return this.isProtocolNoBodyStatus(response.status) && !this.isSemanticNullResponse(response);
57890
+ }
57881
57891
  async coerceError(errorResponse) {
57882
57892
  return toError(errorResponse.statusText);
57883
57893
  }
@@ -57885,10 +57895,24 @@ const _FetchNetworkCommand = class _FetchNetworkCommand extends NetworkCommand {
57885
57895
  return response.then(
57886
57896
  (response2) => {
57887
57897
  if (response2.ok) {
57888
- return response2.json().then(
57889
- (json) => ok$1(json),
57890
- (reason) => err$1(toError(reason))
57891
- ).finally(() => {
57898
+ let resultPromise;
57899
+ if (this.isSemanticNullResponse(response2)) {
57900
+ resultPromise = Promise.resolve(ok$1(null));
57901
+ } else if (this.isUndeclaredNoBodyResponse(response2)) {
57902
+ resultPromise = Promise.resolve(
57903
+ err$1(
57904
+ toError(
57905
+ `Unexpected ${response2.status} response: no-content status was not declared in the API specification. Declare this response in your OAS without a content property.`
57906
+ )
57907
+ )
57908
+ );
57909
+ } else {
57910
+ resultPromise = response2.json().then(
57911
+ (json) => ok$1(json),
57912
+ (reason) => err$1(toError(reason))
57913
+ );
57914
+ }
57915
+ return resultPromise.finally(() => {
57892
57916
  try {
57893
57917
  this.afterRequestHooks({ statusCode: response2.status });
57894
57918
  } catch {
@@ -57935,6 +57959,7 @@ class HttpCacheControlCommand extends CacheControlCommand {
57935
57959
  constructor(services) {
57936
57960
  super(services);
57937
57961
  this.services = services;
57962
+ this.additionalNullResponses = [];
57938
57963
  }
57939
57964
  requestFromNetwork() {
57940
57965
  return this.fetch();
@@ -57946,6 +57971,15 @@ class HttpCacheControlCommand extends CacheControlCommand {
57946
57971
  return resolvedPromiseLike$2(err$1(toError(reason)));
57947
57972
  }
57948
57973
  }
57974
+ isSemanticNullResponse(response) {
57975
+ return this.additionalNullResponses.includes(response.status);
57976
+ }
57977
+ isProtocolNoBodyStatus(status) {
57978
+ return status === 204 || status === 205;
57979
+ }
57980
+ isUndeclaredNoBodyResponse(response) {
57981
+ return this.isProtocolNoBodyStatus(response.status) && !this.isSemanticNullResponse(response);
57982
+ }
57949
57983
  async coerceError(errorResponse) {
57950
57984
  return toError(errorResponse.statusText);
57951
57985
  }
@@ -57956,12 +57990,26 @@ class HttpCacheControlCommand extends CacheControlCommand {
57956
57990
  return response.then(
57957
57991
  (response2) => {
57958
57992
  if (response2.ok) {
57959
- return response2.json().then(
57960
- (json) => {
57961
- return this.processFetchReturnValue(json);
57962
- },
57963
- (reason) => err$1(toError(reason))
57964
- ).finally(() => {
57993
+ let resultPromise;
57994
+ if (this.isSemanticNullResponse(response2)) {
57995
+ resultPromise = Promise.resolve(ok$1(null));
57996
+ } else if (this.isUndeclaredNoBodyResponse(response2)) {
57997
+ resultPromise = Promise.resolve(
57998
+ err$1(
57999
+ toError(
58000
+ `Unexpected ${response2.status} response: no-content status was not declared in the API specification. Declare this response in your OAS without a content property.`
58001
+ )
58002
+ )
58003
+ );
58004
+ } else {
58005
+ resultPromise = response2.json().then(
58006
+ (json) => {
58007
+ return this.processFetchReturnValue(json);
58008
+ },
58009
+ (reason) => err$1(toError(reason))
58010
+ );
58011
+ }
58012
+ return resultPromise.finally(() => {
57965
58013
  try {
57966
58014
  this.afterRequestHooks({ statusCode: response2.status });
57967
58015
  } catch {
@@ -58949,7 +58997,7 @@ function buildServiceDescriptor$b(luvio) {
58949
58997
  },
58950
58998
  };
58951
58999
  }
58952
- // version: 1.429.0-327e0551f4
59000
+ // version: 1.430.0-8e6a3c46ce
58953
59001
 
58954
59002
  /**
58955
59003
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -58975,7 +59023,7 @@ function buildServiceDescriptor$a(notifyRecordUpdateAvailable, getNormalizedLuvi
58975
59023
  },
58976
59024
  };
58977
59025
  }
58978
- // version: 1.429.0-327e0551f4
59026
+ // version: 1.430.0-8e6a3c46ce
58979
59027
 
58980
59028
  /*!
58981
59029
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -61635,4 +61683,4 @@ register({
61635
61683
  });
61636
61684
 
61637
61685
  export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, ingest$1o as ingestDenormalizedRecordRepresentation, initializeOneStore, registerReportObserver, reportGraphqlQueryParseError };
61638
- // version: 1.429.0-5bd8f9453e
61686
+ // version: 1.430.0-6adb3245d5