@salesforce/lds-runtime-mobile 1.393.0 → 1.394.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.
Files changed (3) hide show
  1. package/dist/main.js +128 -13
  2. package/package.json +32 -32
  3. package/sfdc/main.js +128 -13
package/dist/main.js CHANGED
@@ -56319,12 +56319,15 @@ class CacheControlCommand extends BaseCommand {
56319
56319
  this.services = services;
56320
56320
  this.keysUsed = /* @__PURE__ */ new Set();
56321
56321
  this.keysUpdated = void 0;
56322
- this.operationType = "query";
56322
+ this._isInternalExecution = false;
56323
56323
  this.lastResult = void 0;
56324
56324
  this.unsubscribeFromKeysImpl = () => void 0;
56325
56325
  this.subscriptions = [];
56326
56326
  this.instantiationTime = Date.now() / 1e3;
56327
56327
  }
56328
+ get isInternalExecution() {
56329
+ return this._isInternalExecution;
56330
+ }
56328
56331
  execute(overrides) {
56329
56332
  this.keysUpdated = void 0;
56330
56333
  this.unsubscribeFromKeys();
@@ -56369,9 +56372,6 @@ class CacheControlCommand extends BaseCommand {
56369
56372
  }
56370
56373
  return buildSubscribableResult(result, this.buildSubscribe(), () => this.refresh());
56371
56374
  }
56372
- if (this.subscriptions.length > 0) {
56373
- this.subscribeToKeysUsed();
56374
- }
56375
56375
  if (returnData === void 0) {
56376
56376
  if (networkData) {
56377
56377
  return buildSubscribableResult(
@@ -56386,6 +56386,9 @@ class CacheControlCommand extends BaseCommand {
56386
56386
  () => this.refresh()
56387
56387
  );
56388
56388
  }
56389
+ if (this.subscriptions.length > 0) {
56390
+ this.subscribeToKeysUsed();
56391
+ }
56389
56392
  return returnData;
56390
56393
  });
56391
56394
  }
@@ -56407,6 +56410,9 @@ class CacheControlCommand extends BaseCommand {
56407
56410
  }
56408
56411
  return resolvedPromiseLike$2(void 0);
56409
56412
  }
56413
+ get operationType() {
56414
+ return "query";
56415
+ }
56410
56416
  subscribeToKeysUsed() {
56411
56417
  this.unsubscribeFromKeys();
56412
56418
  const { pubSub } = this.services;
@@ -56489,7 +56495,7 @@ class CacheControlCommand extends BaseCommand {
56489
56495
  */
56490
56496
  buildSubscribe() {
56491
56497
  return (consumerCallback) => {
56492
- if (this.subscriptions.length === 0 && (this.operationType === "query" || this.operationType === "graphql")) {
56498
+ if (this.subscriptions.length === 0 && this.operationType === "query") {
56493
56499
  this.subscribeToKeysUsed();
56494
56500
  }
56495
56501
  this.subscriptions.push(consumerCallback);
@@ -56502,7 +56508,9 @@ class CacheControlCommand extends BaseCommand {
56502
56508
  };
56503
56509
  }
56504
56510
  rerun(overrides) {
56511
+ this._isInternalExecution = true;
56505
56512
  return this.execute(overrides).then((result) => {
56513
+ this._isInternalExecution = false;
56506
56514
  if (result.isErr()) {
56507
56515
  this.lastResult = { type: "error", error: result.error.failure };
56508
56516
  this.invokeConsumerCallbacks(err(result.error.failure));
@@ -56875,7 +56883,82 @@ class NetworkCommand extends BaseCommand {
56875
56883
  async afterRequestHooks(_options) {
56876
56884
  }
56877
56885
  }
56878
- class FetchNetworkCommand extends NetworkCommand {
56886
+ function isAbortableCommand(command) {
56887
+ return "isAbortableCommand" in command && command.isAbortableCommand === true;
56888
+ }
56889
+ function hasFetchParams(command) {
56890
+ return command && typeof command === "object" && "fetchParams" in command;
56891
+ }
56892
+ function createAbortableDecorator(command, options) {
56893
+ if (!(options == null ? void 0 : options.signal) || !((options == null ? void 0 : options.signal) instanceof AbortSignal)) {
56894
+ return command;
56895
+ }
56896
+ const { signal } = options;
56897
+ if (isAbortableCommand(command)) {
56898
+ if (process.env.NODE_ENV !== "production") {
56899
+ console.warn(
56900
+ "Command is already abortable. Returning original command to avoid double-wrapping."
56901
+ );
56902
+ }
56903
+ return command;
56904
+ }
56905
+ if (!hasFetchParams(command)) {
56906
+ if (process.env.NODE_ENV !== "production") {
56907
+ console.warn(
56908
+ `Command ${command.constructor.name} does not support fetch operations. AbortSignal will be ignored.`
56909
+ );
56910
+ }
56911
+ return command;
56912
+ }
56913
+ try {
56914
+ return new Proxy(command, {
56915
+ get(target, prop, receiver) {
56916
+ if (prop === "isAbortableCommand") {
56917
+ return true;
56918
+ }
56919
+ if (prop === "signal") {
56920
+ return signal;
56921
+ }
56922
+ if (prop === "fetchParams") {
56923
+ const originalFetchParams = target[prop];
56924
+ const isInternal = target.isInternalExecution === true;
56925
+ if (typeof originalFetchParams === "function") {
56926
+ return function(...args) {
56927
+ const originalReturnValue = originalFetchParams.apply(this, args);
56928
+ if (!isInternal) {
56929
+ const [url, init = {}] = originalReturnValue;
56930
+ return [url, { signal, ...init }];
56931
+ }
56932
+ return originalReturnValue;
56933
+ };
56934
+ } else {
56935
+ if (!isInternal && originalFetchParams && Array.isArray(originalFetchParams)) {
56936
+ const [url, init = {}] = originalFetchParams;
56937
+ return [url, { signal, ...init }];
56938
+ }
56939
+ return originalFetchParams;
56940
+ }
56941
+ }
56942
+ return Reflect.get(target, prop, receiver);
56943
+ },
56944
+ has(target, prop) {
56945
+ if (prop === "isAbortableCommand" || prop === "signal") {
56946
+ return true;
56947
+ }
56948
+ return Reflect.has(target, prop);
56949
+ }
56950
+ });
56951
+ } catch (error) {
56952
+ if (process.env.NODE_ENV !== "production") {
56953
+ console.error(
56954
+ "Failed to create abortable command proxy, returning original command unchanged.",
56955
+ error
56956
+ );
56957
+ }
56958
+ return command;
56959
+ }
56960
+ }
56961
+ const _FetchNetworkCommand = class _FetchNetworkCommand extends NetworkCommand {
56879
56962
  constructor(services) {
56880
56963
  super(services);
56881
56964
  this.services = services;
@@ -56913,7 +56996,11 @@ class FetchNetworkCommand extends NetworkCommand {
56913
56996
  (reason) => err$1(toError(reason))
56914
56997
  );
56915
56998
  }
56916
- }
56999
+ };
57000
+ _FetchNetworkCommand.availableDecorators = {
57001
+ abortable: createAbortableDecorator
57002
+ };
57003
+ let FetchNetworkCommand = _FetchNetworkCommand;
56917
57004
  function buildServiceDescriptor$d() {
56918
57005
  return {
56919
57006
  type: "fetchNetworkCommandBaseClass",
@@ -57479,11 +57566,11 @@ class CacheController {
57479
57566
  yield* this.services.cacheInclusionPolicy.findAndModify(query, cacheUpdate);
57480
57567
  }
57481
57568
  }
57482
- function buildServiceDescriptor$a(cache, cacheInclusionPolicy) {
57569
+ function buildServiceDescriptor$a(cache, cacheInclusionPolicy, instrumentation) {
57483
57570
  return {
57484
57571
  type: "cacheController",
57485
57572
  version: "1.0",
57486
- service: new CacheController({ cache, cacheInclusionPolicy })
57573
+ service: new CacheController({ cache, cacheInclusionPolicy, instrumentation })
57487
57574
  };
57488
57575
  }
57489
57576
 
@@ -57979,7 +58066,7 @@ function buildServiceDescriptor$5(luvio) {
57979
58066
  },
57980
58067
  };
57981
58068
  }
57982
- // version: 1.393.0-94e6d2aef3
58069
+ // version: 1.394.0-db58817a4e
57983
58070
 
57984
58071
  /**
57985
58072
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -58005,7 +58092,7 @@ function buildServiceDescriptor$4(notifyRecordUpdateAvailable, getNormalizedLuvi
58005
58092
  },
58006
58093
  };
58007
58094
  }
58008
- // version: 1.393.0-94e6d2aef3
58095
+ // version: 1.394.0-db58817a4e
58009
58096
 
58010
58097
  /*!
58011
58098
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -58954,6 +59041,17 @@ class AuraGraphQLNormalizedCacheControlCommand extends AuraNormalizedCacheContro
58954
59041
  this.documentRootType = documentRootType;
58955
59042
  this.services = services;
58956
59043
  }
59044
+ get operationType() {
59045
+ const operationResult = findExecutableOperation(this.config);
59046
+ if (operationResult.isErr()) {
59047
+ return "mutation";
59048
+ }
59049
+ const operationType = operationResult.value.operation.toString();
59050
+ if (operationType === "mutation" || operationType === "query") {
59051
+ return operationType;
59052
+ }
59053
+ return "mutation";
59054
+ }
58957
59055
  buildResultType() {
58958
59056
  return this.documentRootType;
58959
59057
  }
@@ -59078,6 +59176,9 @@ class AuraGraphQLNormalizedCacheControlCommand extends AuraNormalizedCacheContro
59078
59176
  }
59079
59177
  // Any changes to this method should most likely be duplicated in the https command as well
59080
59178
  handleCacheControllerResult(result, requestRunner) {
59179
+ if (this.operationType === "mutation") {
59180
+ return super.handleCacheControllerResult(result, requestRunner);
59181
+ }
59081
59182
  const { networkError, returnData } = requestRunner;
59082
59183
  return this.publishUpdatedKeys().then(() => {
59083
59184
  if (networkError || returnData === void 0 || returnData.isErr() || result.isErr()) {
@@ -59113,6 +59214,17 @@ class HttpGraphQLNormalizedCacheControlCommand extends HttpNormalizedCacheContro
59113
59214
  buildResultType() {
59114
59215
  return this.documentRootType;
59115
59216
  }
59217
+ get operationType() {
59218
+ const operationResult = findExecutableOperation(this.config);
59219
+ if (operationResult.isErr()) {
59220
+ return "mutation";
59221
+ }
59222
+ const operationType = operationResult.value.operation.toString();
59223
+ if (operationType === "mutation" || operationType === "query") {
59224
+ return operationType;
59225
+ }
59226
+ return "mutation";
59227
+ }
59116
59228
  buildQuery() {
59117
59229
  const extensionResult = buildGraphQLInputExtension(this.config);
59118
59230
  if (extensionResult.isErr()) {
@@ -59182,6 +59294,9 @@ class HttpGraphQLNormalizedCacheControlCommand extends HttpNormalizedCacheContro
59182
59294
  }
59183
59295
  // Any changes to this method should most likely be duplicated in the aura command as well
59184
59296
  handleCacheControllerResult(result, requestRunner) {
59297
+ if (this.operationType === "mutation") {
59298
+ return super.handleCacheControllerResult(result, requestRunner);
59299
+ }
59185
59300
  const { networkError, returnData } = requestRunner;
59186
59301
  return this.publishUpdatedKeys().then(() => {
59187
59302
  if (networkError || returnData === void 0 || returnData.isErr() || result.isErr()) {
@@ -59935,7 +60050,7 @@ function initializeOneStore(sqliteStore) {
59935
60050
  buildServiceDescriptor$g(),
59936
60051
  buildServiceDescriptor$f(),
59937
60052
  buildServiceDescriptor$e(),
59938
- buildServiceDescriptor$a(cacheServiceDescriptor.service, nimbusSqliteOneStoreCacheServiceDescriptor.service),
60053
+ buildServiceDescriptor$a(cacheServiceDescriptor.service, nimbusSqliteOneStoreCacheServiceDescriptor.service, instrumentationServiceDescriptor.service),
59939
60054
  buildServiceDescriptor$d(),
59940
60055
  buildServiceDescriptor$h(),
59941
60056
  buildServiceDescriptor$c(),
@@ -60201,4 +60316,4 @@ register({
60201
60316
  });
60202
60317
 
60203
60318
  export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, ingest$1o as ingestDenormalizedRecordRepresentation, initializeOneStore, registerReportObserver, reportGraphqlQueryParseError };
60204
- // version: 1.393.0-fe4eaa97f2
60319
+ // version: 1.394.0-9f5a21c62e
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-mobile",
3
- "version": "1.393.0",
3
+ "version": "1.394.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS runtime for mobile/hybrid environments.",
6
6
  "main": "dist/main.js",
@@ -32,42 +32,42 @@
32
32
  "release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-mobile"
33
33
  },
34
34
  "dependencies": {
35
- "@luvio/service-provisioner": "5.62.0",
36
- "@salesforce/lds-adapters-uiapi": "^1.393.0",
37
- "@salesforce/lds-bindings": "^1.393.0",
38
- "@salesforce/lds-instrumentation": "^1.393.0",
39
- "@salesforce/lds-luvio-service": "^1.393.0",
40
- "@salesforce/lds-luvio-uiapi-records-service": "^1.393.0",
35
+ "@luvio/service-provisioner": "5.64.2",
36
+ "@salesforce/lds-adapters-uiapi": "^1.394.0",
37
+ "@salesforce/lds-bindings": "^1.394.0",
38
+ "@salesforce/lds-instrumentation": "^1.394.0",
39
+ "@salesforce/lds-luvio-service": "^1.394.0",
40
+ "@salesforce/lds-luvio-uiapi-records-service": "^1.394.0",
41
41
  "@salesforce/user": "0.0.21",
42
42
  "o11y": "250.7.0",
43
43
  "o11y_schema": "256.126.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@luvio/command-aura-network": "5.62.0",
47
- "@luvio/command-aura-normalized-cache-control": "5.62.0",
48
- "@luvio/command-aura-resource-cache-control": "5.62.0",
49
- "@luvio/command-fetch-network": "5.62.0",
50
- "@luvio/command-http-normalized-cache-control": "5.62.0",
51
- "@luvio/command-network": "5.62.0",
52
- "@luvio/service-cache": "5.62.0",
53
- "@luvio/service-cache-control": "5.62.0",
54
- "@luvio/service-cache-inclusion-policy": "5.62.0",
55
- "@luvio/service-fetch-network": "5.62.0",
56
- "@luvio/service-instrument-command": "5.62.0",
57
- "@luvio/service-instrumentation": "5.62.0",
58
- "@luvio/service-pubsub": "5.62.0",
59
- "@luvio/service-store": "5.62.0",
60
- "@luvio/utils": "5.62.0",
61
- "@salesforce/lds-adapters-graphql": "^1.393.0",
62
- "@salesforce/lds-drafts": "^1.393.0",
63
- "@salesforce/lds-durable-records": "^1.393.0",
64
- "@salesforce/lds-network-adapter": "^1.393.0",
65
- "@salesforce/lds-network-nimbus": "^1.393.0",
66
- "@salesforce/lds-store-binary": "^1.393.0",
67
- "@salesforce/lds-store-nimbus": "^1.393.0",
68
- "@salesforce/lds-store-sql": "^1.393.0",
69
- "@salesforce/lds-utils-adapters": "^1.393.0",
70
- "@salesforce/nimbus-plugin-lds": "^1.393.0",
46
+ "@luvio/command-aura-network": "5.64.2",
47
+ "@luvio/command-aura-normalized-cache-control": "5.64.2",
48
+ "@luvio/command-aura-resource-cache-control": "5.64.2",
49
+ "@luvio/command-fetch-network": "5.64.2",
50
+ "@luvio/command-http-normalized-cache-control": "5.64.2",
51
+ "@luvio/command-network": "5.64.2",
52
+ "@luvio/service-cache": "5.64.2",
53
+ "@luvio/service-cache-control": "5.64.2",
54
+ "@luvio/service-cache-inclusion-policy": "5.64.2",
55
+ "@luvio/service-fetch-network": "5.64.2",
56
+ "@luvio/service-instrument-command": "5.64.2",
57
+ "@luvio/service-instrumentation": "5.64.2",
58
+ "@luvio/service-pubsub": "5.64.2",
59
+ "@luvio/service-store": "5.64.2",
60
+ "@luvio/utils": "5.64.2",
61
+ "@salesforce/lds-adapters-graphql": "^1.394.0",
62
+ "@salesforce/lds-drafts": "^1.394.0",
63
+ "@salesforce/lds-durable-records": "^1.394.0",
64
+ "@salesforce/lds-network-adapter": "^1.394.0",
65
+ "@salesforce/lds-network-nimbus": "^1.394.0",
66
+ "@salesforce/lds-store-binary": "^1.394.0",
67
+ "@salesforce/lds-store-nimbus": "^1.394.0",
68
+ "@salesforce/lds-store-sql": "^1.394.0",
69
+ "@salesforce/lds-utils-adapters": "^1.394.0",
70
+ "@salesforce/nimbus-plugin-lds": "^1.394.0",
71
71
  "babel-plugin-dynamic-import-node": "^2.3.3",
72
72
  "wait-for-expect": "^3.0.2"
73
73
  },
package/sfdc/main.js CHANGED
@@ -56319,12 +56319,15 @@ class CacheControlCommand extends BaseCommand {
56319
56319
  this.services = services;
56320
56320
  this.keysUsed = /* @__PURE__ */ new Set();
56321
56321
  this.keysUpdated = void 0;
56322
- this.operationType = "query";
56322
+ this._isInternalExecution = false;
56323
56323
  this.lastResult = void 0;
56324
56324
  this.unsubscribeFromKeysImpl = () => void 0;
56325
56325
  this.subscriptions = [];
56326
56326
  this.instantiationTime = Date.now() / 1e3;
56327
56327
  }
56328
+ get isInternalExecution() {
56329
+ return this._isInternalExecution;
56330
+ }
56328
56331
  execute(overrides) {
56329
56332
  this.keysUpdated = void 0;
56330
56333
  this.unsubscribeFromKeys();
@@ -56369,9 +56372,6 @@ class CacheControlCommand extends BaseCommand {
56369
56372
  }
56370
56373
  return buildSubscribableResult(result, this.buildSubscribe(), () => this.refresh());
56371
56374
  }
56372
- if (this.subscriptions.length > 0) {
56373
- this.subscribeToKeysUsed();
56374
- }
56375
56375
  if (returnData === void 0) {
56376
56376
  if (networkData) {
56377
56377
  return buildSubscribableResult(
@@ -56386,6 +56386,9 @@ class CacheControlCommand extends BaseCommand {
56386
56386
  () => this.refresh()
56387
56387
  );
56388
56388
  }
56389
+ if (this.subscriptions.length > 0) {
56390
+ this.subscribeToKeysUsed();
56391
+ }
56389
56392
  return returnData;
56390
56393
  });
56391
56394
  }
@@ -56407,6 +56410,9 @@ class CacheControlCommand extends BaseCommand {
56407
56410
  }
56408
56411
  return resolvedPromiseLike$2(void 0);
56409
56412
  }
56413
+ get operationType() {
56414
+ return "query";
56415
+ }
56410
56416
  subscribeToKeysUsed() {
56411
56417
  this.unsubscribeFromKeys();
56412
56418
  const { pubSub } = this.services;
@@ -56489,7 +56495,7 @@ class CacheControlCommand extends BaseCommand {
56489
56495
  */
56490
56496
  buildSubscribe() {
56491
56497
  return (consumerCallback) => {
56492
- if (this.subscriptions.length === 0 && (this.operationType === "query" || this.operationType === "graphql")) {
56498
+ if (this.subscriptions.length === 0 && this.operationType === "query") {
56493
56499
  this.subscribeToKeysUsed();
56494
56500
  }
56495
56501
  this.subscriptions.push(consumerCallback);
@@ -56502,7 +56508,9 @@ class CacheControlCommand extends BaseCommand {
56502
56508
  };
56503
56509
  }
56504
56510
  rerun(overrides) {
56511
+ this._isInternalExecution = true;
56505
56512
  return this.execute(overrides).then((result) => {
56513
+ this._isInternalExecution = false;
56506
56514
  if (result.isErr()) {
56507
56515
  this.lastResult = { type: "error", error: result.error.failure };
56508
56516
  this.invokeConsumerCallbacks(err(result.error.failure));
@@ -56875,7 +56883,82 @@ class NetworkCommand extends BaseCommand {
56875
56883
  async afterRequestHooks(_options) {
56876
56884
  }
56877
56885
  }
56878
- class FetchNetworkCommand extends NetworkCommand {
56886
+ function isAbortableCommand(command) {
56887
+ return "isAbortableCommand" in command && command.isAbortableCommand === true;
56888
+ }
56889
+ function hasFetchParams(command) {
56890
+ return command && typeof command === "object" && "fetchParams" in command;
56891
+ }
56892
+ function createAbortableDecorator(command, options) {
56893
+ if (!(options == null ? void 0 : options.signal) || !((options == null ? void 0 : options.signal) instanceof AbortSignal)) {
56894
+ return command;
56895
+ }
56896
+ const { signal } = options;
56897
+ if (isAbortableCommand(command)) {
56898
+ if (process.env.NODE_ENV !== "production") {
56899
+ console.warn(
56900
+ "Command is already abortable. Returning original command to avoid double-wrapping."
56901
+ );
56902
+ }
56903
+ return command;
56904
+ }
56905
+ if (!hasFetchParams(command)) {
56906
+ if (process.env.NODE_ENV !== "production") {
56907
+ console.warn(
56908
+ `Command ${command.constructor.name} does not support fetch operations. AbortSignal will be ignored.`
56909
+ );
56910
+ }
56911
+ return command;
56912
+ }
56913
+ try {
56914
+ return new Proxy(command, {
56915
+ get(target, prop, receiver) {
56916
+ if (prop === "isAbortableCommand") {
56917
+ return true;
56918
+ }
56919
+ if (prop === "signal") {
56920
+ return signal;
56921
+ }
56922
+ if (prop === "fetchParams") {
56923
+ const originalFetchParams = target[prop];
56924
+ const isInternal = target.isInternalExecution === true;
56925
+ if (typeof originalFetchParams === "function") {
56926
+ return function(...args) {
56927
+ const originalReturnValue = originalFetchParams.apply(this, args);
56928
+ if (!isInternal) {
56929
+ const [url, init = {}] = originalReturnValue;
56930
+ return [url, { signal, ...init }];
56931
+ }
56932
+ return originalReturnValue;
56933
+ };
56934
+ } else {
56935
+ if (!isInternal && originalFetchParams && Array.isArray(originalFetchParams)) {
56936
+ const [url, init = {}] = originalFetchParams;
56937
+ return [url, { signal, ...init }];
56938
+ }
56939
+ return originalFetchParams;
56940
+ }
56941
+ }
56942
+ return Reflect.get(target, prop, receiver);
56943
+ },
56944
+ has(target, prop) {
56945
+ if (prop === "isAbortableCommand" || prop === "signal") {
56946
+ return true;
56947
+ }
56948
+ return Reflect.has(target, prop);
56949
+ }
56950
+ });
56951
+ } catch (error) {
56952
+ if (process.env.NODE_ENV !== "production") {
56953
+ console.error(
56954
+ "Failed to create abortable command proxy, returning original command unchanged.",
56955
+ error
56956
+ );
56957
+ }
56958
+ return command;
56959
+ }
56960
+ }
56961
+ const _FetchNetworkCommand = class _FetchNetworkCommand extends NetworkCommand {
56879
56962
  constructor(services) {
56880
56963
  super(services);
56881
56964
  this.services = services;
@@ -56913,7 +56996,11 @@ class FetchNetworkCommand extends NetworkCommand {
56913
56996
  (reason) => err$1(toError(reason))
56914
56997
  );
56915
56998
  }
56916
- }
56999
+ };
57000
+ _FetchNetworkCommand.availableDecorators = {
57001
+ abortable: createAbortableDecorator
57002
+ };
57003
+ let FetchNetworkCommand = _FetchNetworkCommand;
56917
57004
  function buildServiceDescriptor$d() {
56918
57005
  return {
56919
57006
  type: "fetchNetworkCommandBaseClass",
@@ -57479,11 +57566,11 @@ class CacheController {
57479
57566
  yield* this.services.cacheInclusionPolicy.findAndModify(query, cacheUpdate);
57480
57567
  }
57481
57568
  }
57482
- function buildServiceDescriptor$a(cache, cacheInclusionPolicy) {
57569
+ function buildServiceDescriptor$a(cache, cacheInclusionPolicy, instrumentation) {
57483
57570
  return {
57484
57571
  type: "cacheController",
57485
57572
  version: "1.0",
57486
- service: new CacheController({ cache, cacheInclusionPolicy })
57573
+ service: new CacheController({ cache, cacheInclusionPolicy, instrumentation })
57487
57574
  };
57488
57575
  }
57489
57576
 
@@ -57979,7 +58066,7 @@ function buildServiceDescriptor$5(luvio) {
57979
58066
  },
57980
58067
  };
57981
58068
  }
57982
- // version: 1.393.0-94e6d2aef3
58069
+ // version: 1.394.0-db58817a4e
57983
58070
 
57984
58071
  /**
57985
58072
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -58005,7 +58092,7 @@ function buildServiceDescriptor$4(notifyRecordUpdateAvailable, getNormalizedLuvi
58005
58092
  },
58006
58093
  };
58007
58094
  }
58008
- // version: 1.393.0-94e6d2aef3
58095
+ // version: 1.394.0-db58817a4e
58009
58096
 
58010
58097
  /*!
58011
58098
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -58954,6 +59041,17 @@ class AuraGraphQLNormalizedCacheControlCommand extends AuraNormalizedCacheContro
58954
59041
  this.documentRootType = documentRootType;
58955
59042
  this.services = services;
58956
59043
  }
59044
+ get operationType() {
59045
+ const operationResult = findExecutableOperation(this.config);
59046
+ if (operationResult.isErr()) {
59047
+ return "mutation";
59048
+ }
59049
+ const operationType = operationResult.value.operation.toString();
59050
+ if (operationType === "mutation" || operationType === "query") {
59051
+ return operationType;
59052
+ }
59053
+ return "mutation";
59054
+ }
58957
59055
  buildResultType() {
58958
59056
  return this.documentRootType;
58959
59057
  }
@@ -59078,6 +59176,9 @@ class AuraGraphQLNormalizedCacheControlCommand extends AuraNormalizedCacheContro
59078
59176
  }
59079
59177
  // Any changes to this method should most likely be duplicated in the https command as well
59080
59178
  handleCacheControllerResult(result, requestRunner) {
59179
+ if (this.operationType === "mutation") {
59180
+ return super.handleCacheControllerResult(result, requestRunner);
59181
+ }
59081
59182
  const { networkError, returnData } = requestRunner;
59082
59183
  return this.publishUpdatedKeys().then(() => {
59083
59184
  if (networkError || returnData === void 0 || returnData.isErr() || result.isErr()) {
@@ -59113,6 +59214,17 @@ class HttpGraphQLNormalizedCacheControlCommand extends HttpNormalizedCacheContro
59113
59214
  buildResultType() {
59114
59215
  return this.documentRootType;
59115
59216
  }
59217
+ get operationType() {
59218
+ const operationResult = findExecutableOperation(this.config);
59219
+ if (operationResult.isErr()) {
59220
+ return "mutation";
59221
+ }
59222
+ const operationType = operationResult.value.operation.toString();
59223
+ if (operationType === "mutation" || operationType === "query") {
59224
+ return operationType;
59225
+ }
59226
+ return "mutation";
59227
+ }
59116
59228
  buildQuery() {
59117
59229
  const extensionResult = buildGraphQLInputExtension(this.config);
59118
59230
  if (extensionResult.isErr()) {
@@ -59182,6 +59294,9 @@ class HttpGraphQLNormalizedCacheControlCommand extends HttpNormalizedCacheContro
59182
59294
  }
59183
59295
  // Any changes to this method should most likely be duplicated in the aura command as well
59184
59296
  handleCacheControllerResult(result, requestRunner) {
59297
+ if (this.operationType === "mutation") {
59298
+ return super.handleCacheControllerResult(result, requestRunner);
59299
+ }
59185
59300
  const { networkError, returnData } = requestRunner;
59186
59301
  return this.publishUpdatedKeys().then(() => {
59187
59302
  if (networkError || returnData === void 0 || returnData.isErr() || result.isErr()) {
@@ -59935,7 +60050,7 @@ function initializeOneStore(sqliteStore) {
59935
60050
  buildServiceDescriptor$g(),
59936
60051
  buildServiceDescriptor$f(),
59937
60052
  buildServiceDescriptor$e(),
59938
- buildServiceDescriptor$a(cacheServiceDescriptor.service, nimbusSqliteOneStoreCacheServiceDescriptor.service),
60053
+ buildServiceDescriptor$a(cacheServiceDescriptor.service, nimbusSqliteOneStoreCacheServiceDescriptor.service, instrumentationServiceDescriptor.service),
59939
60054
  buildServiceDescriptor$d(),
59940
60055
  buildServiceDescriptor$h(),
59941
60056
  buildServiceDescriptor$c(),
@@ -60201,4 +60316,4 @@ register({
60201
60316
  });
60202
60317
 
60203
60318
  export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, ingest$1o as ingestDenormalizedRecordRepresentation, initializeOneStore, registerReportObserver, reportGraphqlQueryParseError };
60204
- // version: 1.393.0-fe4eaa97f2
60319
+ // version: 1.394.0-9f5a21c62e