@salesforce/lds-runtime-mobile 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.
Files changed (3) hide show
  1. package/dist/main.js +71 -18
  2. package/package.json +34 -34
  3. package/sfdc/main.js +71 -18
package/dist/main.js CHANGED
@@ -45,7 +45,7 @@ import graphqlL2AdapterGate from '@salesforce/gate/lmr.graphqlL2Adapter';
45
45
  import useOneStore from '@salesforce/gate/lmr.useOneStore';
46
46
  import { setServices } from '@conduit-client/service-provisioner/v1';
47
47
  import '@conduit-client/type-normalization/v1';
48
- import { Kind as Kind$2, visit as visit$2, print as print$1, wrapConfigAndVerify, resolveAst, validateGraphQLOperations } from '@conduit-client/onestore-graphql-parser/v1';
48
+ import { Kind as Kind$2, visit as visit$2, print as print$1, resolveAndValidateGraphQLConfig } from '@conduit-client/onestore-graphql-parser/v1';
49
49
  import productConsumedSideEffects from '@salesforce/gate/com.salesforce.fieldservice.vanStockLDSBypass256';
50
50
 
51
51
  /**
@@ -52081,7 +52081,7 @@ function instrumentAdapter(adapter, metadata) {
52081
52081
  }
52082
52082
  if (pdpEventSchema) {
52083
52083
  ldsInstrumentation.log(pdpEventSchema, {
52084
- event_name: 'lsdkLDSAdapter.invoked',
52084
+ event_name: 'lsdkLdsAdapter.invoked',
52085
52085
  productFeatureId: VERTICAL_NAV_FEATURE_ID,
52086
52086
  contextName: metadata.name,
52087
52087
  });
@@ -58420,7 +58420,7 @@ function buildServiceDescriptor$b(luvio) {
58420
58420
  },
58421
58421
  };
58422
58422
  }
58423
- // version: 1.413.0-8cd312301b
58423
+ // version: 1.414.1-06354ce124
58424
58424
 
58425
58425
  /**
58426
58426
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -58446,7 +58446,7 @@ function buildServiceDescriptor$a(notifyRecordUpdateAvailable, getNormalizedLuvi
58446
58446
  },
58447
58447
  };
58448
58448
  }
58449
- // version: 1.413.0-8cd312301b
58449
+ // version: 1.414.1-06354ce124
58450
58450
 
58451
58451
  /*!
58452
58452
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -59449,7 +59449,16 @@ class GraphQLImperativeBindingsService {
59449
59449
  return async (...params) => {
59450
59450
  try {
59451
59451
  if (params.length) {
59452
- params[0] = wrapConfigAndVerify(params[0]);
59452
+ const options = {
59453
+ acceptedOperations: ["query"]
59454
+ };
59455
+ const result = resolveAndValidateGraphQLConfig(params[0], options);
59456
+ if (result == null ? void 0 : result.isErr()) {
59457
+ return result.error;
59458
+ }
59459
+ if (result == null ? void 0 : result.isOk()) {
59460
+ params[0] = result.value;
59461
+ }
59453
59462
  }
59454
59463
  return await buildBaseImperativeInvoker(getCommand, (result) => this.transformResult(result, exposeRefresh))(...params);
59455
59464
  } catch (error) {
@@ -59540,7 +59549,19 @@ function buildServiceDescriptor$2$1() {
59540
59549
  class GraphQLLegacyImperativeBindingsService {
59541
59550
  bind(getCommand) {
59542
59551
  const invoke = async (config, requestContext, callback) => {
59543
- config = wrapConfigAndVerify(config);
59552
+ if (config) {
59553
+ const options = {
59554
+ acceptedOperations: ["query"]
59555
+ };
59556
+ const result = resolveAndValidateGraphQLConfig(config, options);
59557
+ if (result == null ? void 0 : result.isErr()) {
59558
+ callback(result.error);
59559
+ return;
59560
+ }
59561
+ if (result == null ? void 0 : result.isOk()) {
59562
+ config = result.value;
59563
+ }
59564
+ }
59544
59565
  const command = getCommand({ config, assertIsValid });
59545
59566
  try {
59546
59567
  const overrides = getOverridesForLegacyRequestContext(requestContext);
@@ -59569,7 +59590,20 @@ class GraphQLLegacyImperativeBindingsService {
59569
59590
  }
59570
59591
  };
59571
59592
  const subscribe = (config, requestContext, callback) => {
59572
- config = wrapConfigAndVerify(config);
59593
+ if (config) {
59594
+ const options = {
59595
+ acceptedOperations: ["query"]
59596
+ };
59597
+ const result = resolveAndValidateGraphQLConfig(config, options);
59598
+ if (result == null ? void 0 : result.isErr()) {
59599
+ callback(result.error);
59600
+ return () => {
59601
+ };
59602
+ }
59603
+ if (result == null ? void 0 : result.isOk()) {
59604
+ config = result.value;
59605
+ }
59606
+ }
59573
59607
  const command = getCommand({ config, assertIsValid });
59574
59608
  let unsubscribe = () => {
59575
59609
  };
@@ -59618,9 +59652,19 @@ class GraphQLMutationBindingsService {
59618
59652
  return async (...params) => {
59619
59653
  try {
59620
59654
  if (params.length) {
59621
- params[0] = wrapConfigAndVerify(params[0], {
59655
+ const options = {
59622
59656
  acceptedOperations: ["mutation"]
59623
- });
59657
+ };
59658
+ const result2 = resolveAndValidateGraphQLConfig(params[0], options);
59659
+ if (result2 == null ? void 0 : result2.isErr()) {
59660
+ return {
59661
+ data: void 0,
59662
+ errors: result2.error.errors
59663
+ };
59664
+ }
59665
+ if (result2 == null ? void 0 : result2.isOk()) {
59666
+ params[0] = result2.value;
59667
+ }
59624
59668
  }
59625
59669
  const command = getCommand({ params, assertIsValid });
59626
59670
  const result = await command.execute({ cacheControlConfig: { type: "no-cache" } });
@@ -59950,16 +59994,25 @@ class GraphQLCommandWireAdapterConstructor extends CommandWireAdapterConstructor
59950
59994
  }
59951
59995
  update(config, _context) {
59952
59996
  this.unsubscribe();
59953
- const resolvedQuery = resolveAst(config.query);
59954
- if (resolvedQuery) {
59955
- validateGraphQLOperations(
59956
- { query: resolvedQuery, operationName: config == null ? void 0 : config.operationName },
59957
- { acceptedOperations: ["query"] }
59958
- );
59997
+ const options = {
59998
+ acceptedOperations: ["query"]
59999
+ };
60000
+ const result = resolveAndValidateGraphQLConfig(config, options);
60001
+ if (!result) {
60002
+ return;
60003
+ }
60004
+ if (result.isErr()) {
60005
+ const error = result.error;
60006
+ this.callback({
60007
+ data: void 0,
60008
+ errors: error.errors
60009
+ });
60010
+ return;
59959
60011
  }
60012
+ const { query, ...rest } = result.value;
59960
60013
  this.config = {
59961
- ...sanitize(config),
59962
- query: resolvedQuery
60014
+ query,
60015
+ ...sanitize(rest)
59963
60016
  };
59964
60017
  this.invokeAdapter();
59965
60018
  }
@@ -61034,4 +61087,4 @@ register({
61034
61087
  });
61035
61088
 
61036
61089
  export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, ingest$1o as ingestDenormalizedRecordRepresentation, initializeOneStore, registerReportObserver, reportGraphqlQueryParseError };
61037
- // version: 1.413.0-a073c11951
61090
+ // version: 1.414.1-a1d9b7b404
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-mobile",
3
- "version": "1.413.0",
3
+ "version": "1.414.1",
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.8.0",
36
- "@conduit-client/service-bindings-lwc": "3.8.0",
37
- "@conduit-client/service-provisioner": "3.8.0",
38
- "@salesforce/lds-adapters-uiapi": "^1.413.0",
39
- "@salesforce/lds-bindings": "^1.413.0",
40
- "@salesforce/lds-instrumentation": "^1.413.0",
41
- "@salesforce/lds-luvio-service": "^1.413.0",
42
- "@salesforce/lds-luvio-uiapi-records-service": "^1.413.0",
35
+ "@conduit-client/service-bindings-imperative": "3.9.0",
36
+ "@conduit-client/service-bindings-lwc": "3.9.0",
37
+ "@conduit-client/service-provisioner": "3.9.0",
38
+ "@salesforce/lds-adapters-uiapi": "^1.414.1",
39
+ "@salesforce/lds-bindings": "^1.414.1",
40
+ "@salesforce/lds-instrumentation": "^1.414.1",
41
+ "@salesforce/lds-luvio-service": "^1.414.1",
42
+ "@salesforce/lds-luvio-uiapi-records-service": "^1.414.1",
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.8.0",
49
- "@conduit-client/command-aura-normalized-cache-control": "3.8.0",
50
- "@conduit-client/command-aura-resource-cache-control": "3.8.0",
51
- "@conduit-client/command-fetch-network": "3.8.0",
52
- "@conduit-client/command-http-normalized-cache-control": "3.8.0",
53
- "@conduit-client/command-network": "3.8.0",
54
- "@conduit-client/service-cache": "3.8.0",
55
- "@conduit-client/service-cache-control": "3.8.0",
56
- "@conduit-client/service-cache-inclusion-policy": "3.8.0",
57
- "@conduit-client/service-fetch-network": "3.8.0",
58
- "@conduit-client/service-instrument-command": "3.8.0",
59
- "@conduit-client/service-instrumentation": "3.8.0",
60
- "@conduit-client/service-pubsub": "3.8.0",
61
- "@conduit-client/service-store": "3.8.0",
62
- "@conduit-client/utils": "3.8.0",
63
- "@salesforce/lds-adapters-graphql": "^1.413.0",
64
- "@salesforce/lds-drafts": "^1.413.0",
65
- "@salesforce/lds-durable-records": "^1.413.0",
66
- "@salesforce/lds-network-adapter": "^1.413.0",
67
- "@salesforce/lds-network-nimbus": "^1.413.0",
68
- "@salesforce/lds-store-binary": "^1.413.0",
69
- "@salesforce/lds-store-nimbus": "^1.413.0",
70
- "@salesforce/lds-store-sql": "^1.413.0",
71
- "@salesforce/lds-utils-adapters": "^1.413.0",
72
- "@salesforce/nimbus-plugin-lds": "^1.413.0",
48
+ "@conduit-client/command-aura-network": "3.9.0",
49
+ "@conduit-client/command-aura-normalized-cache-control": "3.9.0",
50
+ "@conduit-client/command-aura-resource-cache-control": "3.9.0",
51
+ "@conduit-client/command-fetch-network": "3.9.0",
52
+ "@conduit-client/command-http-normalized-cache-control": "3.9.0",
53
+ "@conduit-client/command-network": "3.9.0",
54
+ "@conduit-client/service-cache": "3.9.0",
55
+ "@conduit-client/service-cache-control": "3.9.0",
56
+ "@conduit-client/service-cache-inclusion-policy": "3.9.0",
57
+ "@conduit-client/service-fetch-network": "3.9.0",
58
+ "@conduit-client/service-instrument-command": "3.9.0",
59
+ "@conduit-client/service-instrumentation": "3.9.0",
60
+ "@conduit-client/service-pubsub": "3.9.0",
61
+ "@conduit-client/service-store": "3.9.0",
62
+ "@conduit-client/utils": "3.9.0",
63
+ "@salesforce/lds-adapters-graphql": "^1.414.1",
64
+ "@salesforce/lds-drafts": "^1.414.1",
65
+ "@salesforce/lds-durable-records": "^1.414.1",
66
+ "@salesforce/lds-network-adapter": "^1.414.1",
67
+ "@salesforce/lds-network-nimbus": "^1.414.1",
68
+ "@salesforce/lds-store-binary": "^1.414.1",
69
+ "@salesforce/lds-store-nimbus": "^1.414.1",
70
+ "@salesforce/lds-store-sql": "^1.414.1",
71
+ "@salesforce/lds-utils-adapters": "^1.414.1",
72
+ "@salesforce/nimbus-plugin-lds": "^1.414.1",
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
@@ -45,7 +45,7 @@ import graphqlL2AdapterGate from '@salesforce/gate/lmr.graphqlL2Adapter';
45
45
  import useOneStore from '@salesforce/gate/lmr.useOneStore';
46
46
  import { setServices } from 'force/luvioServiceProvisioner1';
47
47
  import 'force/luvioTypeNormalization1';
48
- import { Kind as Kind$2, visit as visit$2, print as print$1, wrapConfigAndVerify, resolveAst, validateGraphQLOperations } from 'force/luvioOnestoreGraphqlParser';
48
+ import { Kind as Kind$2, visit as visit$2, print as print$1, resolveAndValidateGraphQLConfig } from 'force/luvioOnestoreGraphqlParser';
49
49
  import productConsumedSideEffects from '@salesforce/gate/com.salesforce.fieldservice.vanStockLDSBypass256';
50
50
 
51
51
  /**
@@ -52081,7 +52081,7 @@ function instrumentAdapter(adapter, metadata) {
52081
52081
  }
52082
52082
  if (pdpEventSchema) {
52083
52083
  ldsInstrumentation.log(pdpEventSchema, {
52084
- event_name: 'lsdkLDSAdapter.invoked',
52084
+ event_name: 'lsdkLdsAdapter.invoked',
52085
52085
  productFeatureId: VERTICAL_NAV_FEATURE_ID,
52086
52086
  contextName: metadata.name,
52087
52087
  });
@@ -58420,7 +58420,7 @@ function buildServiceDescriptor$b(luvio) {
58420
58420
  },
58421
58421
  };
58422
58422
  }
58423
- // version: 1.413.0-8cd312301b
58423
+ // version: 1.414.1-06354ce124
58424
58424
 
58425
58425
  /**
58426
58426
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -58446,7 +58446,7 @@ function buildServiceDescriptor$a(notifyRecordUpdateAvailable, getNormalizedLuvi
58446
58446
  },
58447
58447
  };
58448
58448
  }
58449
- // version: 1.413.0-8cd312301b
58449
+ // version: 1.414.1-06354ce124
58450
58450
 
58451
58451
  /*!
58452
58452
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -59449,7 +59449,16 @@ class GraphQLImperativeBindingsService {
59449
59449
  return async (...params) => {
59450
59450
  try {
59451
59451
  if (params.length) {
59452
- params[0] = wrapConfigAndVerify(params[0]);
59452
+ const options = {
59453
+ acceptedOperations: ["query"]
59454
+ };
59455
+ const result = resolveAndValidateGraphQLConfig(params[0], options);
59456
+ if (result == null ? void 0 : result.isErr()) {
59457
+ return result.error;
59458
+ }
59459
+ if (result == null ? void 0 : result.isOk()) {
59460
+ params[0] = result.value;
59461
+ }
59453
59462
  }
59454
59463
  return await buildBaseImperativeInvoker(getCommand, (result) => this.transformResult(result, exposeRefresh))(...params);
59455
59464
  } catch (error) {
@@ -59540,7 +59549,19 @@ function buildServiceDescriptor$2$1() {
59540
59549
  class GraphQLLegacyImperativeBindingsService {
59541
59550
  bind(getCommand) {
59542
59551
  const invoke = async (config, requestContext, callback) => {
59543
- config = wrapConfigAndVerify(config);
59552
+ if (config) {
59553
+ const options = {
59554
+ acceptedOperations: ["query"]
59555
+ };
59556
+ const result = resolveAndValidateGraphQLConfig(config, options);
59557
+ if (result == null ? void 0 : result.isErr()) {
59558
+ callback(result.error);
59559
+ return;
59560
+ }
59561
+ if (result == null ? void 0 : result.isOk()) {
59562
+ config = result.value;
59563
+ }
59564
+ }
59544
59565
  const command = getCommand({ config, assertIsValid });
59545
59566
  try {
59546
59567
  const overrides = getOverridesForLegacyRequestContext(requestContext);
@@ -59569,7 +59590,20 @@ class GraphQLLegacyImperativeBindingsService {
59569
59590
  }
59570
59591
  };
59571
59592
  const subscribe = (config, requestContext, callback) => {
59572
- config = wrapConfigAndVerify(config);
59593
+ if (config) {
59594
+ const options = {
59595
+ acceptedOperations: ["query"]
59596
+ };
59597
+ const result = resolveAndValidateGraphQLConfig(config, options);
59598
+ if (result == null ? void 0 : result.isErr()) {
59599
+ callback(result.error);
59600
+ return () => {
59601
+ };
59602
+ }
59603
+ if (result == null ? void 0 : result.isOk()) {
59604
+ config = result.value;
59605
+ }
59606
+ }
59573
59607
  const command = getCommand({ config, assertIsValid });
59574
59608
  let unsubscribe = () => {
59575
59609
  };
@@ -59618,9 +59652,19 @@ class GraphQLMutationBindingsService {
59618
59652
  return async (...params) => {
59619
59653
  try {
59620
59654
  if (params.length) {
59621
- params[0] = wrapConfigAndVerify(params[0], {
59655
+ const options = {
59622
59656
  acceptedOperations: ["mutation"]
59623
- });
59657
+ };
59658
+ const result2 = resolveAndValidateGraphQLConfig(params[0], options);
59659
+ if (result2 == null ? void 0 : result2.isErr()) {
59660
+ return {
59661
+ data: void 0,
59662
+ errors: result2.error.errors
59663
+ };
59664
+ }
59665
+ if (result2 == null ? void 0 : result2.isOk()) {
59666
+ params[0] = result2.value;
59667
+ }
59624
59668
  }
59625
59669
  const command = getCommand({ params, assertIsValid });
59626
59670
  const result = await command.execute({ cacheControlConfig: { type: "no-cache" } });
@@ -59950,16 +59994,25 @@ class GraphQLCommandWireAdapterConstructor extends CommandWireAdapterConstructor
59950
59994
  }
59951
59995
  update(config, _context) {
59952
59996
  this.unsubscribe();
59953
- const resolvedQuery = resolveAst(config.query);
59954
- if (resolvedQuery) {
59955
- validateGraphQLOperations(
59956
- { query: resolvedQuery, operationName: config == null ? void 0 : config.operationName },
59957
- { acceptedOperations: ["query"] }
59958
- );
59997
+ const options = {
59998
+ acceptedOperations: ["query"]
59999
+ };
60000
+ const result = resolveAndValidateGraphQLConfig(config, options);
60001
+ if (!result) {
60002
+ return;
60003
+ }
60004
+ if (result.isErr()) {
60005
+ const error = result.error;
60006
+ this.callback({
60007
+ data: void 0,
60008
+ errors: error.errors
60009
+ });
60010
+ return;
59959
60011
  }
60012
+ const { query, ...rest } = result.value;
59960
60013
  this.config = {
59961
- ...sanitize(config),
59962
- query: resolvedQuery
60014
+ query,
60015
+ ...sanitize(rest)
59963
60016
  };
59964
60017
  this.invokeAdapter();
59965
60018
  }
@@ -61034,4 +61087,4 @@ register({
61034
61087
  });
61035
61088
 
61036
61089
  export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, ingest$1o as ingestDenormalizedRecordRepresentation, initializeOneStore, registerReportObserver, reportGraphqlQueryParseError };
61037
- // version: 1.413.0-a073c11951
61090
+ // version: 1.414.1-a1d9b7b404