@salesforce/lds-worker-api 1.114.1 → 1.114.2

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.
@@ -747,4 +747,4 @@ if (process.env.NODE_ENV !== 'production') {
747
747
  }
748
748
 
749
749
  export { createPrimingSession, draftManager, draftQueue, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, setMetadataTTL, setUiApiRecordTTL, subscribeToAdapter };
750
- // version: 1.114.1-f3347d8bf
750
+ // version: 1.114.2-fe583257a
@@ -3776,7 +3776,7 @@ function withDefaultLuvio(callback) {
3776
3776
  }
3777
3777
  callbacks.push(callback);
3778
3778
  }
3779
- // version: 1.114.1-f3347d8bf
3779
+ // version: 1.114.2-fe583257a
3780
3780
 
3781
3781
  // TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
3782
3782
  function instrumentAdapter$1(createFunction, _metadata) {
@@ -15200,7 +15200,7 @@ function parseAndVisit(source) {
15200
15200
  updateReferenceMapWithKnownKey(ast, luvioDocumentNode);
15201
15201
  return luvioDocumentNode;
15202
15202
  }
15203
- // version: 1.114.1-f3347d8bf
15203
+ // version: 1.114.2-fe583257a
15204
15204
 
15205
15205
  function unwrap(data) {
15206
15206
  // The lwc-luvio bindings import a function from lwc called "unwrap".
@@ -16113,7 +16113,7 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
16113
16113
  const { apiFamily, name } = metadata;
16114
16114
  return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
16115
16115
  }
16116
- // version: 1.114.1-f3347d8bf
16116
+ // version: 1.114.2-fe583257a
16117
16117
 
16118
16118
  /**
16119
16119
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -44306,7 +44306,7 @@ withDefaultLuvio((luvio) => {
44306
44306
  dropFunction: instrumentation$2.notifyRecordUpdateAvailableDropped,
44307
44307
  });
44308
44308
  });
44309
- // version: 1.114.1-f3347d8bf
44309
+ // version: 1.114.2-fe583257a
44310
44310
 
44311
44311
  var caseSensitiveUserId = '005B0000000GR4OIAW';
44312
44312
 
@@ -49500,16 +49500,24 @@ class DurableDraftQueue {
49500
49500
  await this.startQueueSafe();
49501
49501
  return Promise.reject('No action to replace');
49502
49502
  }
49503
- const { actionToReplace, replacingAction } = this.getHandler(first.handler).handleReplaceAction(actionId, withActionId, this.uploadingActionId, actions);
49504
- // TODO [W-8873834]: Will add batching support to durable store
49505
- // we should use that here to remove and set both actions in one operation
49506
- await this.removeDraftAction(replacingAction.id);
49507
- await this.draftStore.writeAction(actionToReplace);
49508
- await this.notifyChangedListeners({
49509
- type: DraftQueueEventType.ActionUpdated,
49510
- action: actionToReplace,
49511
- });
49512
- this.replacingAction = undefined;
49503
+ // put in a try/finally block so we don't leave this.replacingAction
49504
+ // indefinitely set
49505
+ let actionToReplace;
49506
+ try {
49507
+ const replaceResult = this.getHandler(first.handler).handleReplaceAction(actionId, withActionId, this.uploadingActionId, actions);
49508
+ actionToReplace = replaceResult.actionToReplace;
49509
+ // TODO [W-8873834]: Will add batching support to durable store
49510
+ // we should use that here to remove and set both actions in one operation
49511
+ await this.removeDraftAction(replaceResult.replacingAction.id);
49512
+ await this.draftStore.writeAction(actionToReplace);
49513
+ await this.notifyChangedListeners({
49514
+ type: DraftQueueEventType.ActionUpdated,
49515
+ action: actionToReplace,
49516
+ });
49517
+ }
49518
+ finally {
49519
+ this.replacingAction = undefined;
49520
+ }
49513
49521
  await this.startQueueSafe();
49514
49522
  return actionToReplace;
49515
49523
  });
@@ -49539,16 +49547,23 @@ class DurableDraftQueue {
49539
49547
  await this.startQueueSafe();
49540
49548
  throw Error('No action to replace');
49541
49549
  }
49542
- const merged = this.getHandler(target.handler).mergeActions(target, source);
49543
- // update the target
49544
- await this.draftStore.writeAction(merged);
49545
- await this.notifyChangedListeners({
49546
- type: DraftQueueEventType.ActionUpdated,
49547
- action: merged,
49548
- });
49549
- // remove the source from queue
49550
- await this.removeDraftAction(sourceActionId);
49551
- this.replacingAction = undefined;
49550
+ // put in a try/finally block so we don't leave this.replacingAction
49551
+ // indefinitely set
49552
+ let merged;
49553
+ try {
49554
+ merged = this.getHandler(target.handler).mergeActions(target, source);
49555
+ // update the target
49556
+ await this.draftStore.writeAction(merged);
49557
+ await this.notifyChangedListeners({
49558
+ type: DraftQueueEventType.ActionUpdated,
49559
+ action: merged,
49560
+ });
49561
+ // remove the source from queue
49562
+ await this.removeDraftAction(sourceActionId);
49563
+ }
49564
+ finally {
49565
+ this.replacingAction = undefined;
49566
+ }
49552
49567
  await this.startQueueSafe();
49553
49568
  return merged;
49554
49569
  });
@@ -59783,7 +59798,7 @@ register({
59783
59798
  id: '@salesforce/lds-network-adapter',
59784
59799
  instrument: instrument$1,
59785
59800
  });
59786
- // version: 1.114.1-f3347d8bf
59801
+ // version: 1.114.2-fe583257a
59787
59802
 
59788
59803
  const { create: create$2, keys: keys$2 } = Object;
59789
59804
  const { stringify: stringify$1, parse: parse$1 } = JSON;
@@ -77509,7 +77524,7 @@ register({
77509
77524
  configuration: { ...configurationForGraphQLAdapters },
77510
77525
  instrument,
77511
77526
  });
77512
- // version: 1.114.1-f3347d8bf
77527
+ // version: 1.114.2-fe583257a
77513
77528
 
77514
77529
  // On core the unstable adapters are re-exported with different names,
77515
77530
 
@@ -79638,7 +79653,7 @@ withDefaultLuvio((luvio) => {
79638
79653
  unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
79639
79654
  graphQLImperative = ldsAdapter;
79640
79655
  });
79641
- // version: 1.114.1-f3347d8bf
79656
+ // version: 1.114.2-fe583257a
79642
79657
 
79643
79658
  var gqlApi = /*#__PURE__*/Object.freeze({
79644
79659
  __proto__: null,
@@ -80316,4 +80331,4 @@ const { luvio } = getRuntime();
80316
80331
  setDefaultLuvio({ luvio });
80317
80332
 
80318
80333
  export { createPrimingSession, draftManager, draftQueue, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, subscribeToAdapter };
80319
- // version: 1.114.1-f3347d8bf
80334
+ // version: 1.114.2-fe583257a
@@ -3782,7 +3782,7 @@
3782
3782
  }
3783
3783
  callbacks.push(callback);
3784
3784
  }
3785
- // version: 1.114.1-f3347d8bf
3785
+ // version: 1.114.2-fe583257a
3786
3786
 
3787
3787
  // TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
3788
3788
  function instrumentAdapter$1(createFunction, _metadata) {
@@ -15206,7 +15206,7 @@
15206
15206
  updateReferenceMapWithKnownKey(ast, luvioDocumentNode);
15207
15207
  return luvioDocumentNode;
15208
15208
  }
15209
- // version: 1.114.1-f3347d8bf
15209
+ // version: 1.114.2-fe583257a
15210
15210
 
15211
15211
  function unwrap(data) {
15212
15212
  // The lwc-luvio bindings import a function from lwc called "unwrap".
@@ -16119,7 +16119,7 @@
16119
16119
  const { apiFamily, name } = metadata;
16120
16120
  return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
16121
16121
  }
16122
- // version: 1.114.1-f3347d8bf
16122
+ // version: 1.114.2-fe583257a
16123
16123
 
16124
16124
  /**
16125
16125
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -44312,7 +44312,7 @@
44312
44312
  dropFunction: instrumentation$2.notifyRecordUpdateAvailableDropped,
44313
44313
  });
44314
44314
  });
44315
- // version: 1.114.1-f3347d8bf
44315
+ // version: 1.114.2-fe583257a
44316
44316
 
44317
44317
  var caseSensitiveUserId = '005B0000000GR4OIAW';
44318
44318
 
@@ -49506,16 +49506,24 @@
49506
49506
  await this.startQueueSafe();
49507
49507
  return Promise.reject('No action to replace');
49508
49508
  }
49509
- const { actionToReplace, replacingAction } = this.getHandler(first.handler).handleReplaceAction(actionId, withActionId, this.uploadingActionId, actions);
49510
- // TODO [W-8873834]: Will add batching support to durable store
49511
- // we should use that here to remove and set both actions in one operation
49512
- await this.removeDraftAction(replacingAction.id);
49513
- await this.draftStore.writeAction(actionToReplace);
49514
- await this.notifyChangedListeners({
49515
- type: DraftQueueEventType.ActionUpdated,
49516
- action: actionToReplace,
49517
- });
49518
- this.replacingAction = undefined;
49509
+ // put in a try/finally block so we don't leave this.replacingAction
49510
+ // indefinitely set
49511
+ let actionToReplace;
49512
+ try {
49513
+ const replaceResult = this.getHandler(first.handler).handleReplaceAction(actionId, withActionId, this.uploadingActionId, actions);
49514
+ actionToReplace = replaceResult.actionToReplace;
49515
+ // TODO [W-8873834]: Will add batching support to durable store
49516
+ // we should use that here to remove and set both actions in one operation
49517
+ await this.removeDraftAction(replaceResult.replacingAction.id);
49518
+ await this.draftStore.writeAction(actionToReplace);
49519
+ await this.notifyChangedListeners({
49520
+ type: DraftQueueEventType.ActionUpdated,
49521
+ action: actionToReplace,
49522
+ });
49523
+ }
49524
+ finally {
49525
+ this.replacingAction = undefined;
49526
+ }
49519
49527
  await this.startQueueSafe();
49520
49528
  return actionToReplace;
49521
49529
  });
@@ -49545,16 +49553,23 @@
49545
49553
  await this.startQueueSafe();
49546
49554
  throw Error('No action to replace');
49547
49555
  }
49548
- const merged = this.getHandler(target.handler).mergeActions(target, source);
49549
- // update the target
49550
- await this.draftStore.writeAction(merged);
49551
- await this.notifyChangedListeners({
49552
- type: DraftQueueEventType.ActionUpdated,
49553
- action: merged,
49554
- });
49555
- // remove the source from queue
49556
- await this.removeDraftAction(sourceActionId);
49557
- this.replacingAction = undefined;
49556
+ // put in a try/finally block so we don't leave this.replacingAction
49557
+ // indefinitely set
49558
+ let merged;
49559
+ try {
49560
+ merged = this.getHandler(target.handler).mergeActions(target, source);
49561
+ // update the target
49562
+ await this.draftStore.writeAction(merged);
49563
+ await this.notifyChangedListeners({
49564
+ type: DraftQueueEventType.ActionUpdated,
49565
+ action: merged,
49566
+ });
49567
+ // remove the source from queue
49568
+ await this.removeDraftAction(sourceActionId);
49569
+ }
49570
+ finally {
49571
+ this.replacingAction = undefined;
49572
+ }
49558
49573
  await this.startQueueSafe();
49559
49574
  return merged;
49560
49575
  });
@@ -59789,7 +59804,7 @@
59789
59804
  id: '@salesforce/lds-network-adapter',
59790
59805
  instrument: instrument$1,
59791
59806
  });
59792
- // version: 1.114.1-f3347d8bf
59807
+ // version: 1.114.2-fe583257a
59793
59808
 
59794
59809
  const { create: create$2, keys: keys$2 } = Object;
59795
59810
  const { stringify: stringify$1, parse: parse$1 } = JSON;
@@ -77515,7 +77530,7 @@
77515
77530
  configuration: { ...configurationForGraphQLAdapters },
77516
77531
  instrument,
77517
77532
  });
77518
- // version: 1.114.1-f3347d8bf
77533
+ // version: 1.114.2-fe583257a
77519
77534
 
77520
77535
  // On core the unstable adapters are re-exported with different names,
77521
77536
 
@@ -79644,7 +79659,7 @@
79644
79659
  unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
79645
79660
  graphQLImperative = ldsAdapter;
79646
79661
  });
79647
- // version: 1.114.1-f3347d8bf
79662
+ // version: 1.114.2-fe583257a
79648
79663
 
79649
79664
  var gqlApi = /*#__PURE__*/Object.freeze({
79650
79665
  __proto__: null,
@@ -80339,4 +80354,4 @@
80339
80354
  Object.defineProperty(exports, '__esModule', { value: true });
80340
80355
 
80341
80356
  }));
80342
- // version: 1.114.1-f3347d8bf
80357
+ // version: 1.114.2-fe583257a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-worker-api",
3
- "version": "1.114.1",
3
+ "version": "1.114.2",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "",
6
6
  "main": "dist/standalone/umd/lds-worker-api.js",
@@ -37,15 +37,15 @@
37
37
  "@luvio/engine": "0.137.1",
38
38
  "@luvio/environments": "0.137.1",
39
39
  "@oat-sa/rollup-plugin-wildcard-external": "^0.1.0",
40
- "@salesforce/lds-adapters-graphql": "^1.114.1",
41
- "@salesforce/lds-adapters-uiapi": "^1.114.1",
42
- "@salesforce/lds-default-luvio": "^1.114.1",
43
- "@salesforce/lds-drafts": "^1.114.1",
44
- "@salesforce/lds-graphql-parser": "^1.114.1",
45
- "@salesforce/lds-luvio-engine": "^1.114.1",
46
- "@salesforce/lds-priming": "^1.114.1",
47
- "@salesforce/lds-runtime-mobile": "^1.114.1",
48
- "@salesforce/nimbus-plugin-lds": "^1.114.1",
40
+ "@salesforce/lds-adapters-graphql": "^1.114.2",
41
+ "@salesforce/lds-adapters-uiapi": "^1.114.2",
42
+ "@salesforce/lds-default-luvio": "^1.114.2",
43
+ "@salesforce/lds-drafts": "^1.114.2",
44
+ "@salesforce/lds-graphql-parser": "^1.114.2",
45
+ "@salesforce/lds-luvio-engine": "^1.114.2",
46
+ "@salesforce/lds-priming": "^1.114.2",
47
+ "@salesforce/lds-runtime-mobile": "^1.114.2",
48
+ "@salesforce/nimbus-plugin-lds": "^1.114.2",
49
49
  "ajv": "^8.11.0",
50
50
  "glob": "^7.1.5",
51
51
  "nimbus-types": "^2.0.0-alpha1",