@salesforce/lds-runtime-webruntime 1.433.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';
@@ -3382,7 +3382,7 @@ function buildServiceDescriptor$9(luvio) {
3382
3382
  },
3383
3383
  };
3384
3384
  }
3385
- // version: 1.433.0-db129b48d2
3385
+ // version: 1.434.0-6aa2dd15e3
3386
3386
 
3387
3387
  /**
3388
3388
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -3408,7 +3408,7 @@ function buildServiceDescriptor$8(notifyRecordUpdateAvailable, getNormalizedLuvi
3408
3408
  },
3409
3409
  };
3410
3410
  }
3411
- // version: 1.433.0-db129b48d2
3411
+ // version: 1.434.0-6aa2dd15e3
3412
3412
 
3413
3413
  /*!
3414
3414
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -4026,13 +4026,7 @@ class GraphQLImperativeBindingsService {
4026
4026
  }
4027
4027
  return await buildBaseImperativeInvoker(getCommand, (result) => this.transformResult(result, exposeRefresh))(...params);
4028
4028
  } catch (error) {
4029
- logError$1(error);
4030
- return {
4031
- data: void 0,
4032
- errors: [
4033
- { message: "Internal error in GraphQL adapter occurred", locations: [] }
4034
- ]
4035
- };
4029
+ return toGraphQLErrorResponse(error);
4036
4030
  }
4037
4031
  };
4038
4032
  }
@@ -4126,8 +4120,8 @@ class GraphQLLegacyImperativeBindingsService {
4126
4120
  config = result.value;
4127
4121
  }
4128
4122
  }
4129
- const command = getCommand({ config, assertIsValid });
4130
4123
  try {
4124
+ const command = getCommand({ config, assertIsValid });
4131
4125
  const overrides = getOverridesForLegacyRequestContext(requestContext);
4132
4126
  const result = await command.execute(overrides);
4133
4127
  const consumerEmittedData = {
@@ -4144,13 +4138,7 @@ class GraphQLLegacyImperativeBindingsService {
4144
4138
  }
4145
4139
  callback(consumerEmittedData);
4146
4140
  } catch (error) {
4147
- logError$1(error);
4148
- callback({
4149
- data: void 0,
4150
- errors: [
4151
- { message: "Internal error in GraphQL adapter occurred", locations: [] }
4152
- ]
4153
- });
4141
+ callback(toGraphQLErrorResponse(error));
4154
4142
  }
4155
4143
  };
4156
4144
  const subscribe = (config, requestContext, callback) => {
@@ -4168,35 +4156,41 @@ class GraphQLLegacyImperativeBindingsService {
4168
4156
  config = result.value;
4169
4157
  }
4170
4158
  }
4171
- const command = getCommand({ config, assertIsValid });
4172
4159
  let unsubscribe = () => {
4173
4160
  };
4174
- const overrides = getOverridesForLegacyRequestContext(requestContext);
4175
- command.execute(overrides).then((result) => {
4176
- const consumerEmittedData = {
4177
- data: void 0,
4178
- errors: void 0
4179
- };
4180
- if (result.isOk()) {
4181
- deepFreeze(result.value);
4182
- consumerEmittedData.data = result.value.data.data;
4183
- unsubscribe = result.value.subscribe(
4184
- (res) => {
4185
- handleEmit(res, callback);
4186
- }
4187
- );
4188
- } else {
4189
- const { data, errors } = toGraphQLResponseFromFailure$1(result.error.failure);
4190
- consumerEmittedData.data = data;
4191
- consumerEmittedData.errors = errors;
4192
- unsubscribe = result.error.subscribe(
4193
- (res) => {
4194
- handleEmit(res, callback);
4195
- }
4196
- );
4197
- }
4198
- callback(consumerEmittedData);
4199
- });
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
+ }
4200
4194
  return () => {
4201
4195
  unsubscribe();
4202
4196
  };
@@ -4239,13 +4233,7 @@ class GraphQLMutationBindingsService {
4239
4233
  return toGraphQLResponseFromFailure$1(result.error.failure);
4240
4234
  }
4241
4235
  } catch (error) {
4242
- logError$1(error);
4243
- return {
4244
- data: void 0,
4245
- errors: [
4246
- { message: "Internal error in GraphQL adapter occurred", locations: [] }
4247
- ]
4248
- };
4236
+ return toGraphQLErrorResponse(error);
4249
4237
  }
4250
4238
  };
4251
4239
  }
@@ -4405,6 +4393,10 @@ class CommandWireAdapterConstructor {
4405
4393
  if (isIncompleteConfigError(err)) {
4406
4394
  return;
4407
4395
  }
4396
+ if (err instanceof JsonSchemaViolationError) {
4397
+ this.handleConfigSchemaViolation(err);
4398
+ return;
4399
+ }
4408
4400
  throw err;
4409
4401
  }
4410
4402
  }
@@ -4457,6 +4449,16 @@ class CommandWireAdapterConstructor {
4457
4449
  handleExecutionThrow(error) {
4458
4450
  emitError(this.callback, error);
4459
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
+ }
4460
4462
  unsubscribe() {
4461
4463
  if (this.unsubscriber) {
4462
4464
  this.unsubscriber();
@@ -4549,16 +4551,14 @@ class GraphQLCommandWireAdapterConstructor extends CommandWireAdapterConstructor
4549
4551
  this.callback(consumerEmittedData);
4550
4552
  }
4551
4553
  } catch (e) {
4552
- logError$1(e);
4553
4554
  this.handleExecutionThrow(e);
4554
4555
  }
4555
4556
  }
4556
- handleExecutionThrow(e) {
4557
- logError$1(e);
4558
- this.callback({
4559
- data: void 0,
4560
- errors: [{ message: "Internal error in GraphQL adapter occurred", locations: [] }]
4561
- });
4557
+ handleExecutionThrow(error) {
4558
+ this.callback(toGraphQLErrorResponse(error));
4559
+ }
4560
+ handleConfigSchemaViolation(error) {
4561
+ this.handleExecutionThrow(error);
4562
4562
  }
4563
4563
  update(config, _context) {
4564
4564
  this.unsubscribe();
@@ -5264,4 +5264,4 @@ withDefaultLuvio((luvio) => {
5264
5264
  ];
5265
5265
  setServices(services);
5266
5266
  });
5267
- // version: 1.433.0-8a15a98f24
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.433.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.3",
39
- "@conduit-client/tools-core": "3.19.3",
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.3",
44
- "@conduit-client/command-aura-normalized-cache-control": "3.19.3",
45
- "@conduit-client/command-aura-resource-cache-control": "3.19.3",
46
- "@conduit-client/command-fetch-network": "3.19.3",
47
- "@conduit-client/command-http-normalized-cache-control": "3.19.3",
48
- "@conduit-client/command-ndjson": "3.19.3",
49
- "@conduit-client/command-network": "3.19.3",
50
- "@conduit-client/command-sse": "3.19.3",
51
- "@conduit-client/command-streaming": "3.19.3",
52
- "@conduit-client/jwt-manager": "3.19.3",
53
- "@conduit-client/service-aura-network": "3.19.3",
54
- "@conduit-client/service-bindings-imperative": "3.19.3",
55
- "@conduit-client/service-bindings-lwc": "3.19.3",
56
- "@conduit-client/service-cache": "3.19.3",
57
- "@conduit-client/service-cache-control": "3.19.3",
58
- "@conduit-client/service-cache-inclusion-policy": "3.19.3",
59
- "@conduit-client/service-fetch-network": "3.19.3",
60
- "@conduit-client/service-instrument-command": "3.19.3",
61
- "@conduit-client/service-pubsub": "3.19.3",
62
- "@conduit-client/service-store": "3.19.3",
63
- "@conduit-client/utils": "3.19.3",
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.433.0",
68
- "@salesforce/lds-luvio-service": "^1.433.0",
69
- "@salesforce/lds-luvio-uiapi-records-service": "^1.433.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
  {