@salesforce/lds-runtime-mobile 1.114.1 → 1.114.4

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 +36 -21
  2. package/package.json +15 -18
  3. package/sfdc/main.js +36 -21
package/dist/main.js CHANGED
@@ -5166,16 +5166,24 @@ class DurableDraftQueue {
5166
5166
  await this.startQueueSafe();
5167
5167
  return Promise.reject('No action to replace');
5168
5168
  }
5169
- const { actionToReplace, replacingAction } = this.getHandler(first.handler).handleReplaceAction(actionId, withActionId, this.uploadingActionId, actions);
5170
- // TODO [W-8873834]: Will add batching support to durable store
5171
- // we should use that here to remove and set both actions in one operation
5172
- await this.removeDraftAction(replacingAction.id);
5173
- await this.draftStore.writeAction(actionToReplace);
5174
- await this.notifyChangedListeners({
5175
- type: DraftQueueEventType.ActionUpdated,
5176
- action: actionToReplace,
5177
- });
5178
- this.replacingAction = undefined;
5169
+ // put in a try/finally block so we don't leave this.replacingAction
5170
+ // indefinitely set
5171
+ let actionToReplace;
5172
+ try {
5173
+ const replaceResult = this.getHandler(first.handler).handleReplaceAction(actionId, withActionId, this.uploadingActionId, actions);
5174
+ actionToReplace = replaceResult.actionToReplace;
5175
+ // TODO [W-8873834]: Will add batching support to durable store
5176
+ // we should use that here to remove and set both actions in one operation
5177
+ await this.removeDraftAction(replaceResult.replacingAction.id);
5178
+ await this.draftStore.writeAction(actionToReplace);
5179
+ await this.notifyChangedListeners({
5180
+ type: DraftQueueEventType.ActionUpdated,
5181
+ action: actionToReplace,
5182
+ });
5183
+ }
5184
+ finally {
5185
+ this.replacingAction = undefined;
5186
+ }
5179
5187
  await this.startQueueSafe();
5180
5188
  return actionToReplace;
5181
5189
  });
@@ -5205,16 +5213,23 @@ class DurableDraftQueue {
5205
5213
  await this.startQueueSafe();
5206
5214
  throw Error('No action to replace');
5207
5215
  }
5208
- const merged = this.getHandler(target.handler).mergeActions(target, source);
5209
- // update the target
5210
- await this.draftStore.writeAction(merged);
5211
- await this.notifyChangedListeners({
5212
- type: DraftQueueEventType.ActionUpdated,
5213
- action: merged,
5214
- });
5215
- // remove the source from queue
5216
- await this.removeDraftAction(sourceActionId);
5217
- this.replacingAction = undefined;
5216
+ // put in a try/finally block so we don't leave this.replacingAction
5217
+ // indefinitely set
5218
+ let merged;
5219
+ try {
5220
+ merged = this.getHandler(target.handler).mergeActions(target, source);
5221
+ // update the target
5222
+ await this.draftStore.writeAction(merged);
5223
+ await this.notifyChangedListeners({
5224
+ type: DraftQueueEventType.ActionUpdated,
5225
+ action: merged,
5226
+ });
5227
+ // remove the source from queue
5228
+ await this.removeDraftAction(sourceActionId);
5229
+ }
5230
+ finally {
5231
+ this.replacingAction = undefined;
5232
+ }
5218
5233
  await this.startQueueSafe();
5219
5234
  return merged;
5220
5235
  });
@@ -15585,4 +15600,4 @@ register({
15585
15600
  });
15586
15601
 
15587
15602
  export { getRuntime, registerReportObserver, reportGraphqlQueryParseError };
15588
- // version: 1.114.1-f3347d8bf
15603
+ // version: 1.114.4-844684b4c
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-mobile",
3
- "version": "1.114.1",
3
+ "version": "1.114.4",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS runtime for mobile/hybrid environments.",
6
6
  "main": "dist/main.js",
@@ -32,27 +32,24 @@
32
32
  "release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-mobile"
33
33
  },
34
34
  "dependencies": {
35
- "@salesforce/lds-adapters-uiapi": "^1.114.1",
36
- "@salesforce/lds-bindings": "^1.114.1",
37
- "@salesforce/lds-instrumentation": "^1.114.1",
38
- "@salesforce/lds-priming": "^1.114.1",
35
+ "@salesforce/lds-adapters-uiapi": "*",
36
+ "@salesforce/lds-bindings": "*",
37
+ "@salesforce/lds-instrumentation": "*",
38
+ "@salesforce/lds-priming": "*",
39
39
  "@salesforce/user": "0.0.12",
40
40
  "o11y": "244.0.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@luvio/engine": "0.137.1",
44
- "@luvio/environments": "0.137.1",
45
- "@luvio/graphql-parser": "0.137.1",
46
- "@salesforce/lds-adapters-graphql": "^1.114.1",
47
- "@salesforce/lds-drafts": "^1.114.1",
48
- "@salesforce/lds-drafts-adapters-uiapi": "^1.114.1",
49
- "@salesforce/lds-graphql-eval": "^1.114.1",
50
- "@salesforce/lds-network-adapter": "^1.114.1",
51
- "@salesforce/lds-network-nimbus": "^1.114.1",
52
- "@salesforce/lds-store-binary": "^1.114.1",
53
- "@salesforce/lds-store-sql": "^1.114.1",
54
- "@salesforce/lds-utils-adapters": "^1.114.1",
55
- "@salesforce/nimbus-plugin-lds": "^1.114.1",
43
+ "@salesforce/lds-adapters-graphql": "*",
44
+ "@salesforce/lds-drafts": "*",
45
+ "@salesforce/lds-drafts-adapters-uiapi": "*",
46
+ "@salesforce/lds-graphql-eval": "*",
47
+ "@salesforce/lds-network-adapter": "*",
48
+ "@salesforce/lds-network-nimbus": "*",
49
+ "@salesforce/lds-store-binary": "*",
50
+ "@salesforce/lds-store-sql": "*",
51
+ "@salesforce/lds-utils-adapters": "*",
52
+ "@salesforce/nimbus-plugin-lds": "*",
56
53
  "babel-plugin-dynamic-import-node": "^2.3.3",
57
54
  "wait-for-expect": "^3.0.2"
58
55
  },
package/sfdc/main.js CHANGED
@@ -5166,16 +5166,24 @@ class DurableDraftQueue {
5166
5166
  await this.startQueueSafe();
5167
5167
  return Promise.reject('No action to replace');
5168
5168
  }
5169
- const { actionToReplace, replacingAction } = this.getHandler(first.handler).handleReplaceAction(actionId, withActionId, this.uploadingActionId, actions);
5170
- // TODO [W-8873834]: Will add batching support to durable store
5171
- // we should use that here to remove and set both actions in one operation
5172
- await this.removeDraftAction(replacingAction.id);
5173
- await this.draftStore.writeAction(actionToReplace);
5174
- await this.notifyChangedListeners({
5175
- type: DraftQueueEventType.ActionUpdated,
5176
- action: actionToReplace,
5177
- });
5178
- this.replacingAction = undefined;
5169
+ // put in a try/finally block so we don't leave this.replacingAction
5170
+ // indefinitely set
5171
+ let actionToReplace;
5172
+ try {
5173
+ const replaceResult = this.getHandler(first.handler).handleReplaceAction(actionId, withActionId, this.uploadingActionId, actions);
5174
+ actionToReplace = replaceResult.actionToReplace;
5175
+ // TODO [W-8873834]: Will add batching support to durable store
5176
+ // we should use that here to remove and set both actions in one operation
5177
+ await this.removeDraftAction(replaceResult.replacingAction.id);
5178
+ await this.draftStore.writeAction(actionToReplace);
5179
+ await this.notifyChangedListeners({
5180
+ type: DraftQueueEventType.ActionUpdated,
5181
+ action: actionToReplace,
5182
+ });
5183
+ }
5184
+ finally {
5185
+ this.replacingAction = undefined;
5186
+ }
5179
5187
  await this.startQueueSafe();
5180
5188
  return actionToReplace;
5181
5189
  });
@@ -5205,16 +5213,23 @@ class DurableDraftQueue {
5205
5213
  await this.startQueueSafe();
5206
5214
  throw Error('No action to replace');
5207
5215
  }
5208
- const merged = this.getHandler(target.handler).mergeActions(target, source);
5209
- // update the target
5210
- await this.draftStore.writeAction(merged);
5211
- await this.notifyChangedListeners({
5212
- type: DraftQueueEventType.ActionUpdated,
5213
- action: merged,
5214
- });
5215
- // remove the source from queue
5216
- await this.removeDraftAction(sourceActionId);
5217
- this.replacingAction = undefined;
5216
+ // put in a try/finally block so we don't leave this.replacingAction
5217
+ // indefinitely set
5218
+ let merged;
5219
+ try {
5220
+ merged = this.getHandler(target.handler).mergeActions(target, source);
5221
+ // update the target
5222
+ await this.draftStore.writeAction(merged);
5223
+ await this.notifyChangedListeners({
5224
+ type: DraftQueueEventType.ActionUpdated,
5225
+ action: merged,
5226
+ });
5227
+ // remove the source from queue
5228
+ await this.removeDraftAction(sourceActionId);
5229
+ }
5230
+ finally {
5231
+ this.replacingAction = undefined;
5232
+ }
5218
5233
  await this.startQueueSafe();
5219
5234
  return merged;
5220
5235
  });
@@ -15585,4 +15600,4 @@ register({
15585
15600
  });
15586
15601
 
15587
15602
  export { getRuntime, registerReportObserver, reportGraphqlQueryParseError };
15588
- // version: 1.114.1-f3347d8bf
15603
+ // version: 1.114.4-844684b4c