@salesforce/lds-runtime-mobile 1.428.0-dev21 → 1.428.0-dev22

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 +31 -7
  2. package/package.json +34 -34
  3. package/sfdc/main.js +31 -7
package/dist/main.js CHANGED
@@ -57025,6 +57025,7 @@ class AuraNetworkCommand extends NetworkCommand$1 {
57025
57025
  storable: false
57026
57026
  };
57027
57027
  this.networkPreference = "aura";
57028
+ this.additionalNullResponses = [];
57028
57029
  }
57029
57030
  get fetchParams() {
57030
57031
  throw new Error(
@@ -57061,14 +57062,37 @@ class AuraNetworkCommand extends NetworkCommand$1 {
57061
57062
  }
57062
57063
  });
57063
57064
  }
57065
+ isSemanticNullResponse(response) {
57066
+ return this.additionalNullResponses.includes(response.status);
57067
+ }
57068
+ isProtocolNoBodyStatus(status) {
57069
+ return status === 204 || status === 205;
57070
+ }
57071
+ isUndeclaredNoBodyResponse(response) {
57072
+ return this.isProtocolNoBodyStatus(response.status) && !this.isSemanticNullResponse(response);
57073
+ }
57064
57074
  convertFetchResponseToData(response) {
57065
57075
  return response.then(
57066
57076
  (response2) => {
57067
57077
  if (response2.ok) {
57068
- return response2.json().then(
57069
- (json) => ok$1(json),
57070
- (reason) => err$1(toError(reason))
57071
- ).finally(() => {
57078
+ let resultPromise;
57079
+ if (this.isSemanticNullResponse(response2)) {
57080
+ resultPromise = Promise.resolve(ok$1(null));
57081
+ } else if (this.isUndeclaredNoBodyResponse(response2)) {
57082
+ resultPromise = Promise.resolve(
57083
+ err$1(
57084
+ toError(
57085
+ `Unexpected ${response2.status} response: no-content status was not declared in the API specification. Declare this response in your OAS without a content property.`
57086
+ )
57087
+ )
57088
+ );
57089
+ } else {
57090
+ resultPromise = response2.json().then(
57091
+ (json) => ok$1(json),
57092
+ (reason) => err$1(toError(reason))
57093
+ );
57094
+ }
57095
+ return resultPromise.finally(() => {
57072
57096
  try {
57073
57097
  this.afterRequestHooks({ statusCode: response2.status });
57074
57098
  } catch {
@@ -59224,7 +59248,7 @@ function buildServiceDescriptor$b(luvio) {
59224
59248
  },
59225
59249
  };
59226
59250
  }
59227
- // version: 1.428.0-dev21-133a7da4f5
59251
+ // version: 1.428.0-dev22-bfcb919e66
59228
59252
 
59229
59253
  /**
59230
59254
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -59250,7 +59274,7 @@ function buildServiceDescriptor$a(notifyRecordUpdateAvailable, getNormalizedLuvi
59250
59274
  },
59251
59275
  };
59252
59276
  }
59253
- // version: 1.428.0-dev21-133a7da4f5
59277
+ // version: 1.428.0-dev22-bfcb919e66
59254
59278
 
59255
59279
  /*!
59256
59280
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -61987,4 +62011,4 @@ register({
61987
62011
  });
61988
62012
 
61989
62013
  export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, ingest$1o as ingestDenormalizedRecordRepresentation, initializeOneStore, registerReportObserver, reportGraphqlQueryParseError };
61990
- // version: 1.428.0-dev21-c9faba50c9
62014
+ // version: 1.428.0-dev22-319313a317
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-mobile",
3
- "version": "1.428.0-dev21",
3
+ "version": "1.428.0-dev22",
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-dev3",
36
- "@conduit-client/service-bindings-lwc": "3.19.0-dev3",
37
- "@conduit-client/service-provisioner": "3.19.0-dev3",
38
- "@salesforce/lds-adapters-uiapi": "^1.428.0-dev21",
39
- "@salesforce/lds-bindings": "^1.428.0-dev21",
40
- "@salesforce/lds-instrumentation": "^1.428.0-dev21",
41
- "@salesforce/lds-luvio-service": "^1.428.0-dev21",
42
- "@salesforce/lds-luvio-uiapi-records-service": "^1.428.0-dev21",
35
+ "@conduit-client/service-bindings-imperative": "3.19.0-dev4",
36
+ "@conduit-client/service-bindings-lwc": "3.19.0-dev4",
37
+ "@conduit-client/service-provisioner": "3.19.0-dev4",
38
+ "@salesforce/lds-adapters-uiapi": "^1.428.0-dev22",
39
+ "@salesforce/lds-bindings": "^1.428.0-dev22",
40
+ "@salesforce/lds-instrumentation": "^1.428.0-dev22",
41
+ "@salesforce/lds-luvio-service": "^1.428.0-dev22",
42
+ "@salesforce/lds-luvio-uiapi-records-service": "^1.428.0-dev22",
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-dev3",
49
- "@conduit-client/command-aura-normalized-cache-control": "3.19.0-dev3",
50
- "@conduit-client/command-aura-resource-cache-control": "3.19.0-dev3",
51
- "@conduit-client/command-fetch-network": "3.19.0-dev3",
52
- "@conduit-client/command-http-normalized-cache-control": "3.19.0-dev3",
53
- "@conduit-client/command-network": "3.19.0-dev3",
54
- "@conduit-client/service-cache": "3.19.0-dev3",
55
- "@conduit-client/service-cache-control": "3.19.0-dev3",
56
- "@conduit-client/service-cache-inclusion-policy": "3.19.0-dev3",
57
- "@conduit-client/service-fetch-network": "3.19.0-dev3",
58
- "@conduit-client/service-instrument-command": "3.19.0-dev3",
59
- "@conduit-client/service-instrumentation": "3.19.0-dev3",
60
- "@conduit-client/service-pubsub": "3.19.0-dev3",
61
- "@conduit-client/service-store": "3.19.0-dev3",
62
- "@conduit-client/utils": "3.19.0-dev3",
63
- "@salesforce/lds-adapters-graphql": "^1.428.0-dev21",
64
- "@salesforce/lds-drafts": "^1.428.0-dev21",
65
- "@salesforce/lds-durable-records": "^1.428.0-dev21",
66
- "@salesforce/lds-network-adapter": "^1.428.0-dev21",
67
- "@salesforce/lds-network-nimbus": "^1.428.0-dev21",
68
- "@salesforce/lds-store-binary": "^1.428.0-dev21",
69
- "@salesforce/lds-store-nimbus": "^1.428.0-dev21",
70
- "@salesforce/lds-store-sql": "^1.428.0-dev21",
71
- "@salesforce/lds-utils-adapters": "^1.428.0-dev21",
72
- "@salesforce/nimbus-plugin-lds": "^1.428.0-dev21",
48
+ "@conduit-client/command-aura-network": "3.19.0-dev4",
49
+ "@conduit-client/command-aura-normalized-cache-control": "3.19.0-dev4",
50
+ "@conduit-client/command-aura-resource-cache-control": "3.19.0-dev4",
51
+ "@conduit-client/command-fetch-network": "3.19.0-dev4",
52
+ "@conduit-client/command-http-normalized-cache-control": "3.19.0-dev4",
53
+ "@conduit-client/command-network": "3.19.0-dev4",
54
+ "@conduit-client/service-cache": "3.19.0-dev4",
55
+ "@conduit-client/service-cache-control": "3.19.0-dev4",
56
+ "@conduit-client/service-cache-inclusion-policy": "3.19.0-dev4",
57
+ "@conduit-client/service-fetch-network": "3.19.0-dev4",
58
+ "@conduit-client/service-instrument-command": "3.19.0-dev4",
59
+ "@conduit-client/service-instrumentation": "3.19.0-dev4",
60
+ "@conduit-client/service-pubsub": "3.19.0-dev4",
61
+ "@conduit-client/service-store": "3.19.0-dev4",
62
+ "@conduit-client/utils": "3.19.0-dev4",
63
+ "@salesforce/lds-adapters-graphql": "^1.428.0-dev22",
64
+ "@salesforce/lds-drafts": "^1.428.0-dev22",
65
+ "@salesforce/lds-durable-records": "^1.428.0-dev22",
66
+ "@salesforce/lds-network-adapter": "^1.428.0-dev22",
67
+ "@salesforce/lds-network-nimbus": "^1.428.0-dev22",
68
+ "@salesforce/lds-store-binary": "^1.428.0-dev22",
69
+ "@salesforce/lds-store-nimbus": "^1.428.0-dev22",
70
+ "@salesforce/lds-store-sql": "^1.428.0-dev22",
71
+ "@salesforce/lds-utils-adapters": "^1.428.0-dev22",
72
+ "@salesforce/nimbus-plugin-lds": "^1.428.0-dev22",
73
73
  "babel-plugin-dynamic-import-node": "^2.3.3",
74
74
  "wait-for-expect": "^3.0.2"
75
75
  },
package/sfdc/main.js CHANGED
@@ -57025,6 +57025,7 @@ class AuraNetworkCommand extends NetworkCommand$1 {
57025
57025
  storable: false
57026
57026
  };
57027
57027
  this.networkPreference = "aura";
57028
+ this.additionalNullResponses = [];
57028
57029
  }
57029
57030
  get fetchParams() {
57030
57031
  throw new Error(
@@ -57061,14 +57062,37 @@ class AuraNetworkCommand extends NetworkCommand$1 {
57061
57062
  }
57062
57063
  });
57063
57064
  }
57065
+ isSemanticNullResponse(response) {
57066
+ return this.additionalNullResponses.includes(response.status);
57067
+ }
57068
+ isProtocolNoBodyStatus(status) {
57069
+ return status === 204 || status === 205;
57070
+ }
57071
+ isUndeclaredNoBodyResponse(response) {
57072
+ return this.isProtocolNoBodyStatus(response.status) && !this.isSemanticNullResponse(response);
57073
+ }
57064
57074
  convertFetchResponseToData(response) {
57065
57075
  return response.then(
57066
57076
  (response2) => {
57067
57077
  if (response2.ok) {
57068
- return response2.json().then(
57069
- (json) => ok$1(json),
57070
- (reason) => err$1(toError(reason))
57071
- ).finally(() => {
57078
+ let resultPromise;
57079
+ if (this.isSemanticNullResponse(response2)) {
57080
+ resultPromise = Promise.resolve(ok$1(null));
57081
+ } else if (this.isUndeclaredNoBodyResponse(response2)) {
57082
+ resultPromise = Promise.resolve(
57083
+ err$1(
57084
+ toError(
57085
+ `Unexpected ${response2.status} response: no-content status was not declared in the API specification. Declare this response in your OAS without a content property.`
57086
+ )
57087
+ )
57088
+ );
57089
+ } else {
57090
+ resultPromise = response2.json().then(
57091
+ (json) => ok$1(json),
57092
+ (reason) => err$1(toError(reason))
57093
+ );
57094
+ }
57095
+ return resultPromise.finally(() => {
57072
57096
  try {
57073
57097
  this.afterRequestHooks({ statusCode: response2.status });
57074
57098
  } catch {
@@ -59224,7 +59248,7 @@ function buildServiceDescriptor$b(luvio) {
59224
59248
  },
59225
59249
  };
59226
59250
  }
59227
- // version: 1.428.0-dev21-133a7da4f5
59251
+ // version: 1.428.0-dev22-bfcb919e66
59228
59252
 
59229
59253
  /**
59230
59254
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -59250,7 +59274,7 @@ function buildServiceDescriptor$a(notifyRecordUpdateAvailable, getNormalizedLuvi
59250
59274
  },
59251
59275
  };
59252
59276
  }
59253
- // version: 1.428.0-dev21-133a7da4f5
59277
+ // version: 1.428.0-dev22-bfcb919e66
59254
59278
 
59255
59279
  /*!
59256
59280
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -61987,4 +62011,4 @@ register({
61987
62011
  });
61988
62012
 
61989
62013
  export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, ingest$1o as ingestDenormalizedRecordRepresentation, initializeOneStore, registerReportObserver, reportGraphqlQueryParseError };
61990
- // version: 1.428.0-dev21-c9faba50c9
62014
+ // version: 1.428.0-dev22-319313a317