@salesforce/lds-runtime-webruntime 1.413.0 → 1.414.1

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, wrapConfigAndVerify, resolveAst, validateGraphQLOperations } from 'force/luvioOnestoreGraphqlParser';
17
+ import { Kind, visit, print, resolveAndValidateGraphQLConfig } 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';
@@ -3312,7 +3312,7 @@ function buildServiceDescriptor$9(luvio) {
3312
3312
  },
3313
3313
  };
3314
3314
  }
3315
- // version: 1.413.0-8cd312301b
3315
+ // version: 1.414.1-06354ce124
3316
3316
 
3317
3317
  /**
3318
3318
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -3338,7 +3338,7 @@ function buildServiceDescriptor$8(notifyRecordUpdateAvailable, getNormalizedLuvi
3338
3338
  },
3339
3339
  };
3340
3340
  }
3341
- // version: 1.413.0-8cd312301b
3341
+ // version: 1.414.1-06354ce124
3342
3342
 
3343
3343
  /*!
3344
3344
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -3943,7 +3943,16 @@ class GraphQLImperativeBindingsService {
3943
3943
  return async (...params) => {
3944
3944
  try {
3945
3945
  if (params.length) {
3946
- params[0] = wrapConfigAndVerify(params[0]);
3946
+ const options = {
3947
+ acceptedOperations: ["query"]
3948
+ };
3949
+ const result = resolveAndValidateGraphQLConfig(params[0], options);
3950
+ if (result == null ? void 0 : result.isErr()) {
3951
+ return result.error;
3952
+ }
3953
+ if (result == null ? void 0 : result.isOk()) {
3954
+ params[0] = result.value;
3955
+ }
3947
3956
  }
3948
3957
  return await buildBaseImperativeInvoker(getCommand, (result) => this.transformResult(result, exposeRefresh))(...params);
3949
3958
  } catch (error) {
@@ -4034,7 +4043,19 @@ function buildServiceDescriptor$2$1() {
4034
4043
  class GraphQLLegacyImperativeBindingsService {
4035
4044
  bind(getCommand) {
4036
4045
  const invoke = async (config, requestContext, callback) => {
4037
- config = wrapConfigAndVerify(config);
4046
+ if (config) {
4047
+ const options = {
4048
+ acceptedOperations: ["query"]
4049
+ };
4050
+ const result = resolveAndValidateGraphQLConfig(config, options);
4051
+ if (result == null ? void 0 : result.isErr()) {
4052
+ callback(result.error);
4053
+ return;
4054
+ }
4055
+ if (result == null ? void 0 : result.isOk()) {
4056
+ config = result.value;
4057
+ }
4058
+ }
4038
4059
  const command = getCommand({ config, assertIsValid });
4039
4060
  try {
4040
4061
  const overrides = getOverridesForLegacyRequestContext(requestContext);
@@ -4063,7 +4084,20 @@ class GraphQLLegacyImperativeBindingsService {
4063
4084
  }
4064
4085
  };
4065
4086
  const subscribe = (config, requestContext, callback) => {
4066
- config = wrapConfigAndVerify(config);
4087
+ if (config) {
4088
+ const options = {
4089
+ acceptedOperations: ["query"]
4090
+ };
4091
+ const result = resolveAndValidateGraphQLConfig(config, options);
4092
+ if (result == null ? void 0 : result.isErr()) {
4093
+ callback(result.error);
4094
+ return () => {
4095
+ };
4096
+ }
4097
+ if (result == null ? void 0 : result.isOk()) {
4098
+ config = result.value;
4099
+ }
4100
+ }
4067
4101
  const command = getCommand({ config, assertIsValid });
4068
4102
  let unsubscribe = () => {
4069
4103
  };
@@ -4112,9 +4146,19 @@ class GraphQLMutationBindingsService {
4112
4146
  return async (...params) => {
4113
4147
  try {
4114
4148
  if (params.length) {
4115
- params[0] = wrapConfigAndVerify(params[0], {
4149
+ const options = {
4116
4150
  acceptedOperations: ["mutation"]
4117
- });
4151
+ };
4152
+ const result2 = resolveAndValidateGraphQLConfig(params[0], options);
4153
+ if (result2 == null ? void 0 : result2.isErr()) {
4154
+ return {
4155
+ data: void 0,
4156
+ errors: result2.error.errors
4157
+ };
4158
+ }
4159
+ if (result2 == null ? void 0 : result2.isOk()) {
4160
+ params[0] = result2.value;
4161
+ }
4118
4162
  }
4119
4163
  const command = getCommand({ params, assertIsValid });
4120
4164
  const result = await command.execute({ cacheControlConfig: { type: "no-cache" } });
@@ -4444,16 +4488,25 @@ class GraphQLCommandWireAdapterConstructor extends CommandWireAdapterConstructor
4444
4488
  }
4445
4489
  update(config, _context) {
4446
4490
  this.unsubscribe();
4447
- const resolvedQuery = resolveAst(config.query);
4448
- if (resolvedQuery) {
4449
- validateGraphQLOperations(
4450
- { query: resolvedQuery, operationName: config == null ? void 0 : config.operationName },
4451
- { acceptedOperations: ["query"] }
4452
- );
4491
+ const options = {
4492
+ acceptedOperations: ["query"]
4493
+ };
4494
+ const result = resolveAndValidateGraphQLConfig(config, options);
4495
+ if (!result) {
4496
+ return;
4497
+ }
4498
+ if (result.isErr()) {
4499
+ const error = result.error;
4500
+ this.callback({
4501
+ data: void 0,
4502
+ errors: error.errors
4503
+ });
4504
+ return;
4453
4505
  }
4506
+ const { query, ...rest } = result.value;
4454
4507
  this.config = {
4455
- ...sanitize(config),
4456
- query: resolvedQuery
4508
+ query,
4509
+ ...sanitize(rest)
4457
4510
  };
4458
4511
  this.invokeAdapter();
4459
4512
  }
@@ -5137,4 +5190,4 @@ withDefaultLuvio((luvio) => {
5137
5190
  ];
5138
5191
  setServices(services);
5139
5192
  });
5140
- // version: 1.413.0-a073c11951
5193
+ // version: 1.414.1-a1d9b7b404
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-webruntime",
3
- "version": "1.413.0",
3
+ "version": "1.414.1",
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.8.0",
39
- "@conduit-client/tools-core": "3.8.0",
38
+ "@conduit-client/service-provisioner": "3.9.0",
39
+ "@conduit-client/tools-core": "3.9.0",
40
40
  "jwt-encode": "1.0.1"
41
41
  },
42
42
  "dependencies": {
43
- "@conduit-client/command-aura-network": "3.8.0",
44
- "@conduit-client/command-aura-normalized-cache-control": "3.8.0",
45
- "@conduit-client/command-aura-resource-cache-control": "3.8.0",
46
- "@conduit-client/command-fetch-network": "3.8.0",
47
- "@conduit-client/command-http-normalized-cache-control": "3.8.0",
48
- "@conduit-client/command-ndjson": "3.8.0",
49
- "@conduit-client/command-network": "3.8.0",
50
- "@conduit-client/command-sse": "3.8.0",
51
- "@conduit-client/command-streaming": "3.8.0",
52
- "@conduit-client/jwt-manager": "3.8.0",
53
- "@conduit-client/service-aura-network": "3.8.0",
54
- "@conduit-client/service-bindings-imperative": "3.8.0",
55
- "@conduit-client/service-bindings-lwc": "3.8.0",
56
- "@conduit-client/service-cache": "3.8.0",
57
- "@conduit-client/service-cache-control": "3.8.0",
58
- "@conduit-client/service-cache-inclusion-policy": "3.8.0",
59
- "@conduit-client/service-fetch-network": "3.8.0",
60
- "@conduit-client/service-instrument-command": "3.8.0",
61
- "@conduit-client/service-pubsub": "3.8.0",
62
- "@conduit-client/service-store": "3.8.0",
63
- "@conduit-client/utils": "3.8.0",
43
+ "@conduit-client/command-aura-network": "3.9.0",
44
+ "@conduit-client/command-aura-normalized-cache-control": "3.9.0",
45
+ "@conduit-client/command-aura-resource-cache-control": "3.9.0",
46
+ "@conduit-client/command-fetch-network": "3.9.0",
47
+ "@conduit-client/command-http-normalized-cache-control": "3.9.0",
48
+ "@conduit-client/command-ndjson": "3.9.0",
49
+ "@conduit-client/command-network": "3.9.0",
50
+ "@conduit-client/command-sse": "3.9.0",
51
+ "@conduit-client/command-streaming": "3.9.0",
52
+ "@conduit-client/jwt-manager": "3.9.0",
53
+ "@conduit-client/service-aura-network": "3.9.0",
54
+ "@conduit-client/service-bindings-imperative": "3.9.0",
55
+ "@conduit-client/service-bindings-lwc": "3.9.0",
56
+ "@conduit-client/service-cache": "3.9.0",
57
+ "@conduit-client/service-cache-control": "3.9.0",
58
+ "@conduit-client/service-cache-inclusion-policy": "3.9.0",
59
+ "@conduit-client/service-fetch-network": "3.9.0",
60
+ "@conduit-client/service-instrument-command": "3.9.0",
61
+ "@conduit-client/service-pubsub": "3.9.0",
62
+ "@conduit-client/service-store": "3.9.0",
63
+ "@conduit-client/utils": "3.9.0",
64
64
  "@luvio/network-adapter-composable": "0.158.7",
65
65
  "@luvio/network-adapter-fetch": "0.158.7",
66
- "@salesforce/lds-adapters-uiapi-lex": "^1.413.0",
67
- "@salesforce/lds-default-luvio": "^1.413.0",
68
- "@salesforce/lds-luvio-service": "^1.413.0",
69
- "@salesforce/lds-luvio-uiapi-records-service": "^1.413.0"
66
+ "@salesforce/lds-adapters-uiapi-lex": "^1.414.1",
67
+ "@salesforce/lds-default-luvio": "^1.414.1",
68
+ "@salesforce/lds-luvio-service": "^1.414.1",
69
+ "@salesforce/lds-luvio-uiapi-records-service": "^1.414.1"
70
70
  },
71
71
  "luvioBundlesize": [
72
72
  {