@salesforce/lds-runtime-webruntime 1.432.0 → 1.434.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.
@@ -14,7 +14,7 @@
14
14
  /* proxy-compat-disable */
15
15
  import { getInstrumentation } from 'o11y/client';
16
16
  import 'force/luvioTypeNormalization1';
17
- import { Kind, visit, print, resolveAndValidateGraphQLConfig } from 'force/luvioOnestoreGraphqlParser';
17
+ import { Kind, visit, print, resolveAndValidateGraphQLConfig, toGraphQLErrorResponse } from 'force/luvioOnestoreGraphqlParser';
18
18
  import { setServices } from 'force/luvioServiceProvisioner1';
19
19
  export { default, resolve, setServices } from 'force/luvioServiceProvisioner1';
20
20
  import { withDefaultLuvio } from 'force/ldsEngine';
@@ -424,16 +424,17 @@ class AuraNetworkCommand extends NetworkCommand$1 {
424
424
  }
425
425
  return ok$2(auraReturnValue);
426
426
  }).catch((error) => {
427
- if (!error || !error.getError) {
427
+ if (!error) {
428
428
  return err$1(toError("Failed to get error from response"));
429
- } else {
430
- const actionErrors = error.getError();
431
- if (actionErrors.length > 0) {
432
- return err$1(coerceError(actionErrors));
433
- } else {
434
- return err$1(toError("Error fetching component"));
435
- }
436
429
  }
430
+ if (!error.getError) {
431
+ return err$1(toError(error));
432
+ }
433
+ const actionErrors = error.getError();
434
+ if (actionErrors.length > 0) {
435
+ return err$1(coerceError(actionErrors));
436
+ }
437
+ return err$1(toError("Error fetching component"));
437
438
  });
438
439
  }
439
440
  convertFetchResponseToData(response) {
@@ -1116,16 +1117,17 @@ let AuraCacheControlCommand$1 = class AuraCacheControlCommand extends CacheContr
1116
1117
  } catch {
1117
1118
  }
1118
1119
  }).catch((error) => {
1119
- if (!error || !error.getError) {
1120
+ if (!error) {
1120
1121
  return err$1(toError("Failed to get error from response"));
1121
- } else {
1122
- const actionErrors = error.getError();
1123
- if (actionErrors.length > 0) {
1124
- return err$1(coerceError(actionErrors));
1125
- } else {
1126
- return err$1(toError("Error fetching component"));
1127
- }
1128
1122
  }
1123
+ if (!error.getError) {
1124
+ return err$1(toError(error));
1125
+ }
1126
+ const actionErrors = error.getError();
1127
+ if (actionErrors.length > 0) {
1128
+ return err$1(coerceError(actionErrors));
1129
+ }
1130
+ return err$1(toError("Error fetching component"));
1129
1131
  });
1130
1132
  }
1131
1133
  convertFetchResponseToData(response) {
@@ -1264,16 +1266,17 @@ class AuraCacheControlCommand extends CacheControlCommand {
1264
1266
  } catch {
1265
1267
  }
1266
1268
  }).catch((error) => {
1267
- if (!error || !error.getError) {
1269
+ if (!error) {
1268
1270
  return err$1(toError("Failed to get error from response"));
1269
- } else {
1270
- const actionErrors = error.getError();
1271
- if (actionErrors.length > 0) {
1272
- return err$1(coerceError(actionErrors));
1273
- } else {
1274
- return err$1(toError("Error fetching component"));
1275
- }
1276
1271
  }
1272
+ if (!error.getError) {
1273
+ return err$1(toError(error));
1274
+ }
1275
+ const actionErrors = error.getError();
1276
+ if (actionErrors.length > 0) {
1277
+ return err$1(coerceError(actionErrors));
1278
+ }
1279
+ return err$1(toError("Error fetching component"));
1277
1280
  });
1278
1281
  }
1279
1282
  convertFetchResponseToData(response) {
@@ -3379,7 +3382,7 @@ function buildServiceDescriptor$9(luvio) {
3379
3382
  },
3380
3383
  };
3381
3384
  }
3382
- // version: 1.432.0-b99ba9d219
3385
+ // version: 1.434.0-6aa2dd15e3
3383
3386
 
3384
3387
  /**
3385
3388
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -3405,7 +3408,7 @@ function buildServiceDescriptor$8(notifyRecordUpdateAvailable, getNormalizedLuvi
3405
3408
  },
3406
3409
  };
3407
3410
  }
3408
- // version: 1.432.0-b99ba9d219
3411
+ // version: 1.434.0-6aa2dd15e3
3409
3412
 
3410
3413
  /*!
3411
3414
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -4023,13 +4026,7 @@ class GraphQLImperativeBindingsService {
4023
4026
  }
4024
4027
  return await buildBaseImperativeInvoker(getCommand, (result) => this.transformResult(result, exposeRefresh))(...params);
4025
4028
  } catch (error) {
4026
- logError$1(error);
4027
- return {
4028
- data: void 0,
4029
- errors: [
4030
- { message: "Internal error in GraphQL adapter occurred", locations: [] }
4031
- ]
4032
- };
4029
+ return toGraphQLErrorResponse(error);
4033
4030
  }
4034
4031
  };
4035
4032
  }
@@ -4123,8 +4120,8 @@ class GraphQLLegacyImperativeBindingsService {
4123
4120
  config = result.value;
4124
4121
  }
4125
4122
  }
4126
- const command = getCommand({ config, assertIsValid });
4127
4123
  try {
4124
+ const command = getCommand({ config, assertIsValid });
4128
4125
  const overrides = getOverridesForLegacyRequestContext(requestContext);
4129
4126
  const result = await command.execute(overrides);
4130
4127
  const consumerEmittedData = {
@@ -4141,13 +4138,7 @@ class GraphQLLegacyImperativeBindingsService {
4141
4138
  }
4142
4139
  callback(consumerEmittedData);
4143
4140
  } catch (error) {
4144
- logError$1(error);
4145
- callback({
4146
- data: void 0,
4147
- errors: [
4148
- { message: "Internal error in GraphQL adapter occurred", locations: [] }
4149
- ]
4150
- });
4141
+ callback(toGraphQLErrorResponse(error));
4151
4142
  }
4152
4143
  };
4153
4144
  const subscribe = (config, requestContext, callback) => {
@@ -4165,35 +4156,41 @@ class GraphQLLegacyImperativeBindingsService {
4165
4156
  config = result.value;
4166
4157
  }
4167
4158
  }
4168
- const command = getCommand({ config, assertIsValid });
4169
4159
  let unsubscribe = () => {
4170
4160
  };
4171
- const overrides = getOverridesForLegacyRequestContext(requestContext);
4172
- command.execute(overrides).then((result) => {
4173
- const consumerEmittedData = {
4174
- data: void 0,
4175
- errors: void 0
4176
- };
4177
- if (result.isOk()) {
4178
- deepFreeze(result.value);
4179
- consumerEmittedData.data = result.value.data.data;
4180
- unsubscribe = result.value.subscribe(
4181
- (res) => {
4182
- handleEmit(res, callback);
4183
- }
4184
- );
4185
- } else {
4186
- const { data, errors } = toGraphQLResponseFromFailure$1(result.error.failure);
4187
- consumerEmittedData.data = data;
4188
- consumerEmittedData.errors = errors;
4189
- unsubscribe = result.error.subscribe(
4190
- (res) => {
4191
- handleEmit(res, callback);
4192
- }
4193
- );
4194
- }
4195
- callback(consumerEmittedData);
4196
- });
4161
+ try {
4162
+ const command = getCommand({ config, assertIsValid });
4163
+ const overrides = getOverridesForLegacyRequestContext(requestContext);
4164
+ command.execute(overrides).then((result) => {
4165
+ const consumerEmittedData = {
4166
+ data: void 0,
4167
+ errors: void 0
4168
+ };
4169
+ if (result.isOk()) {
4170
+ deepFreeze(result.value);
4171
+ consumerEmittedData.data = result.value.data.data;
4172
+ unsubscribe = result.value.subscribe(
4173
+ (res) => {
4174
+ handleEmit(res, callback);
4175
+ }
4176
+ );
4177
+ } else {
4178
+ const { data, errors } = toGraphQLResponseFromFailure$1(
4179
+ result.error.failure
4180
+ );
4181
+ consumerEmittedData.data = data;
4182
+ consumerEmittedData.errors = errors;
4183
+ unsubscribe = result.error.subscribe(
4184
+ (res) => {
4185
+ handleEmit(res, callback);
4186
+ }
4187
+ );
4188
+ }
4189
+ callback(consumerEmittedData);
4190
+ });
4191
+ } catch (error) {
4192
+ callback(toGraphQLErrorResponse(error));
4193
+ }
4197
4194
  return () => {
4198
4195
  unsubscribe();
4199
4196
  };
@@ -4236,13 +4233,7 @@ class GraphQLMutationBindingsService {
4236
4233
  return toGraphQLResponseFromFailure$1(result.error.failure);
4237
4234
  }
4238
4235
  } catch (error) {
4239
- logError$1(error);
4240
- return {
4241
- data: void 0,
4242
- errors: [
4243
- { message: "Internal error in GraphQL adapter occurred", locations: [] }
4244
- ]
4245
- };
4236
+ return toGraphQLErrorResponse(error);
4246
4237
  }
4247
4238
  };
4248
4239
  }
@@ -4402,6 +4393,10 @@ class CommandWireAdapterConstructor {
4402
4393
  if (isIncompleteConfigError(err)) {
4403
4394
  return;
4404
4395
  }
4396
+ if (err instanceof JsonSchemaViolationError) {
4397
+ this.handleConfigSchemaViolation(err);
4398
+ return;
4399
+ }
4405
4400
  throw err;
4406
4401
  }
4407
4402
  }
@@ -4454,6 +4449,16 @@ class CommandWireAdapterConstructor {
4454
4449
  handleExecutionThrow(error) {
4455
4450
  emitError(this.callback, error);
4456
4451
  }
4452
+ /**
4453
+ * Hook for subclasses to handle a JsonSchemaViolationError from the config
4454
+ * schema assertion. The default re-throws so legacy non-GraphQL wire
4455
+ * adapters keep their existing throw behavior. Overrides are expected to
4456
+ * either emit an error result or re-throw — silently returning will
4457
+ * swallow the error.
4458
+ */
4459
+ handleConfigSchemaViolation(error) {
4460
+ throw error;
4461
+ }
4457
4462
  unsubscribe() {
4458
4463
  if (this.unsubscriber) {
4459
4464
  this.unsubscriber();
@@ -4546,16 +4551,14 @@ class GraphQLCommandWireAdapterConstructor extends CommandWireAdapterConstructor
4546
4551
  this.callback(consumerEmittedData);
4547
4552
  }
4548
4553
  } catch (e) {
4549
- logError$1(e);
4550
4554
  this.handleExecutionThrow(e);
4551
4555
  }
4552
4556
  }
4553
- handleExecutionThrow(e) {
4554
- logError$1(e);
4555
- this.callback({
4556
- data: void 0,
4557
- errors: [{ message: "Internal error in GraphQL adapter occurred", locations: [] }]
4558
- });
4557
+ handleExecutionThrow(error) {
4558
+ this.callback(toGraphQLErrorResponse(error));
4559
+ }
4560
+ handleConfigSchemaViolation(error) {
4561
+ this.handleExecutionThrow(error);
4559
4562
  }
4560
4563
  update(config, _context) {
4561
4564
  this.unsubscribe();
@@ -5261,4 +5264,4 @@ withDefaultLuvio((luvio) => {
5261
5264
  ];
5262
5265
  setServices(services);
5263
5266
  });
5264
- // version: 1.432.0-a57c62b660
5267
+ // version: 1.434.0-d8deb0d4ea
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-webruntime",
3
- "version": "1.432.0",
3
+ "version": "1.434.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS engine for Webruntime runtime",
6
6
  "main": "dist/ldsWebruntimeOneStoreInit.js",
@@ -35,38 +35,38 @@
35
35
  "ready": "yarn build && jest --collectCoverage && yarn test:size && yarn release:corejar"
36
36
  },
37
37
  "devDependencies": {
38
- "@conduit-client/service-provisioner": "3.19.2",
39
- "@conduit-client/tools-core": "3.19.2",
38
+ "@conduit-client/service-provisioner": "3.19.4",
39
+ "@conduit-client/tools-core": "3.19.4",
40
40
  "jwt-encode": "1.0.1"
41
41
  },
42
42
  "dependencies": {
43
- "@conduit-client/command-aura-network": "3.19.2",
44
- "@conduit-client/command-aura-normalized-cache-control": "3.19.2",
45
- "@conduit-client/command-aura-resource-cache-control": "3.19.2",
46
- "@conduit-client/command-fetch-network": "3.19.2",
47
- "@conduit-client/command-http-normalized-cache-control": "3.19.2",
48
- "@conduit-client/command-ndjson": "3.19.2",
49
- "@conduit-client/command-network": "3.19.2",
50
- "@conduit-client/command-sse": "3.19.2",
51
- "@conduit-client/command-streaming": "3.19.2",
52
- "@conduit-client/jwt-manager": "3.19.2",
53
- "@conduit-client/service-aura-network": "3.19.2",
54
- "@conduit-client/service-bindings-imperative": "3.19.2",
55
- "@conduit-client/service-bindings-lwc": "3.19.2",
56
- "@conduit-client/service-cache": "3.19.2",
57
- "@conduit-client/service-cache-control": "3.19.2",
58
- "@conduit-client/service-cache-inclusion-policy": "3.19.2",
59
- "@conduit-client/service-fetch-network": "3.19.2",
60
- "@conduit-client/service-instrument-command": "3.19.2",
61
- "@conduit-client/service-pubsub": "3.19.2",
62
- "@conduit-client/service-store": "3.19.2",
63
- "@conduit-client/utils": "3.19.2",
43
+ "@conduit-client/command-aura-network": "3.19.4",
44
+ "@conduit-client/command-aura-normalized-cache-control": "3.19.4",
45
+ "@conduit-client/command-aura-resource-cache-control": "3.19.4",
46
+ "@conduit-client/command-fetch-network": "3.19.4",
47
+ "@conduit-client/command-http-normalized-cache-control": "3.19.4",
48
+ "@conduit-client/command-ndjson": "3.19.4",
49
+ "@conduit-client/command-network": "3.19.4",
50
+ "@conduit-client/command-sse": "3.19.4",
51
+ "@conduit-client/command-streaming": "3.19.4",
52
+ "@conduit-client/jwt-manager": "3.19.4",
53
+ "@conduit-client/service-aura-network": "3.19.4",
54
+ "@conduit-client/service-bindings-imperative": "3.19.4",
55
+ "@conduit-client/service-bindings-lwc": "3.19.4",
56
+ "@conduit-client/service-cache": "3.19.4",
57
+ "@conduit-client/service-cache-control": "3.19.4",
58
+ "@conduit-client/service-cache-inclusion-policy": "3.19.4",
59
+ "@conduit-client/service-fetch-network": "3.19.4",
60
+ "@conduit-client/service-instrument-command": "3.19.4",
61
+ "@conduit-client/service-pubsub": "3.19.4",
62
+ "@conduit-client/service-store": "3.19.4",
63
+ "@conduit-client/utils": "3.19.4",
64
64
  "@luvio/network-adapter-composable": "0.160.4",
65
65
  "@luvio/network-adapter-fetch": "0.160.4",
66
66
  "@salesforce/lds-adapters-uiapi-lex": "^1.415.0",
67
- "@salesforce/lds-default-luvio": "^1.432.0",
68
- "@salesforce/lds-luvio-service": "^1.432.0",
69
- "@salesforce/lds-luvio-uiapi-records-service": "^1.432.0"
67
+ "@salesforce/lds-default-luvio": "^1.434.0",
68
+ "@salesforce/lds-luvio-service": "^1.434.0",
69
+ "@salesforce/lds-luvio-uiapi-records-service": "^1.434.0"
70
70
  },
71
71
  "luvioBundlesize": [
72
72
  {